BASE: Update Icons & Name Of The App.

This commit is contained in:
2025-12-04 10:23:59 +05:00
parent b04050384d
commit e602782edd
228 changed files with 34364 additions and 7905 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@ import 'package:customer/widget/my_separator.dart';
import 'package:dotted_border/dotted_border.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:get/get.dart' hide Trans;
import '../../../controllers/theme_controller.dart';
import '../../../themes/show_toast_dialog.dart';
@@ -23,12 +23,22 @@ class CouponListScreen extends StatelessWidget {
init: CartController(),
builder: (controller) {
return Scaffold(
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
backgroundColor:
isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
appBar: AppBar(
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
backgroundColor:
isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
centerTitle: false,
titleSpacing: 0,
title: Text("Coupon Code".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
title: Text(
"Coupon Code".tr(),
textAlign: TextAlign.start,
style: TextStyle(
fontFamily: AppThemeData.medium,
fontSize: 16,
color: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
),
),
bottom: PreferredSize(
preferredSize: const Size.fromHeight(55),
child: Padding(
@@ -37,23 +47,44 @@ class CouponListScreen extends StatelessWidget {
hintText: 'Enter coupon code'.tr(),
controller: controller.couponCodeController.value,
suffix: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
padding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 12,
),
child: InkWell(
onTap: () {
if (controller.couponCodeController.value.text.isEmpty) {
ShowToastDialog.showToast("Please enter coupon code".tr());
if (controller
.couponCodeController
.value
.text
.isEmpty) {
ShowToastDialog.showToast(
"Please enter coupon code".tr(),
);
return;
}
CouponModel? matchedCoupon = controller.couponList.firstWhereOrNull((coupon) => coupon.code!.toLowerCase() == controller.couponCodeController.value.text.toLowerCase());
CouponModel? matchedCoupon = controller.couponList
.firstWhereOrNull(
(coupon) =>
coupon.code!.toLowerCase() ==
controller.couponCodeController.value.text
.toLowerCase(),
);
if (matchedCoupon != null) {
double couponAmount = Constant.calculateDiscount(amount: controller.subTotal.value.toString(), offerModel: matchedCoupon);
double couponAmount = Constant.calculateDiscount(
amount: controller.subTotal.value.toString(),
offerModel: matchedCoupon,
);
if (couponAmount < controller.subTotal.value) {
controller.selectedCouponModel.value = matchedCoupon;
controller.selectedCouponModel.value =
matchedCoupon;
controller.calculatePrice();
Get.back();
} else {
ShowToastDialog.showToast("Coupon code not applied".tr());
ShowToastDialog.showToast(
"Coupon code not applied".tr(),
);
}
} else {
ShowToastDialog.showToast("Invalid Coupon".tr());
@@ -62,7 +93,14 @@ class CouponListScreen extends StatelessWidget {
child: Text(
"Apply".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
style: TextStyle(
fontFamily: AppThemeData.semiBold,
fontSize: 16,
color:
isDark
? AppThemeData.primary300
: AppThemeData.primary300,
),
),
),
),
@@ -76,17 +114,32 @@ class CouponListScreen extends StatelessWidget {
itemBuilder: (context, index) {
CouponModel couponModel = controller.couponList[index];
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
padding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 10,
),
child: Container(
height: Responsive.height(16, context),
decoration: ShapeDecoration(color: isDark ? AppThemeData.grey900 : AppThemeData.grey50, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10))),
decoration: ShapeDecoration(
color: isDark ? AppThemeData.grey900 : AppThemeData.grey50,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
),
child: Row(
children: [
ClipRRect(
borderRadius: const BorderRadius.only(topLeft: Radius.circular(10), bottomLeft: Radius.circular(10)),
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(10),
bottomLeft: Radius.circular(10),
),
child: Stack(
children: [
Image.asset("assets/images/ic_coupon_image.png", height: Responsive.height(16, context), fit: BoxFit.fill),
Image.asset(
"assets/images/ic_coupon_image.png",
height: Responsive.height(16, context),
fit: BoxFit.fill,
),
Padding(
padding: const EdgeInsets.only(left: 10),
child: Align(
@@ -96,7 +149,14 @@ class CouponListScreen extends StatelessWidget {
child: Text(
"${couponModel.discountType == "Fix Price" ? Constant.amountShow(amount: couponModel.discount) : "${couponModel.discount}%"} ${'Off'.tr()}",
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey50),
style: TextStyle(
fontFamily: AppThemeData.semiBold,
fontSize: 16,
color:
isDark
? AppThemeData.grey50
: AppThemeData.grey50,
),
),
),
),
@@ -106,51 +166,98 @@ class CouponListScreen extends StatelessWidget {
),
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 18),
padding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 18,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
DottedBorder(
options: RoundedRectDottedBorderOptions(strokeWidth: 1, radius: const Radius.circular(6), color: isDark ? AppThemeData.grey400 : AppThemeData.grey500),
options: RoundedRectDottedBorderOptions(
strokeWidth: 1,
radius: const Radius.circular(6),
color:
isDark
? AppThemeData.grey400
: AppThemeData.grey500,
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
padding: const EdgeInsets.symmetric(
horizontal: 16,
),
child: Text(
"${couponModel.code}",
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500),
style: TextStyle(
fontFamily: AppThemeData.semiBold,
fontSize: 16,
color:
isDark
? AppThemeData.grey400
: AppThemeData.grey500,
),
),
),
),
const Expanded(child: SizedBox(height: 10)),
InkWell(
onTap: () {
double couponAmount = Constant.calculateDiscount(amount: controller.subTotal.value.toString(), offerModel: couponModel);
double couponAmount =
Constant.calculateDiscount(
amount:
controller.subTotal.value
.toString(),
offerModel: couponModel,
);
if (couponAmount < controller.subTotal.value) {
controller.selectedCouponModel.value = couponModel;
if (couponAmount <
controller.subTotal.value) {
controller.selectedCouponModel.value =
couponModel;
controller.calculatePrice();
Get.back();
} else {
ShowToastDialog.showToast("Coupon code not applied".tr());
ShowToastDialog.showToast(
"Coupon code not applied".tr(),
);
}
},
child: Text(
"Tap To Apply".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
style: TextStyle(
fontFamily: AppThemeData.medium,
color:
isDark
? AppThemeData.primary300
: AppThemeData.primary300,
),
),
),
],
),
const SizedBox(height: 20),
MySeparator(color: isDark ? AppThemeData.grey700 : AppThemeData.grey200),
MySeparator(
color:
isDark
? AppThemeData.grey700
: AppThemeData.grey200,
),
const SizedBox(height: 20),
Text(
"${couponModel.description}",
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
style: TextStyle(
fontFamily: AppThemeData.medium,
fontSize: 16,
color:
isDark
? AppThemeData.grey50
: AppThemeData.grey900,
),
),
],
),

View File

@@ -10,8 +10,7 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';
import 'package:get/get.dart' hide Trans;
import '../../../controllers/theme_controller.dart';
import '../dash_board_screens/dash_board_screen.dart';
@@ -26,8 +25,14 @@ class OrderPlacingScreen extends StatelessWidget {
init: OrderPlacingController(),
builder: (controller) {
return Scaffold(
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
appBar: AppBar(backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface, centerTitle: false, titleSpacing: 0),
backgroundColor:
isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
appBar: AppBar(
backgroundColor:
isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
centerTitle: false,
titleSpacing: 0,
),
body:
controller.isLoading.value
? Constant.loader()
@@ -41,16 +46,41 @@ class OrderPlacingScreen extends StatelessWidget {
Text(
"Order Placed".tr(),
textAlign: TextAlign.start,
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey900, fontSize: 34, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w400),
style: TextStyle(
color:
isDark
? AppThemeData.grey100
: AppThemeData.grey900,
fontSize: 34,
fontFamily: AppThemeData.medium,
fontWeight: FontWeight.w400,
),
),
Text(
"Hang tight — your items are being delivered quickly and safely!".tr(),
"Hang tight — your items are being delivered quickly and safely!"
.tr(),
textAlign: TextAlign.start,
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
style: TextStyle(
color:
isDark
? AppThemeData.grey300
: AppThemeData.grey600,
fontSize: 16,
fontFamily: AppThemeData.regular,
fontWeight: FontWeight.w400,
),
),
const SizedBox(height: 40),
Container(
decoration: ShapeDecoration(color: isDark ? AppThemeData.grey900 : AppThemeData.grey50, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8))),
decoration: ShapeDecoration(
color:
isDark
? AppThemeData.grey900
: AppThemeData.grey50,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
),
child: Padding(
padding: const EdgeInsets.all(10),
child: Column(
@@ -60,13 +90,26 @@ class OrderPlacingScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset("assets/icons/ic_location.svg", colorFilter: ColorFilter.mode(AppThemeData.primary300, BlendMode.srcIn)),
SvgPicture.asset(
"assets/icons/ic_location.svg",
colorFilter: ColorFilter.mode(
AppThemeData.primary300,
BlendMode.srcIn,
),
),
const SizedBox(width: 10),
Expanded(
child: Text(
"Order ID".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 16),
style: TextStyle(
fontFamily: AppThemeData.semiBold,
color:
isDark
? AppThemeData.primary300
: AppThemeData.primary300,
fontSize: 16,
),
),
),
],
@@ -75,7 +118,13 @@ class OrderPlacingScreen extends StatelessWidget {
Text(
controller.orderModel.value.id.toString(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500),
style: TextStyle(
fontFamily: AppThemeData.medium,
color:
isDark
? AppThemeData.grey400
: AppThemeData.grey500,
),
),
],
),
@@ -90,21 +139,51 @@ class OrderPlacingScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Center(child: Image.asset("assets/images/ic_timer.gif", height: 140)),
Center(
child: Image.asset(
"assets/images/ic_timer.gif",
height: 140,
),
),
const SizedBox(height: 20),
Text(
"Placing your order".tr(),
textAlign: TextAlign.start,
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey900, fontSize: 34, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w400),
style: TextStyle(
color:
isDark
? AppThemeData.grey100
: AppThemeData.grey900,
fontSize: 34,
fontFamily: AppThemeData.medium,
fontWeight: FontWeight.w400,
),
),
Text(
"Take a moment to review your order before proceeding to checkout.".tr(),
"Take a moment to review your order before proceeding to checkout."
.tr(),
textAlign: TextAlign.start,
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
style: TextStyle(
color:
isDark
? AppThemeData.grey300
: AppThemeData.grey600,
fontSize: 16,
fontFamily: AppThemeData.regular,
fontWeight: FontWeight.w400,
),
),
const SizedBox(height: 40),
Container(
decoration: ShapeDecoration(color: isDark ? AppThemeData.grey900 : AppThemeData.grey50, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8))),
decoration: ShapeDecoration(
color:
isDark
? AppThemeData.grey900
: AppThemeData.grey50,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
),
child: Padding(
padding: const EdgeInsets.all(10),
child: Column(
@@ -114,22 +193,42 @@ class OrderPlacingScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset("assets/icons/ic_location.svg", colorFilter: ColorFilter.mode(AppThemeData.primary300, BlendMode.srcIn)),
SvgPicture.asset(
"assets/icons/ic_location.svg",
colorFilter: ColorFilter.mode(
AppThemeData.primary300,
BlendMode.srcIn,
),
),
const SizedBox(width: 10),
Expanded(
child: Text(
"Delivery Address".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 16),
style: TextStyle(
fontFamily: AppThemeData.semiBold,
color:
isDark
? AppThemeData.primary300
: AppThemeData.primary300,
fontSize: 16,
),
),
),
],
),
const SizedBox(height: 5),
Text(
controller.orderModel.value.address!.getFullAddress(),
controller.orderModel.value.address!
.getFullAddress(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500),
style: TextStyle(
fontFamily: AppThemeData.medium,
color:
isDark
? AppThemeData.grey400
: AppThemeData.grey500,
),
),
],
),
@@ -137,7 +236,15 @@ class OrderPlacingScreen extends StatelessWidget {
),
const SizedBox(height: 10),
Container(
decoration: ShapeDecoration(color: isDark ? AppThemeData.grey900 : AppThemeData.grey50, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8))),
decoration: ShapeDecoration(
color:
isDark
? AppThemeData.grey900
: AppThemeData.grey50,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
),
child: Padding(
padding: const EdgeInsets.all(10),
child: Column(
@@ -147,13 +254,27 @@ class OrderPlacingScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset("assets/icons/ic_book.svg", colorFilter: ColorFilter.mode(AppThemeData.primary300, BlendMode.srcIn), height: 22),
SvgPicture.asset(
"assets/icons/ic_book.svg",
colorFilter: ColorFilter.mode(
AppThemeData.primary300,
BlendMode.srcIn,
),
height: 22,
),
const SizedBox(width: 10),
Expanded(
child: Text(
"Order Summary".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 16),
style: TextStyle(
fontFamily: AppThemeData.semiBold,
color:
isDark
? AppThemeData.primary300
: AppThemeData.primary300,
fontSize: 16,
),
),
),
],
@@ -161,21 +282,47 @@ class OrderPlacingScreen extends StatelessWidget {
const SizedBox(height: 5),
ListView.builder(
shrinkWrap: true,
itemCount: controller.orderModel.value.products!.length,
itemCount:
controller
.orderModel
.value
.products!
.length,
itemBuilder: (context, index) {
CartProductModel cartProductModel = controller.orderModel.value.products![index];
CartProductModel cartProductModel =
controller
.orderModel
.value
.products![index];
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
"${cartProductModel.quantity} x".tr(),
textAlign: TextAlign.start,
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey900, fontSize: 14, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
style: TextStyle(
color:
isDark
? AppThemeData.grey100
: AppThemeData.grey900,
fontSize: 14,
fontFamily: AppThemeData.regular,
fontWeight: FontWeight.w400,
),
),
Text(
"${cartProductModel.name}".tr(),
textAlign: TextAlign.start,
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey900, fontSize: 14, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
style: TextStyle(
color:
isDark
? AppThemeData.grey100
: AppThemeData.grey900,
fontSize: 14,
fontFamily: AppThemeData.regular,
fontWeight: FontWeight.w400,
),
),
],
);
@@ -196,30 +343,39 @@ class OrderPlacingScreen extends StatelessWidget {
child:
controller.isPlacing.value
? RoundedButtonFill(
borderRadius: 10.r,
borderRadius: 10.r,
title: "Track Order".tr(),
height: 5.5,
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
fontSizes: 16,
onPress: () async {
if (Constant.sectionConstantModel!.serviceTypeFlag == "ecommerce-service") {
if (Constant.sectionConstantModel!.serviceTypeFlag ==
"ecommerce-service") {
Get.offAll(const DashBoardEcommerceScreen());
DashBoardEcommerceController controller = Get.put(DashBoardEcommerceController());
DashBoardEcommerceController controller = Get.put(
DashBoardEcommerceController(),
);
controller.selectedIndex.value = 3;
} else {
Get.offAll(const DashBoardScreen());
DashBoardController controller = Get.put(DashBoardController());
DashBoardController controller = Get.put(
DashBoardController(),
);
controller.selectedIndex.value = 3;
}
},
)
: RoundedButtonFill(
borderRadius: 10.r,
borderRadius: 10.r,
title: "Track Order".tr(),
height: 5.5,
color: isDark ? AppThemeData.grey700 : AppThemeData.grey200,
textColor: isDark ? AppThemeData.grey900 : AppThemeData.grey50,
color:
isDark
? AppThemeData.grey700
: AppThemeData.grey200,
textColor:
isDark ? AppThemeData.grey900 : AppThemeData.grey50,
fontSizes: 16,
onPress: () async {},
),

View File

@@ -5,8 +5,7 @@ import 'package:customer/themes/round_button_fill.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:get/get.dart' hide Trans;
import '../../../controllers/theme_controller.dart';
import '../wallet_screen/wallet_screen.dart';