From ab598214284d3b4e15cf68c49b750edc02b30697 Mon Sep 17 00:00:00 2001 From: FaizHashmiCS22 Date: Tue, 25 Oct 2022 10:39:02 +0300 Subject: [PATCH] Merge conflicts resolved --- assets/images/CHECK.svg | 72 +++++++++ assets/images/Running girl.svg | 223 ++++++++++++++++++++++++++ assets/images/light-bulb.svg | 5 + lib/generated/codegen_loader.g.dart | 3 +- lib/ui/landing/dashboard_screen.dart | 231 +++++++++++++++++++++------ 5 files changed, 485 insertions(+), 49 deletions(-) create mode 100644 assets/images/CHECK.svg create mode 100644 assets/images/Running girl.svg create mode 100644 assets/images/light-bulb.svg diff --git a/assets/images/CHECK.svg b/assets/images/CHECK.svg new file mode 100644 index 0000000..b4b07a4 --- /dev/null +++ b/assets/images/CHECK.svg @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/Running girl.svg b/assets/images/Running girl.svg new file mode 100644 index 0000000..d9653c0 --- /dev/null +++ b/assets/images/Running girl.svg @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/light-bulb.svg b/assets/images/light-bulb.svg new file mode 100644 index 0000000..c8e16cb --- /dev/null +++ b/assets/images/light-bulb.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/lib/generated/codegen_loader.g.dart b/lib/generated/codegen_loader.g.dart index 16d2aff..99dc004 100644 --- a/lib/generated/codegen_loader.g.dart +++ b/lib/generated/codegen_loader.g.dart @@ -971,8 +971,7 @@ static const Map en_US = { "sponsoredBy": "Sponsored By:", "question": "Question", "marathoners": "Marathoners", - "prize": "Prize:" - "createNewChat": "Create New Chat", + "prize": "Prize:", "advancedSearch": "Advanced Search", "openNot": "Open Notifications", "fyi": "FYI Notifications", diff --git a/lib/ui/landing/dashboard_screen.dart b/lib/ui/landing/dashboard_screen.dart index c85b383..ea81eda 100644 --- a/lib/ui/landing/dashboard_screen.dart +++ b/lib/ui/landing/dashboard_screen.dart @@ -186,25 +186,62 @@ class _DashboardScreenState extends State { children: [ Expanded( child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: + MainAxisSize + .min, + crossAxisAlignment: + CrossAxisAlignment + .start, children: [ - LocaleKeys.markAttendance.tr().toText14(color: Colors.white, isBold: true), - if (model.isTimeRemainingInSeconds == 0) DateTime.now().toString().split(" ")[0].toText12(color: Colors.white), - if (model.isTimeRemainingInSeconds != 0) + LocaleKeys + .markAttendance + .tr() + .toText14( + color: Colors + .white, + isBold: + true), + if (model + .isTimeRemainingInSeconds == + 0) + DateTime.now() + .toString() + .split( + " ")[0] + .toText12( + color: Colors + .white), + if (model + .isTimeRemainingInSeconds != + 0) Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: + MainAxisSize + .min, + crossAxisAlignment: + CrossAxisAlignment + .start, children: [ 9.height, - Directionality( - textDirection: TextDirection.ltr, - child: CountdownTimer( - endTime: model.endTime, - onEnd: null, - endWidget: "00:00:00".toText14(color: Colors.white, isBold: true), - textStyle: const TextStyle(color: Colors.white, fontSize: 14, letterSpacing: -0.48, fontWeight: FontWeight.bold), - ), + CountdownTimer( + endTime: model + .endTime, + onEnd: + null, + endWidget: "00:00:00".toText14( + color: Colors + .white, + isBold: + true), + textStyle: const TextStyle( + color: Colors + .white, + fontSize: + 14, + letterSpacing: + -0.48, + fontWeight: + FontWeight.bold), ), LocaleKeys .timeLeftToday @@ -249,29 +286,83 @@ class _DashboardScreenState extends State { CrossAxisAlignment .start, children: [ - LocaleKeys.checkIn.tr().toText12(color: Colors.white), - (model.attendanceTracking!.pSwipeIn == null ? "--:--" : model.attendanceTracking!.pSwipeIn) + LocaleKeys + .checkIn + .tr() + .toText12( + color: + Colors.white), + (model.attendanceTracking!.pSwipeIn == + null + ? "--:--" + : model + .attendanceTracking! + .pSwipeIn) .toString() - .toText14(color: Colors.white, isBold: true), + .toText14( + color: Colors + .white, + isBold: + true), 4.height, ], - ).paddingOnly(left: 12, right: 12), + ).paddingOnly( + left: 12, + right: 12), ), Container( - margin: EdgeInsets.only(top: AppState().isArabic(context) ? 6 : 0), + margin: EdgeInsets.only( + top: AppState() + .isArabic( + context) + ? 6 + : 0), width: 45, height: 45, - padding: const EdgeInsets.only(left: 14, right: 14), - decoration: BoxDecoration( - color: Color(0xff259EA4), - borderRadius: BorderRadius.only( - bottomRight: AppState().isArabic(context) ? Radius.circular(0) : Radius.circular(15), - bottomLeft: AppState().isArabic(context) ? Radius.circular(15) : Radius.circular(0), + padding: + const EdgeInsets + .only( + left: 14, + right: + 14), + decoration: + BoxDecoration( + color: Color( + 0xff259EA4), + borderRadius: + BorderRadius + .only( + bottomRight: AppState() + .isArabic( + context) + ? Radius + .circular( + 0) + : Radius + .circular( + 15), + bottomLeft: AppState() + .isArabic( + context) + ? Radius + .circular( + 15) + : Radius + .circular( + 0), ), ), - child: SvgPicture.asset(model.isTimeRemainingInSeconds == 0 ? "assets/images/play.svg" : "assets/images/stop.svg"), + child: SvgPicture.asset( + model.isTimeRemainingInSeconds == + 0 + ? "assets/images/play.svg" + : "assets/images/stop.svg"), ).onPress(() { - showMyBottomSheet(context, child: MarkAttendanceWidget(model)); + showMyBottomSheet( + context, + child: + MarkAttendanceWidget( + model)); }), ], ), @@ -281,7 +372,10 @@ class _DashboardScreenState extends State { ), ).onPress( () { - Navigator.pushNamed(context, AppRoutes.todayAttendance); + Navigator.pushNamed( + context, + AppRoutes + .todayAttendance); }, )) .animatedSwither(); @@ -304,11 +398,15 @@ class _DashboardScreenState extends State { padding: const EdgeInsets.only(top: 31), decoration: BoxDecoration( color: Colors.white, - borderRadius: const BorderRadius.only(topRight: Radius.circular(50), topLeft: Radius.circular(50)), - border: Border.all(color: MyColors.lightGreyEDColor, width: 1), + borderRadius: const BorderRadius.only( + topRight: Radius.circular(50), + topLeft: Radius.circular(50)), + border: Border.all( + color: MyColors.lightGreyEDColor, width: 1), ), child: Column( - mainAxisSize: MainAxisSize.min,crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( crossAxisAlignment: CrossAxisAlignment.center, @@ -321,22 +419,32 @@ class _DashboardScreenState extends State { LocaleKeys.offers.tr().toText12(), Row( children: [ - LocaleKeys.discounts.tr().toText24(isBold: true), + LocaleKeys.discounts + .tr() + .toText24(isBold: true), 6.width, Container( - padding: const EdgeInsets.only(left: 8, right: 8), + padding: const EdgeInsets.only( + left: 8, right: 8), decoration: BoxDecoration( color: MyColors.yellowColor, - borderRadius: BorderRadius.circular(10), + borderRadius: + BorderRadius.circular(10), ), - child: LocaleKeys.newString.tr().toText10(isBold: true)), + child: LocaleKeys.newString + .tr() + .toText10(isBold: true)), ], ), ], ), ), - LocaleKeys.viewAllOffers.tr().toText12(isUnderLine: true).onPress(() { - Navigator.pushNamed(context, AppRoutes.offersAndDiscounts); + LocaleKeys.viewAllOffers + .tr() + .toText12(isUnderLine: true) + .onPress(() { + Navigator.pushNamed( + context, AppRoutes.offersAndDiscounts); }) ], ).paddingOnly(left: 21, right: 21), @@ -347,7 +455,8 @@ class _DashboardScreenState extends State { child: ListView.separated( shrinkWrap: true, physics: const BouncingScrollPhysics(), - padding: const EdgeInsets.only(left: 21, right: 21, top: 13), + padding: const EdgeInsets.only( + left: 21, right: 21, top: 13), scrollDirection: Axis.horizontal, itemBuilder: (BuildContext cxt, int index) { return model.isOffersLoading @@ -372,17 +481,30 @@ class _DashboardScreenState extends State { .all( Radius.circular(100), ), - border: Border.all(color: MyColors.lightGreyE3Color, width: 1), + border: Border.all( + color: MyColors + .lightGreyE3Color, + width: 1), ), child: ClipRRect( - borderRadius: const BorderRadius.all( + borderRadius: + const BorderRadius + .all( Radius.circular(50), ), child: Hero( - tag: "ItemImage" + data.getOffersList[index].rowID!, - transitionOnUserGestures: true, + tag: "ItemImage" + + data + .getOffersList[ + index] + .rowID!, + transitionOnUserGestures: + true, child: Image.network( - data.getOffersList[index].bannerImage!, + data + .getOffersList[ + index] + .bannerImage!, fit: BoxFit.contain, ), ), @@ -390,9 +512,24 @@ class _DashboardScreenState extends State { ), 4.height, Expanded( - child: AppState().isArabic(context) - ? data.getOffersList[index].titleAR!.toText12(isCenter: true, maxLine: 1) - : data.getOffersList[index].title!.toText12(isCenter: true, maxLine: 1), + child: AppState() + .isArabic(context) + ? data + .getOffersList[ + index] + .titleAR! + .toText12( + isCenter: + true, + maxLine: 1) + : data + .getOffersList[ + index] + .title! + .toText12( + isCenter: + true, + maxLine: 1), ), ], ),