From 95b60181b1086777ba90f0101ad2eaeee44a72e4 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Thu, 6 Oct 2022 10:25:47 +0300 Subject: [PATCH 1/3] bug fixes --- assets/langs/ar-SA.json | 2 +- assets/langs/en-US.json | 2 +- lib/classes/consts.dart | 4 +-- lib/generated/codegen_loader.g.dart | 10 +++++--- lib/ui/landing/dashboard_screen.dart | 13 +++++----- lib/ui/landing/widget/app_drawer.dart | 2 +- lib/ui/landing/widget/menus_widget.dart | 22 +++++++++++++--- lib/ui/landing/widget/services_widget.dart | 7 +++++- .../services_menu_list_screen.dart | 13 +++++----- lib/ui/work_list/work_list_screen.dart | 2 +- lib/ui/work_list/worklist_detail_screen.dart | 25 ++++++------------- 11 files changed, 56 insertions(+), 46 deletions(-) diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index 3f1461b..5f40cbc 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -1,7 +1,7 @@ { "mohemm": "Mohemm", "english": "English", - "arabic": "Arabic", + "arabic": "عربي", "login": "تسجيل الدخول", "pleaseEnterLoginDetails": "الرجاء إدخال التفاصيل أدناه لتسجيل الدخول", "username": "اسم المستخدم", diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index 23b7d3e..c0cf46d 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -1,7 +1,7 @@ { "mohemm": "Mohemm", "english": "English", - "arabic": "Arabic", + "arabic": "عربي", "login": "Login", "pleaseEnterLoginDetails": "Please enter the detail below to login", "username": "Username", diff --git a/lib/classes/consts.dart b/lib/classes/consts.dart index 564a61f..645aaf8 100644 --- a/lib/classes/consts.dart +++ b/lib/classes/consts.dart @@ -1,7 +1,7 @@ class ApiConsts { //static String baseUrl = "http://10.200.204.20:2801/"; // Local server - // static String baseUrl = "https://uat.hmgwebservices.com"; // UAT server - static String baseUrl = "https://hmgwebservices.com"; // Live server + static String baseUrl = "https://uat.hmgwebservices.com"; // UAT server + // static String baseUrl = "https://hmgwebservices.com"; // Live server static String baseUrlServices = baseUrl + "/Services/"; // server // static String baseUrlServices = "https://api.cssynapses.com/tangheem/"; // Live server static String utilitiesRest = baseUrlServices + "Utilities.svc/REST/"; diff --git a/lib/generated/codegen_loader.g.dart b/lib/generated/codegen_loader.g.dart index f48e420..4688cd3 100644 --- a/lib/generated/codegen_loader.g.dart +++ b/lib/generated/codegen_loader.g.dart @@ -17,7 +17,7 @@ class CodegenLoader extends AssetLoader{ static const Map ar_SA = { "mohemm": "Mohemm", "english": "English", - "arabic": "Arabic", + "arabic": "عربي", "login": "تسجيل الدخول", "pleaseEnterLoginDetails": "الرجاء إدخال التفاصيل أدناه لتسجيل الدخول", "username": "اسم المستخدم", @@ -27,6 +27,7 @@ class CodegenLoader extends AssetLoader{ "lastLoginDetails": "تفاصيل تسجيل الدخول الأخير:", "verificationType": "نوع التحقق:", "pleaseVerify": "ارجوك تحقق", + "pleaseVerifyForBio": "الرجاء التحقق من تسجيل الدخول باستخدام أحد هذه الخيارات", "verifyThroughFace": "تحقق من خلال الوجه", "verifyThroughFingerprint": "تحقق من خلال بصمة الإصبع", "verifyThroughSMS": "تحقق من خلال الرسائل القصيرة", @@ -420,7 +421,7 @@ class CodegenLoader extends AssetLoader{ "addFavoriteList": "هل تريد اضافة {name} لقائمة المفضله", "feedbackUserExperience": "هذا للحصول على تعليقات حول تجربة المستخدم", "rateUI": ".1 كيف تريد تقييم التطبيق", - "Submit Survey": "ارسال الاستبيان", + "submitSurvey": "ارسال الاستبيان", "typeHere": "اكتب هنا", "profile": { "reset_password": { @@ -459,7 +460,7 @@ class CodegenLoader extends AssetLoader{ static const Map en_US = { "mohemm": "Mohemm", "english": "English", - "arabic": "Arabic", + "arabic": "عربي", "login": "Login", "pleaseEnterLoginDetails": "Please enter the detail below to login", "username": "Username", @@ -469,6 +470,7 @@ static const Map en_US = { "lastLoginDetails": "Last Login Details:", "verificationType": "Verification Type:", "pleaseVerify": "Please Verify", + "pleaseVerifyForBio": "Please verify login with one of the following options", "verifyThroughFace": "Verify Through Face", "verifyThroughFingerprint": "Verify Through Fingerprint", "verifyThroughSMS": "Verify Through SMS", @@ -862,7 +864,7 @@ static const Map en_US = { "addFavoriteList": "Do you want to add {name} in your favorite list", "feedbackUserExperience": "This is to get the feedback about the user experience", "rateUI": "1. How would you rate this UI?", - "Submit Survey": "Submit Survey", + "submitSurvey": "Submit Survey", "typeHere": "Type here", "profile": { "reset_password": { diff --git a/lib/ui/landing/dashboard_screen.dart b/lib/ui/landing/dashboard_screen.dart index 1d8373e..0ddde2f 100644 --- a/lib/ui/landing/dashboard_screen.dart +++ b/lib/ui/landing/dashboard_screen.dart @@ -71,9 +71,7 @@ class _DashboardScreenState extends State { mainAxisSize: MainAxisSize.min, children: [ Image.memory( - Utils.getPostBytes( - AppState().memberInformationList!.eMPLOYEEIMAGE ?? "", - ), + Utils.getPostBytes(AppState().memberInformationList!.eMPLOYEEIMAGE ?? ""), errorBuilder: (BuildContext context, error, stackTrace) { return SvgPicture.asset( "assets/images/user.svg", @@ -205,16 +203,17 @@ class _DashboardScreenState extends State { .toText14(color: Colors.white, isBold: true), 4.height, ], - ).paddingOnly(left: 12), + ).paddingOnly(right: AppState().isArabic(context) ? 12 : 0, left: AppState().isArabic(context) ? 0 : 12), ), Container( width: 45, height: 45, padding: const EdgeInsets.only(left: 14, right: 14), - decoration: const BoxDecoration( - color: Color(0xff259EA4), + decoration: BoxDecoration( + color: const Color(0xff259EA4), borderRadius: BorderRadius.only( - bottomRight: Radius.circular(15), + bottomRight: Radius.circular(AppState().isArabic(context) ? 0 : 15), + bottomLeft: Radius.circular(AppState().isArabic(context) ? 15 : 0), ), ), child: SvgPicture.asset(model.isTimeRemainingInSeconds == 0 ? "assets/images/play.svg" : "assets/images/stop.svg"), diff --git a/lib/ui/landing/widget/app_drawer.dart b/lib/ui/landing/widget/app_drawer.dart index d2203f9..ea6343b 100644 --- a/lib/ui/landing/widget/app_drawer.dart +++ b/lib/ui/landing/widget/app_drawer.dart @@ -124,7 +124,7 @@ class _AppDrawerState extends State { 9.width, title.toText14(color: color).expanded ], - ).paddingOnly(left: 21, top: 10, bottom: 10).onPress(closeDrawer + ).paddingOnly(left: 21, top: 10, bottom: 10, right: 21).onPress(closeDrawer ? () async { Navigator.pop(context); Future.delayed(const Duration(microseconds: 200), onPress); diff --git a/lib/ui/landing/widget/menus_widget.dart b/lib/ui/landing/widget/menus_widget.dart index 91723ee..6e550ec 100644 --- a/lib/ui/landing/widget/menus_widget.dart +++ b/lib/ui/landing/widget/menus_widget.dart @@ -1,6 +1,7 @@ import 'package:easy_localization/src/public_ext.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; +import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/config/routes.dart'; import 'package:mohem_flutter_app/extensions/string_extensions.dart'; import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; @@ -43,7 +44,11 @@ class MenusWidget extends StatelessWidget { Expanded( child: data.workListCounter.toString().toText16(color: Colors.white, isBold: true, maxlines: 1), ), - SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white) + RotatedBox( + quarterTurns: AppState().isArabic(context) ? 2:4, + child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white) + ), + ], ) ], @@ -70,7 +75,10 @@ class MenusWidget extends StatelessWidget { Expanded( child: data.missingSwipeCounter.toString().toText16(color: Colors.white, isBold: true, maxlines: 1), ), - SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white) + RotatedBox( + quarterTurns: AppState().isArabic(context) ? 2:4, + child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white) + ), ], ) ], @@ -97,7 +105,10 @@ class MenusWidget extends StatelessWidget { Expanded( child: data.leaveBalance.toString().toText16(color: Colors.white, isBold: true, maxlines: 1), ), - SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white) + RotatedBox( + quarterTurns: AppState().isArabic(context) ? 2:4, + child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white) + ), ], ) ], @@ -124,7 +135,10 @@ class MenusWidget extends StatelessWidget { Expanded( child: data.ticketBalance.toString().toText16(color: Colors.white, isBold: true, maxlines: 1), ), - SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white) + RotatedBox( + quarterTurns: AppState().isArabic(context) ? 2:4, + child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white) + ), ], ) ], diff --git a/lib/ui/landing/widget/services_widget.dart b/lib/ui/landing/widget/services_widget.dart index 5b2a207..5bdb217 100644 --- a/lib/ui/landing/widget/services_widget.dart +++ b/lib/ui/landing/widget/services_widget.dart @@ -1,6 +1,7 @@ import 'package:easy_localization/src/public_ext.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; +import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/config/routes.dart'; import 'package:mohem_flutter_app/extensions/int_extensions.dart'; import 'package:mohem_flutter_app/extensions/string_extensions.dart'; @@ -75,7 +76,11 @@ class ServicesWidget extends StatelessWidget { Expanded( child: data.homeMenus![parentIndex].menuEntiesList[index].prompt!.toText11(isBold: true), ), - SvgPicture.asset("assets/images/arrow_next.svg").paddingOnly(bottom: 4) + RotatedBox( + quarterTurns: AppState().isArabic(context) ? 2:4, + child: SvgPicture.asset("assets/images/arrow_next.svg").paddingOnly(bottom: 4) + ), + ], ) ], diff --git a/lib/ui/my_attendance/services_menu_list_screen.dart b/lib/ui/my_attendance/services_menu_list_screen.dart index 4e4745a..fe82058 100644 --- a/lib/ui/my_attendance/services_menu_list_screen.dart +++ b/lib/ui/my_attendance/services_menu_list_screen.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/classes/utils.dart'; import 'package:mohem_flutter_app/config/routes.dart'; @@ -39,7 +40,7 @@ class ServicesMenuListScreen extends StatelessWidget { ? Utils.getNoDataWidget(context) : ListView.separated( padding: const EdgeInsets.all(21), - itemBuilder: (cxt, index) => itemView("assets/images/pdf.svg", servicesMenuData.list[index].prompt!).onPress(() { + itemBuilder: (cxt, index) => itemView("assets/images/pdf.svg", servicesMenuData.list[index].prompt!, context).onPress(() { if (servicesMenuData.list[index].parentMenuName == "MBL_PERINFO_SS") { if (servicesMenuData.list[index].requestType == "BASIC_DETAILS") { Navigator.pushNamed(context, AppRoutes.basicDetails); @@ -63,15 +64,15 @@ class ServicesMenuListScreen extends StatelessWidget { ); } - Widget itemView(String icon, String title) { + Widget itemView(String icon, String title, context) { return Row( children: [ (title).toText16().expanded, 12.width, - SvgPicture.asset( - "assets/images/arrow_next.svg", - color: MyColors.darkIconColor, - ) + RotatedBox( + quarterTurns: AppState().isArabic(context) ? 2 : 4, + child: SvgPicture.asset("assets/images/arrow_next.svg", color: MyColors.darkIconColor), + ), ], ).objectContainerView(); } diff --git a/lib/ui/work_list/work_list_screen.dart b/lib/ui/work_list/work_list_screen.dart index c3cc9c6..aa4301c 100644 --- a/lib/ui/work_list/work_list_screen.dart +++ b/lib/ui/work_list/work_list_screen.dart @@ -34,7 +34,7 @@ class _WorkListScreenState extends State { WorkListItemTypeModelData( value: 0, name: 'HR', fullName: LocaleKeys.humanResource.tr(), active: false, color: [Color(0xff32D892), Color(0xff1AB170)], icon: "assets/images/miss_swipe.svg", key: 'HRSSA', disable: false), WorkListItemTypeModelData( - value: 0, name: 'MO', fullName: LocaleKeys.moveOrder.tr(), active: false, color: [Color(0xff58DCFA), Color(0xff3CB9D5)], icon: "assets/images/miss_swipe.svg", key: 'INVMOA', disable: false), + value: 0, name: 'MR', fullName: LocaleKeys.moveOrder.tr(), active: false, color: [Color(0xff58DCFA), Color(0xff3CB9D5)], icon: "assets/images/miss_swipe.svg", key: 'INVMOA', disable: false), WorkListItemTypeModelData( value: 0, name: 'PR', fullName: LocaleKeys.purchaseRequisition.tr(), active: false, color: [Color(0xff48EACF), Color(0xff3DCAB3)], icon: "assets/images/miss_swipe.svg", key: 'REQAPPRV', disable: false), WorkListItemTypeModelData( diff --git a/lib/ui/work_list/worklist_detail_screen.dart b/lib/ui/work_list/worklist_detail_screen.dart index db96c53..9a32d30 100644 --- a/lib/ui/work_list/worklist_detail_screen.dart +++ b/lib/ui/work_list/worklist_detail_screen.dart @@ -209,6 +209,7 @@ class _WorkListDetailScreenState extends State { workListData: workListData, itemCreationHeader: getItemCreationNtfBody?.itemCreationHeader ?? [], getStampMsNotifications: getStampMsNotifications, + getStampNsNotifications: getStampNsNotifications, getEitCollectionNotificationBodyList: getEitCollectionNotificationBodyList, getPhonesNotificationBodyList: getPhonesNotificationBodyList, getBasicDetNtfBodyList: getBasicDetNtfBodyList, @@ -222,8 +223,8 @@ class _WorkListDetailScreenState extends State { poLinesList: getPoNotificationBody?.pOLines ?? [], itemCreationLines: getItemCreationNtfBody?.itemCreationLines ?? [], ), - ActionsFragment(workListData!.nOTIFICATIONID, actionHistoryList), - AttachmentsFragment(getAttachmentList), + actionHistoryList.isEmpty ? Utils.getNoDataWidget(context) : ActionsFragment(workListData!.nOTIFICATIONID, actionHistoryList), + getAttachmentList.isEmpty ? Utils.getNoDataWidget(context) : AttachmentsFragment(getAttachmentList), ], ).expanded, if (isApproveAvailable || isRejectAvailable || isCloseAvailable) @@ -232,10 +233,7 @@ class _WorkListDetailScreenState extends State { decoration: const BoxDecoration( color: Colors.white, border: Border( - top: BorderSide( - color: MyColors.lightGreyEFColor, - width: 1.0, - ), + top: BorderSide(color: MyColors.lightGreyEFColor, width: 1.0), ), ), child: Row( @@ -244,29 +242,20 @@ class _WorkListDetailScreenState extends State { DefaultButton( LocaleKeys.reject.tr(), () => performAction("REJECTED"), - colors: const [ - Color(0xffE47A7E), - Color(0xffDE6D71), - ], + colors: const [Color(0xffE47A7E), Color(0xffDE6D71)], ).expanded, if (isApproveAvailable && isRejectAvailable) 8.width, if (isApproveAvailable) DefaultButton( LocaleKeys.approve.tr(), () => performAction("APPROVED"), - colors: const [ - Color(0xff28C884), - Color(0xff1BB271), - ], + colors: const [Color(0xff28C884), Color(0xff1BB271)], ).expanded, if (isCloseAvailable) DefaultButton( LocaleKeys.ok.tr(), () => performAction("CLOSE"), - colors: const [ - Color(0xff32D892), - Color(0xff1AB170), - ], + colors: const [Color(0xff32D892), Color(0xff1AB170)], ).expanded, 8.width, Container( From e8c8c225c7f4dfd0c737a7e11c58079f07fa34d5 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Thu, 6 Oct 2022 10:57:56 +0300 Subject: [PATCH 2/3] icon direction bug fixes --- lib/ui/landing/dashboard_screen.dart | 10 ++- .../screens/mowadhafhi/mowadhafhi_home.dart | 77 ++++++++++--------- lib/ui/work_list/work_list_screen.dart | 17 ++-- 3 files changed, 55 insertions(+), 49 deletions(-) diff --git a/lib/ui/landing/dashboard_screen.dart b/lib/ui/landing/dashboard_screen.dart index 0ddde2f..3722c11 100644 --- a/lib/ui/landing/dashboard_screen.dart +++ b/lib/ui/landing/dashboard_screen.dart @@ -18,8 +18,6 @@ import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart'; import 'package:mohem_flutter_app/ui/landing/widget/app_drawer.dart'; import 'package:mohem_flutter_app/ui/landing/widget/menus_widget.dart'; import 'package:mohem_flutter_app/ui/landing/widget/services_widget.dart'; -import 'package:mohem_flutter_app/widgets/bottom_sheet.dart'; -import 'package:mohem_flutter_app/widgets/mark_attendance_widget.dart'; import 'package:mohem_flutter_app/widgets/shimmer/dashboard_shimmer_widget.dart'; import 'package:mohem_flutter_app/widgets/shimmer/offers_shimmer_widget.dart'; import 'package:provider/provider.dart'; @@ -218,7 +216,13 @@ class _DashboardScreenState extends State { ), child: SvgPicture.asset(model.isTimeRemainingInSeconds == 0 ? "assets/images/play.svg" : "assets/images/stop.svg"), ).onPress(() { - showMyBottomSheet(context, child: MarkAttendanceWidget(model)); + if (AppState().isArabic(context)) { + context.setLocale(const Locale("en", "US")); + } else { + context.setLocale(const Locale("ar", "SA")); + } + + //showMyBottomSheet(context, child: MarkAttendanceWidget(model)); }), ], ), diff --git a/lib/ui/screens/mowadhafhi/mowadhafhi_home.dart b/lib/ui/screens/mowadhafhi/mowadhafhi_home.dart index 0002c51..da54cf7 100644 --- a/lib/ui/screens/mowadhafhi/mowadhafhi_home.dart +++ b/lib/ui/screens/mowadhafhi/mowadhafhi_home.dart @@ -2,6 +2,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:mohem_flutter_app/api/mowadhafhi/mowadhafhi_api_client.dart'; +import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/classes/utils.dart'; import 'package:mohem_flutter_app/config/routes.dart'; @@ -53,44 +54,44 @@ class _MowadhafhiHomeState extends State { body: Column( children: [ (getTicketsByEmployeeList == null - ? const SizedBox() - : (getTicketsByEmployeeList!.isEmpty) - ? Utils.getNoDataWidget(context) - : ListView.separated( - physics: const BouncingScrollPhysics(), - padding: const EdgeInsets.all(21), - itemBuilder: (BuildContext context, int index) { - return InkWell( - onTap: () { - Navigator.pushNamed(context, AppRoutes.mowadhafhiDetails, arguments: getTicketsByEmployeeList![index].ticketId); - }, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - getTicketsByEmployeeList![index].ticketTypeName!.toText14(color: MyColors.darkTextColor).expanded, - getTicketsByEmployeeList![index].created!.split(" ")[0].toText12(color: MyColors.grey70Color), - ], - ), - getTicketsByEmployeeList![index].description!.toText12(color: MyColors.grey57Color), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - getTicketsByEmployeeList![index].ticketStatusInternalName!.toText14(color: MyColors.textMixColor), - SvgPicture.asset( - "assets/images/arrow_next.svg", - color: MyColors.darkIconColor, - ) - ], - ), - ], - ).objectContainerView(), - ); - }, - separatorBuilder: (BuildContext context, int index) => 12.height, - itemCount: getTicketsByEmployeeList!.length)) + ? const SizedBox() + : (getTicketsByEmployeeList!.isEmpty) + ? Utils.getNoDataWidget(context) + : ListView.separated( + physics: const BouncingScrollPhysics(), + padding: const EdgeInsets.all(21), + itemBuilder: (BuildContext context, int index) { + return InkWell( + onTap: () { + Navigator.pushNamed(context, AppRoutes.mowadhafhiDetails, arguments: getTicketsByEmployeeList![index].ticketId); + }, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + getTicketsByEmployeeList![index].ticketTypeName!.toText14(color: MyColors.darkTextColor).expanded, + getTicketsByEmployeeList![index].created!.split(" ")[0].toText12(color: MyColors.grey70Color), + ], + ), + getTicketsByEmployeeList![index].description!.toText12(color: MyColors.grey57Color), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + getTicketsByEmployeeList![index].ticketStatusInternalName!.toText14(color: MyColors.textMixColor), + RotatedBox( + quarterTurns: AppState().isArabic(context) ? 2 : 4, + child: SvgPicture.asset("assets/images/arrow_next.svg", color: MyColors.darkIconColor), + ), + ], + ), + ], + ).objectContainerView(), + ); + }, + separatorBuilder: (BuildContext context, int index) => 12.height, + itemCount: getTicketsByEmployeeList!.length)) .expanded, DefaultButton(LocaleKeys.createRequest.tr(), () async { await Navigator.pushNamed(context, AppRoutes.mowadhafhiHRRequest); diff --git a/lib/ui/work_list/work_list_screen.dart b/lib/ui/work_list/work_list_screen.dart index aa4301c..8196abb 100644 --- a/lib/ui/work_list/work_list_screen.dart +++ b/lib/ui/work_list/work_list_screen.dart @@ -292,10 +292,10 @@ class _WorkListScreenState extends State { Row( children: [ DateUtil.formatDateToDate(DateUtil.convertStringToDate(requestDetails.modifiedDate!), false).toText10(color: MyColors.lightTextColor).expanded, - SvgPicture.asset( - "assets/images/arrow_next.svg", - color: MyColors.darkIconColor, - ) + RotatedBox( + quarterTurns: AppState().isArabic(context) ? 2:4, + child: SvgPicture.asset("assets/images/arrow_next.svg", color:MyColors.darkIconColor) + ), ], ), ], @@ -374,10 +374,11 @@ class _WorkListScreenState extends State { Row( children: [ DateUtil.formatDateToDate(DateUtil.convertSimpleStringDateToDate(workData.bEGINDATE!), false).toText10(color: MyColors.lightTextColor).expanded, - SvgPicture.asset( - "assets/images/arrow_next.svg", - color: MyColors.darkIconColor, - ) + RotatedBox( + quarterTurns: AppState().isArabic(context) ? 2:4, + child: SvgPicture.asset("assets/images/arrow_next.svg", color:MyColors.darkIconColor) + ), + ], ), ], From 6cd0c4c35817c7b23c6ab3f954287ceb65f95d4d Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Thu, 6 Oct 2022 11:12:23 +0300 Subject: [PATCH 3/3] improvement. --- lib/ui/landing/dashboard_screen.dart | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/ui/landing/dashboard_screen.dart b/lib/ui/landing/dashboard_screen.dart index 3722c11..050b78d 100644 --- a/lib/ui/landing/dashboard_screen.dart +++ b/lib/ui/landing/dashboard_screen.dart @@ -18,6 +18,8 @@ import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart'; import 'package:mohem_flutter_app/ui/landing/widget/app_drawer.dart'; import 'package:mohem_flutter_app/ui/landing/widget/menus_widget.dart'; import 'package:mohem_flutter_app/ui/landing/widget/services_widget.dart'; +import 'package:mohem_flutter_app/widgets/bottom_sheet.dart'; +import 'package:mohem_flutter_app/widgets/mark_attendance_widget.dart'; import 'package:mohem_flutter_app/widgets/shimmer/dashboard_shimmer_widget.dart'; import 'package:mohem_flutter_app/widgets/shimmer/offers_shimmer_widget.dart'; import 'package:provider/provider.dart'; @@ -216,13 +218,13 @@ class _DashboardScreenState extends State { ), child: SvgPicture.asset(model.isTimeRemainingInSeconds == 0 ? "assets/images/play.svg" : "assets/images/stop.svg"), ).onPress(() { - if (AppState().isArabic(context)) { - context.setLocale(const Locale("en", "US")); - } else { - context.setLocale(const Locale("ar", "SA")); - } + // if (AppState().isArabic(context)) { + // context.setLocale(const Locale("en", "US")); + // } else { + // context.setLocale(const Locale("ar", "SA")); + // } - //showMyBottomSheet(context, child: MarkAttendanceWidget(model)); + showMyBottomSheet(context, child: MarkAttendanceWidget(model)); }), ], ),