diff --git a/lib/dashboard_latest/dashboard_view.dart b/lib/dashboard_latest/dashboard_view.dart index 01ef9b67..149a9e24 100644 --- a/lib/dashboard_latest/dashboard_view.dart +++ b/lib/dashboard_latest/dashboard_view.dart @@ -147,7 +147,7 @@ class _DashboardViewState extends State { height: 100.toScreenHeight, decoration: BoxDecoration( shape: BoxShape.circle, - color: AppColor.white10, + color: AppColor.background(context), border: Border.all(color: AppColor.primary10.withOpacity(0.5), width: 2), ), child: Consumer(builder: (context, userProvider, child) { @@ -159,7 +159,7 @@ class _DashboardViewState extends State { 8.height, Text( ("${context.translation.checkIn}\n${userProvider.swipeTransactionModel.swipeTime != null ? SwipeGeneralUtils.instance.formatTimeOnly(userProvider.swipeTransactionModel.swipeTime!) : '--:--'}"), - style: AppTextStyles.bodyText2.copyWith(color: AppColor.white936, fontWeight: FontWeight.w500, fontFamily: "Poppins"), + style: AppTextStyles.bodyText2.copyWith(color: AppColor.textColor(context), fontWeight: FontWeight.w500, fontFamily: "Poppins"), ), ], ); diff --git a/lib/dashboard_latest/widgets/progress_fragment.dart b/lib/dashboard_latest/widgets/progress_fragment.dart index b7329fd3..f6533c91 100644 --- a/lib/dashboard_latest/widgets/progress_fragment.dart +++ b/lib/dashboard_latest/widgets/progress_fragment.dart @@ -248,7 +248,7 @@ class ProgressFragment extends StatelessWidget { showChartValuesOutside: false, decimalPlaces: 1, ), - ).toShimmer(isShow: snapshot.isAllCountLoading, radius: 250).paddingAll(0).toShadowContainer(context), + ).toShimmer(isShow: snapshot.isAllCountLoading, radius: 250,context: context).paddingAll(0).toShadowContainer(context), ], ), ), diff --git a/lib/dashboard_latest/widgets/requests_fragment.dart b/lib/dashboard_latest/widgets/requests_fragment.dart index f5cbdd1b..ba45b3f5 100644 --- a/lib/dashboard_latest/widgets/requests_fragment.dart +++ b/lib/dashboard_latest/widgets/requests_fragment.dart @@ -60,7 +60,7 @@ class RequestsFragment extends StatelessWidget { CustomBadge( value: isLoading ? 0 : value, child: Container( - child: (icon ?? "").toSvgAsset(height: 26, width: 26, color: iconColor).toShimmer(isShow: isLoading), + child: (icon ?? "").toSvgAsset(height: 26, width: 26, color: iconColor).toShimmer(isShow: isLoading,context: context), ).toShadowCircleContainer(context, padding: 17), ), 10.height, @@ -70,7 +70,7 @@ class RequestsFragment extends StatelessWidget { style: AppTextStyles.tinyFont.copyWith( color: context.isDark ? AppColor.neutral30 : AppColor.black20, ), - ).toShimmer(isShow: isLoading), + ).toShimmer(isShow: isLoading,context: context), ], ), ); diff --git a/lib/extensions/widget_extensions.dart b/lib/extensions/widget_extensions.dart index f13316a2..b9770dda 100644 --- a/lib/extensions/widget_extensions.dart +++ b/lib/extensions/widget_extensions.dart @@ -75,14 +75,15 @@ extension WidgetExtensions on Widget { child: this): this; } - Widget toShimmer({bool isShow = true, double radius = 20}) => isShow + Widget toShimmer({bool isShow = true, double radius = 20,required BuildContext context}) => isShow ? Shimmer.fromColors( - baseColor: const Color(0xffe8eff0), - highlightColor: Colors.white, + // baseColor: const Color(0xffe8eff0), + baseColor: Theme.of(context).scaffoldBackgroundColor, + highlightColor: AppColor.background(context), child: ClipRRect( borderRadius: BorderRadius.circular(radius), child: Container( - color: Colors.white, + color: AppColor.background(context), child: this, ), ), @@ -93,20 +94,21 @@ extension WidgetExtensions on Widget { ? Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const SizedBox(width: 250, height: 24).toShimmer(isShow: isShow), + const SizedBox(width: 250, height: 24).toShimmer(isShow: isShow,context: context), 8.height, - const SizedBox(width: 160, height: 16).toShimmer(isShow: isShow), + const SizedBox(width: 160, height: 16).toShimmer(isShow: isShow,context: context), 8.height, - const SizedBox(width: 120, height: 18).toShimmer(isShow: isShow).toShimmer(isShow: isShow), + const SizedBox(width: 120, height: 18).toShimmer(isShow: isShow,context: context).toShimmer(isShow: isShow,context: context), ], ).toShadowContainer(context) : this; Widget toShadowContainer(BuildContext context, - {bool showShadow = true, double borderRadius = 14, bool withShadow = true, Color? backgroundColor, Color borderColor = Colors.transparent, double padding = 16, EdgeInsets? paddingObject}) => + {bool showShadow = true, double borderRadius = 14, bool withShadow = true, Color? backgroundColor, Color borderColor = Colors.transparent, double padding = 16, EdgeInsets? paddingObject, EdgeInsets? margin,}) => withShadow ? Container( padding: paddingObject ?? EdgeInsets.all(padding), + margin: margin, width: double.infinity, decoration: ShapeDecoration( color: backgroundColor ?? AppColor.background(context), @@ -121,7 +123,8 @@ extension WidgetExtensions on Widget { clipBehavior: Clip.antiAlias, margin: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), decoration: BoxDecoration( - color: AppColor.background(context), + // color: AppColor.background(context), + color: Theme.of(context).scaffoldBackgroundColor, borderRadius: const BorderRadius.only(topRight: Radius.circular(20), topLeft: Radius.circular(20)), ), padding: padding ?? EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 8.toScreenHeight), diff --git a/lib/modules/cm_module/views/components/action_button/footer_action_button.dart b/lib/modules/cm_module/views/components/action_button/footer_action_button.dart index 9c3ed0bd..7975fe55 100644 --- a/lib/modules/cm_module/views/components/action_button/footer_action_button.dart +++ b/lib/modules/cm_module/views/components/action_button/footer_action_button.dart @@ -23,12 +23,12 @@ import 'package:test_sa/new_views/swipe_module/dialoge/acknowledge_work_dialog.d import 'package:test_sa/providers/service_request_providers/reject_reason_provider.dart'; class FooterActionButton { - static Widget footerContainer({required Widget child}) { + static Widget footerContainer({required Widget child,required BuildContext context}) { return Align( alignment: Alignment.bottomCenter, child: Container( padding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 16.toScreenHeight), - color: AppColor.white10, + color: AppColor.background(context), child: child, ), ); @@ -51,6 +51,7 @@ class FooterActionButton { switch (workOrderNextStepStatus) { case WorkOrderNextStepEnum.assignToMe: return footerContainer( + context: context, child: AppFilledButton( label: 'Assign To Me', // maxWidth: true, @@ -66,9 +67,11 @@ class FooterActionButton { case WorkOrderNextStepEnum.endWorkFlow: if (requestDetailProvider.isReadOnlyRequest) { return footerContainer( + context: context, child: AppFilledButton( label: context.translation.activities, buttonColor: AppColor.neutral50, + textColor: context.isDark ? AppColor.neutral30 : Colors.white, onPressed: () async { Navigator.push(context, MaterialPageRoute(builder: (context) => const ActivitiesListView())); }, @@ -76,6 +79,7 @@ class FooterActionButton { ); } return footerContainer( + context: context, child: AppFilledButton( label: context.translation.close, // maxWidth: true, @@ -87,9 +91,11 @@ class FooterActionButton { case WorkOrderNextStepEnum.nTakeAction: if (requestDetailProvider.isReadOnlyRequest) { return footerContainer( + context: context, child: AppFilledButton( label: context.translation.activities, - buttonColor: AppColor.neutral50, + buttonColor: context.isDark? AppColor.primary10:AppColor.neutral50, + textColor: context.isDark ? AppColor.black10 : Colors.white, onPressed: () async { Navigator.push(context, MaterialPageRoute(builder: (context) => const ActivitiesListView())); }, @@ -97,6 +103,7 @@ class FooterActionButton { ); } return footerContainer( + context: context, child: AppFilledButton( label: context.translation.close, // maxWidth: true, @@ -107,6 +114,7 @@ class FooterActionButton { )); case WorkOrderNextStepEnum.eRejectAccept: return footerContainer( + context: context, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisSize: MainAxisSize.min, @@ -114,7 +122,8 @@ class FooterActionButton { AppFilledButton( label: context.translation.reject, maxWidth: true, - buttonColor: Colors.white54, + buttonColor:AppColor.background(context), + // textColor: context.isDark ? AppColor.neutral30 : Colors.white, textColor: AppColor.red30, showBorder: true, onPressed: () async { @@ -142,6 +151,7 @@ class FooterActionButton { )); case WorkOrderNextStepEnum.eFixRemotelyNeedVisit: return footerContainer( + context: context, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisSize: MainAxisSize.min, @@ -171,6 +181,7 @@ class FooterActionButton { )); case WorkOrderNextStepEnum.eArrived: return footerContainer( + context: context, child: AppFilledButton( label: context.translation.iHaveArrived, showIcon: true, @@ -182,6 +193,7 @@ class FooterActionButton { )); case WorkOrderNextStepEnum.verifyAssetDetail: return footerContainer( + context: context, child: AppFilledButton( label: context.translation.updateAssetDetails, // maxWidth: true, @@ -192,12 +204,13 @@ class FooterActionButton { )); case WorkOrderNextStepEnum.activity: return footerContainer( + context: context, child: Column( children: [ AppFilledButton( label: context.translation.activities, - // maxWidth: true, - buttonColor: AppColor.neutral50, + textColor: context.isDark ? AppColor.black10 : Colors.white, + buttonColor: context.isDark? AppColor.primary10:AppColor.neutral50, onPressed: () async { // ServiceRequestBottomSheet.activityTypeBottomSheet(context: context); Navigator.push(context, MaterialPageRoute(builder: (context) => const ActivitiesListView())); @@ -239,22 +252,26 @@ class FooterActionButton { case WorkOrderNextStepEnum.assetRetirementManagementApproval: return footerContainer( + context: context, child: AppFilledButton( label: context.translation.assetRetiredPendingOpManagementApproval, - buttonColor: AppColor.neutral140, - textColor: AppColor.neutral150, + buttonColor: AppColor.background(context), + textColor: context.isDark ? Colors.white: AppColor.neutral150, fontSize: 12.toScreenWidth, )); case WorkOrderNextStepEnum.waitingForRequesterToConfirm: return footerContainer( + context: context, child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ AppFilledButton( label: 'Waiting for requester to verify', - buttonColor: AppColor.neutral140, - textColor: AppColor.neutral150, + buttonColor: AppColor.background(context), + textColor: context.isDark ? Colors.white: AppColor.neutral150, + // buttonColor: AppColor.neutral140, + // textColor: AppColor.neutral150, fontSize: 12.toScreenWidth, ), 12.height, @@ -290,6 +307,7 @@ class FooterActionButton { )); case WorkOrderNextStepEnum.eFixRemotely: return footerContainer( + context: context, child: AppFilledButton( label: context.translation.fixedRemotely, maxWidth: true, @@ -302,9 +320,11 @@ class FooterActionButton { ); case WorkOrderNextStepEnum.eNeedVisit: return footerContainer( + context: context, child: AppFilledButton( label: context.translation.needAVisit, maxWidth: true, + textColor: context.isDark ? AppColor.neutral30 : Colors.white, buttonColor: AppColor.neutral50, onPressed: () async { requestDetailProvider.needVisitHelperModel = NeedVisitHelperModel(); @@ -315,6 +335,7 @@ class FooterActionButton { } else { if (workOrderNextStepStatus == WorkOrderNextStepEnum.nTakeAction) { return footerContainer( + context: context, child: AppFilledButton( label: context.translation.takeAction, // maxWidth: true, @@ -326,6 +347,7 @@ class FooterActionButton { } if (workOrderNextStepStatus == WorkOrderNextStepEnum.waitingForRequesterToConfirm) { return footerContainer( + context: context, child: AppFilledButton( label: context.translation.takeAction, // maxWidth: true, diff --git a/lib/modules/cm_module/views/components/activities_list_view.dart b/lib/modules/cm_module/views/components/activities_list_view.dart index c40f5c81..883f7782 100644 --- a/lib/modules/cm_module/views/components/activities_list_view.dart +++ b/lib/modules/cm_module/views/components/activities_list_view.dart @@ -94,6 +94,7 @@ class _ActivitiesListViewState extends State { if (userProvider.user!.type == UsersTypes.engineer && (requestDetailProvider.currentWorkOrder?.data?.status?.value != 5 && requestDetailProvider.currentWorkOrder?.data?.status?.value != 3)) FooterActionButton.footerContainer( + context: context, child: AppFilledButton( label: context.translation.createNewActivity, maxWidth: true, diff --git a/lib/modules/cm_module/views/components/asset_detail_card.dart b/lib/modules/cm_module/views/components/asset_detail_card.dart index c8ac1c3b..239bfd42 100644 --- a/lib/modules/cm_module/views/components/asset_detail_card.dart +++ b/lib/modules/cm_module/views/components/asset_detail_card.dart @@ -17,95 +17,89 @@ class AssetDetailCard extends StatelessWidget { @override Widget build(BuildContext context) { return Consumer(builder: (context, ServiceRequestDetailProvider requestDetailProvider, snapshot) { - return Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(14), - color: AppColor.white10, - ), - padding: EdgeInsets.symmetric(horizontal: 12.toScreenWidth, vertical: 14.toScreenHeight), - margin: EdgeInsets.only(top: 10.toScreenHeight), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Row( - children: [ - StatusLabel( - label: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.equipmentStatus?.name, - id: requestDetailProvider.engineerUpdateWorkOrderHelperModel!.equipmentStatus!.id ?? 0, - radius: 4, - textColor: AppColor.white10, - backgroundColor: AppColor.getEquipmentStatusColor(context, requestDetailProvider.engineerUpdateWorkOrderHelperModel!.equipmentStatus!.id ?? 0), - ), - if(requestDetailProvider.engineerUpdateWorkOrderHelperModel?.cmFrameId!=null)...[ - 6.width, - StatusLabel( - label: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.cmFrameId?.name, - id: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.cmFrameId?.id ?? 0, - radius: 4, - textColor: AppColor.getActivityTypeTextColor(requestDetailProvider.engineerUpdateWorkOrderHelperModel!.cmFrameId?.name ?? ''), - backgroundColor: AppColor.getActivityTypeBgColor(requestDetailProvider.engineerUpdateWorkOrderHelperModel!.cmFrameId?.name ?? ''), - ), - ], + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ + Row( + children: [ + StatusLabel( + label: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.equipmentStatus?.name, + id: requestDetailProvider.engineerUpdateWorkOrderHelperModel!.equipmentStatus!.id ?? 0, + radius: 4, + textColor: AppColor.white10, + backgroundColor: AppColor.getEquipmentStatusColor(context, requestDetailProvider.engineerUpdateWorkOrderHelperModel!.equipmentStatus!.id ?? 0), + ), + if (requestDetailProvider.engineerUpdateWorkOrderHelperModel?.cmFrameId != null) ...[ 6.width, StatusLabel( - label: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.serviceType?.name, - id: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.serviceType?.id ?? 0, + label: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.cmFrameId?.name, + id: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.cmFrameId?.id ?? 0, radius: 4, - textColor: AppColor.getActivityTypeTextColor(requestDetailProvider.engineerUpdateWorkOrderHelperModel!.serviceType?.name ?? ''), - backgroundColor: AppColor.getActivityTypeBgColor(requestDetailProvider.engineerUpdateWorkOrderHelperModel!.serviceType?.name ?? ''), + textColor: AppColor.getActivityTypeTextColor(requestDetailProvider.engineerUpdateWorkOrderHelperModel!.cmFrameId?.name ?? ''), + backgroundColor: AppColor.getActivityTypeBgColor(requestDetailProvider.engineerUpdateWorkOrderHelperModel!.cmFrameId?.name ?? ''), ), ], - ), - //hide if status is closed or complete . - if (!requestDetailProvider.isReadOnlyRequest) - "edit_icon".toSvgAsset(height: 21, width: 21).onPress(() async { - requestDetailProvider.refreshTimer = false; - await Navigator.push(context, MaterialPageRoute(builder: (context) => VerifyAssetDetails(isEdit: true))); - requestDetailProvider.refreshTimer = true; - }), - ]), - 6.height, - Text( - "Work Order Details", - style: AppTextStyles.heading4.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), - ), - Text( - '${context.translation.returnToService}: ${requestDetailProvider.engineerUpdateWorkOrderHelperModel?.returnToService?.toAssetDetailsFormat ?? '-'}', - style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), - ), - Text( - 'EDD: ${requestDetailProvider.engineerUpdateWorkOrderHelperModel?.edd?.toAssetDetailsFormat ?? '-'}', - style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), - ), - Text( - '${context.translation.loanAvailability}: ${requestDetailProvider.engineerUpdateWorkOrderHelperModel?.loanAvailability?.name ?? '-'}', - style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), - ), - Text( - '${context.translation.failureReason}: ${requestDetailProvider.engineerUpdateWorkOrderHelperModel?.failureReason?.name ?? '-'}', - style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), + 6.width, + StatusLabel( + label: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.serviceType?.name, + id: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.serviceType?.id ?? 0, + radius: 4, + textColor: AppColor.getActivityTypeTextColor(requestDetailProvider.engineerUpdateWorkOrderHelperModel!.serviceType?.name ?? ''), + backgroundColor: AppColor.getActivityTypeBgColor(requestDetailProvider.engineerUpdateWorkOrderHelperModel!.serviceType?.name ?? ''), + ), + ], ), + //hide if status is closed or complete . + if (!requestDetailProvider.isReadOnlyRequest) + "edit_icon".toSvgAsset(height: 21, width: 21, color: context.isDark ? AppColor.primary10 : null).onPress(() async { + requestDetailProvider.refreshTimer = false; + await Navigator.push(context, MaterialPageRoute(builder: (context) => VerifyAssetDetails(isEdit: true))); + requestDetailProvider.refreshTimer = true; + }), + ]), + 6.height, + Text( + "Work Order Details", + style: AppTextStyles.heading4.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), + ), + Text( + '${context.translation.returnToService}: ${requestDetailProvider.engineerUpdateWorkOrderHelperModel?.returnToService?.toAssetDetailsFormat ?? '-'}', + style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), + ), + Text( + 'EDD: ${requestDetailProvider.engineerUpdateWorkOrderHelperModel?.edd?.toAssetDetailsFormat ?? '-'}', + style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), + ), + Text( + '${context.translation.loanAvailability}: ${requestDetailProvider.engineerUpdateWorkOrderHelperModel?.loanAvailability?.name ?? '-'}', + style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), + ), + Text( + '${context.translation.failureReason}: ${requestDetailProvider.engineerUpdateWorkOrderHelperModel?.failureReason?.name ?? '-'}', + style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), + ), + Text( + '${context.translation.faultDescription}: ${requestDetailProvider.engineerUpdateWorkOrderHelperModel?.faultDescription?.name ?? '-'}', + style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), + ), + Text( + '${context.translation.solutions}: ${requestDetailProvider.engineerUpdateWorkOrderHelperModel?.solution ?? '-'}', + style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), + ), + if (Provider.of(context, listen: false).isUserFMS) ...[ Text( - '${context.translation.faultDescription}: ${requestDetailProvider.engineerUpdateWorkOrderHelperModel?.faultDescription?.name ?? '-'}', + 'Description of Finding: ${requestDetailProvider.engineerUpdateWorkOrderHelperModel?.descriptionOfFinding ?? '-'}', style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), ), Text( - '${context.translation.solutions}: ${requestDetailProvider.engineerUpdateWorkOrderHelperModel?.solution ?? '-'}', + 'Action Taken: ${requestDetailProvider.engineerUpdateWorkOrderHelperModel?.actionTaken ?? '-'}', style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), ), - if (Provider.of(context, listen: false).isUserFMS) ...[ - Text( - 'Description of Finding: ${requestDetailProvider.engineerUpdateWorkOrderHelperModel?.descriptionOfFinding ?? '-'}', - style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), - ), - Text( - 'Action Taken: ${requestDetailProvider.engineerUpdateWorkOrderHelperModel?.actionTaken ?? '-'}', - style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), - ), - ] - ], - ), + ] + ], + ).toShadowContainer( + context, ); }); } diff --git a/lib/modules/cm_module/views/components/bottom_sheets/service_request_bottomsheet.dart b/lib/modules/cm_module/views/components/bottom_sheets/service_request_bottomsheet.dart index 7ff4f8a6..3011bc8c 100644 --- a/lib/modules/cm_module/views/components/bottom_sheets/service_request_bottomsheet.dart +++ b/lib/modules/cm_module/views/components/bottom_sheets/service_request_bottomsheet.dart @@ -385,7 +385,7 @@ class ServiceRequestBottomSheet { ], ); }, - ).toShimmer(isShow: snapshot.loading); + ).toShimmer(isShow: snapshot.loading,context: context); }); } @@ -649,7 +649,8 @@ class ServiceRequestBottomSheet { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(14), // Circular border radius ), - color: AppColor.neutral80, + // color: AppColor.neutral80, + color: AppColor.background(context), child: Row( crossAxisAlignment: CrossAxisAlignment.start, // Align items at the top children: [ @@ -668,7 +669,7 @@ class ServiceRequestBottomSheet { children: [ Text( heading, - style: AppTextStyles.heading6.copyWith(color: AppColor.neutral50), + style: AppTextStyles.heading6.copyWith(color: AppColor.textColor(context)), ), 7.height, Text( diff --git a/lib/modules/cm_module/views/components/history_log_view.dart b/lib/modules/cm_module/views/components/history_log_view.dart index 4d1073be..ddcf5c0d 100644 --- a/lib/modules/cm_module/views/components/history_log_view.dart +++ b/lib/modules/cm_module/views/components/history_log_view.dart @@ -136,8 +136,8 @@ class HistoryLogView extends StatelessWidget { ); }), ], - title.bodyText(context).custom(color: AppColor.black10), - object.timeDifference.isNotEmpty ? object.timeDifference.tinyFont(context).custom(color: context.isDark ? AppColor.neutral30 : AppColor.neutral120) : const SizedBox(), + title.bodyText(context).custom(color: AppColor.textColor(context)), + object.timeDifference.isNotEmpty ? object.timeDifference.tinyFont(context).custom(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120) : const SizedBox(), ], ), diff --git a/lib/modules/cm_module/views/components/initial_visit_card.dart b/lib/modules/cm_module/views/components/initial_visit_card.dart index 898e44a9..f957ca46 100644 --- a/lib/modules/cm_module/views/components/initial_visit_card.dart +++ b/lib/modules/cm_module/views/components/initial_visit_card.dart @@ -27,44 +27,36 @@ class _InitialVisitCardState extends State { @override Widget build(BuildContext context) { return Consumer(builder: (context, ServiceRequestDetailProvider requestDetailProvider, snapshot) { - return Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(14), - color: AppColor.white10, - ), - padding: EdgeInsets.symmetric(horizontal: 12.toScreenWidth, vertical: 14.toScreenHeight), - margin: EdgeInsets.only(top: 10.toScreenHeight), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( - requestDetailProvider.needVisitHelperModel!.visitDate != null ? requestDetailProvider.needVisitHelperModel!.visitDate.toString().toInitialVisitCardFormat : '', - textAlign: TextAlign.end, - style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.black10), - ), - Row( - children: [ - "reminder_icon".toSvgAsset(height: 21, width: 21).onPress(() { - ServiceRequestBottomSheet.getReminderTimeList(context: context); - ServiceRequestBottomSheet.initialVisitReminderBottomSheet(context: context, reminder: requestDetailProvider.currentWorkOrder?.data?.setReminder); - }), - 24.width, - "edit_icon".toSvgAsset(height: 21, width: 21).onPress(() { - ServiceRequestBottomSheet.initialVisitBottomSheet(context: context); - }), - ], - ), - ]), - 2.height, - context.translation.visitDateAndTime.bodyText2(context).custom(color: AppColor.neutral120), - 12.height, - if (requestDetailProvider.needVisitHelperModel?.comment != null) ...[ - requestDetailProvider.needVisitHelperModel!.comment!.bodyText2(context).custom(color: AppColor.neutral120), - ] - ], - ), - ); + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ + Text( + requestDetailProvider.needVisitHelperModel!.visitDate != null ? requestDetailProvider.needVisitHelperModel!.visitDate.toString().toInitialVisitCardFormat : '', + textAlign: TextAlign.end, + style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.black10), + ), + Row( + children: [ + "reminder_icon".toSvgAsset(height: 21, width: 21).onPress(() { + ServiceRequestBottomSheet.getReminderTimeList(context: context); + ServiceRequestBottomSheet.initialVisitReminderBottomSheet(context: context, reminder: requestDetailProvider.currentWorkOrder?.data?.setReminder); + }), + 24.width, + "edit_icon".toSvgAsset(height: 21, width: 21).onPress(() { + ServiceRequestBottomSheet.initialVisitBottomSheet(context: context); + }), + ], + ), + ]), + 2.height, + context.translation.visitDateAndTime.bodyText2(context).custom(color: AppColor.neutral120), + 12.height, + if (requestDetailProvider.needVisitHelperModel?.comment != null) ...[ + requestDetailProvider.needVisitHelperModel!.comment!.bodyText2(context).custom(color: AppColor.neutral120), + ] + ], + ).toShadowContainer(context,margin:const EdgeInsets.only(top: 12)); }); } } diff --git a/lib/modules/cm_module/views/components/service_request_detail_view.dart b/lib/modules/cm_module/views/components/service_request_detail_view.dart index 52ee941e..1bb4a9fb 100644 --- a/lib/modules/cm_module/views/components/service_request_detail_view.dart +++ b/lib/modules/cm_module/views/components/service_request_detail_view.dart @@ -84,6 +84,7 @@ class _ServiceRequestDetailViewState extends State { children: [ workOrderDetailCard(context, requestProvider.currentWorkOrder!.data!, _userProvider, requestProvider), initialVisitCard(requestDetailProvider: requestProvider, userProvider: _userProvider), + 12.height, assetDetailCard(requestDetailProvider: requestProvider, userProvider: _userProvider), 12.height, if (context.userProvider.user!.type == UsersTypes.engineer && @@ -506,7 +507,9 @@ class _ServiceRequestDetailViewState extends State { style: AppTextStyles.heading4.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), ).expanded, if (!provider.isReadOnlyRequest) - "edit_icon".toSvgAsset(height: 21, width: 21).onPress(() async { + "edit_icon".toSvgAsset(height: 21, width: 21, + color: context.isDark?AppColor.primary10:null + ).onPress(() async { provider.refreshTimer = false; await Navigator.push(context, MaterialPageRoute(builder: (context) => CostDetailFormScreen(isEdit: true))); provider.refreshTimer = true; diff --git a/lib/modules/cm_module/views/components/verify_arrival_view.dart b/lib/modules/cm_module/views/components/verify_arrival_view.dart index 73d171a2..aedb85d4 100644 --- a/lib/modules/cm_module/views/components/verify_arrival_view.dart +++ b/lib/modules/cm_module/views/components/verify_arrival_view.dart @@ -80,7 +80,7 @@ class _VerifyArrivalViewState extends State { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(14), // Circular border radius ), - color: Colors.white, + color: AppColor.background(context), child: Row( crossAxisAlignment: CrossAxisAlignment.center, // Align items at the top children: [ @@ -93,7 +93,7 @@ class _VerifyArrivalViewState extends State { children: [ Text( heading, - style: AppTextStyles.heading6.copyWith(color: AppColor.neutral50), + style: AppTextStyles.heading6.copyWith(color: AppColor.textColor(context)), ), 6.height, Text( diff --git a/lib/modules/cm_module/views/forms/asset_retired/asset_retired.dart b/lib/modules/cm_module/views/forms/asset_retired/asset_retired.dart index 0ef11bed..77078d60 100644 --- a/lib/modules/cm_module/views/forms/asset_retired/asset_retired.dart +++ b/lib/modules/cm_module/views/forms/asset_retired/asset_retired.dart @@ -77,7 +77,7 @@ class _AssetRetiredState extends State with TickerProviderStateMix SingleItemDropDownMenu( context: context, title: context.translation.retirementType, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showAsBottomSheet: true, height: 56.toScreenHeight, showShadow: false, @@ -115,6 +115,7 @@ class _AssetRetiredState extends State with TickerProviderStateMix ).paddingAll(16), ).expanded, FooterActionButton.footerContainer( + context: context, child: AppFilledButton( label: context.translation.submit, buttonColor: AppColor.primary10, diff --git a/lib/modules/cm_module/views/forms/asset_retired/verify_asset_detail.dart b/lib/modules/cm_module/views/forms/asset_retired/verify_asset_detail.dart index f48d0f76..b64950a3 100644 --- a/lib/modules/cm_module/views/forms/asset_retired/verify_asset_detail.dart +++ b/lib/modules/cm_module/views/forms/asset_retired/verify_asset_detail.dart @@ -134,7 +134,7 @@ class _VerifyAssetDetailsState extends State with TickerProv ADatePicker( label: context.translation.returnToService, hideShadow: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), // initialDate: DateTime.tryParse(updateAssetModel?.returnToService ?? ""), from: requestDetailProvider.currentWorkOrder?.data?.requestedDate, date: DateTime.tryParse(updateAssetModel?.returnToService ?? ""), @@ -169,7 +169,7 @@ class _VerifyAssetDetailsState extends State with TickerProv SingleItemDropDownMenu( context: context, title: "WO Frame", - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), height: 56.toScreenHeight, showShadow: false, initialValue: updateAssetModel?.cmFrameId, @@ -183,7 +183,7 @@ class _VerifyAssetDetailsState extends State with TickerProv SingleItemDropDownMenu( context: context, title: context.translation.failureReason, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), height: 56.toScreenHeight, showShadow: false, initialValue: updateAssetModel?.failureReason, @@ -197,7 +197,7 @@ class _VerifyAssetDetailsState extends State with TickerProv SingleItemDropDownMenu( context: context, title: context.translation.faultDescription, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), staticData: _faults, showShadow: false, initialValue: updateAssetModel?.faultDescription, @@ -219,7 +219,7 @@ class _VerifyAssetDetailsState extends State with TickerProv SingleItemDropDownMenu( context: context, title: context.translation.loanAvailability, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), height: 56.toScreenHeight, showShadow: false, initialValue: updateAssetModel?.loanAvailability, @@ -250,7 +250,7 @@ class _VerifyAssetDetailsState extends State with TickerProv ADatePicker( label: "EDD", hideShadow: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), // initialDate: DateTime.tryParse(updateAssetModel?.edd ?? ""), from: requestDetailProvider.currentWorkOrder?.data?.requestedDate, date: DateTime.tryParse(updateAssetModel?.edd ?? ""), @@ -284,10 +284,10 @@ class _VerifyAssetDetailsState extends State with TickerProv 12.height, AppTextFormField( labelText: context.translation.callResponse, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), initialValue: updateAssetModel?.callResponse, textAlign: TextAlign.center, - labelStyle: AppTextStyles.textFieldLabelStyle, + labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), showShadow: false, onChange: (value) { updateAssetModel?.callResponse = value; @@ -330,7 +330,7 @@ class _VerifyAssetDetailsState extends State with TickerProv ], Container( padding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 16.toScreenHeight), - color: AppColor.white10, + color: AppColor.background(context), child: AppFilledButton( label: context.translation.updateAssetDetails, buttonColor: AppColor.primary10, @@ -376,7 +376,7 @@ class _VerifyAssetDetailsState extends State with TickerProv crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ - context.translation.assetStatus.bodyText(context).custom(color: AppColor.black20), + context.translation.assetStatus.bodyText(context).custom(color: AppColor.textColor(context)), 8.height, Wrap( runSpacing: 8, @@ -408,7 +408,7 @@ class _VerifyAssetDetailsState extends State with TickerProv ], ) ], - ).toShimmer(isShow: snapshot.loading), + ).toShimmer(isShow: snapshot.loading,context: context), ], ); }); diff --git a/lib/modules/cm_module/views/forms/cost/cost_detail_form_screen.dart b/lib/modules/cm_module/views/forms/cost/cost_detail_form_screen.dart index e05bbfc4..50080d8d 100644 --- a/lib/modules/cm_module/views/forms/cost/cost_detail_form_screen.dart +++ b/lib/modules/cm_module/views/forms/cost/cost_detail_form_screen.dart @@ -86,11 +86,11 @@ class _CostDetailFormScreenState extends State with Ticker // ), // 8.height, AppTextFormField( - labelText: "Labor Cost", - backgroundColor: AppColor.neutral100, initialValue: requestDetailProvider.workOrderCostModel?.labourCost?.toString(), textAlign: TextAlign.center, - labelStyle: AppTextStyles.textFieldLabelStyle, + labelText: "Labor Cost", + backgroundColor: AppColor.fieldBgColor(context), + labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), textInputType: const TextInputType.numberWithOptions(decimal: true), showShadow: false, onChange: (value) { @@ -101,10 +101,10 @@ class _CostDetailFormScreenState extends State with Ticker 8.height, AppTextFormField( labelText: "Travel Cost", - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), + labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), initialValue: requestDetailProvider.workOrderCostModel?.travelCost?.toString(), textAlign: TextAlign.center, - labelStyle: AppTextStyles.textFieldLabelStyle, textInputType: const TextInputType.numberWithOptions(decimal: true), showShadow: false, onChange: (value) { @@ -115,10 +115,10 @@ class _CostDetailFormScreenState extends State with Ticker 8.height, AppTextFormField( labelText: "Quot Amount", - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), + labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), initialValue: requestDetailProvider.workOrderCostModel?.qAmount?.toString(), textAlign: TextAlign.center, - labelStyle: AppTextStyles.textFieldLabelStyle, textInputType: const TextInputType.numberWithOptions(decimal: true), showShadow: false, onChange: (value) { @@ -129,10 +129,10 @@ class _CostDetailFormScreenState extends State with Ticker 8.height, AppTextFormField( labelText: "PR No", - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), + labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), initialValue: requestDetailProvider.workOrderCostModel?.prNo, textAlign: TextAlign.center, - labelStyle: AppTextStyles.textFieldLabelStyle, textInputType: const TextInputType.numberWithOptions(decimal: true), showShadow: false, onChange: (value) { @@ -143,10 +143,10 @@ class _CostDetailFormScreenState extends State with Ticker 8.height, AppTextFormField( labelText: "PO No", - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), + labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), initialValue: requestDetailProvider.workOrderCostModel?.poNo, textAlign: TextAlign.center, - labelStyle: AppTextStyles.textFieldLabelStyle, textInputType: const TextInputType.numberWithOptions(decimal: true), showShadow: false, onChange: (value) { @@ -157,10 +157,10 @@ class _CostDetailFormScreenState extends State with Ticker 8.height, AppTextFormField( labelText: "MR No", - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), + labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), initialValue: requestDetailProvider.workOrderCostModel?.mrNo, textAlign: TextAlign.center, - labelStyle: AppTextStyles.textFieldLabelStyle, textInputType: const TextInputType.numberWithOptions(decimal: true), showShadow: false, onChange: (value) { @@ -171,10 +171,10 @@ class _CostDetailFormScreenState extends State with Ticker 8.height, AppTextFormField( labelText: "Exchange Cost", - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), + labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), initialValue: requestDetailProvider.workOrderCostModel?.exchangeCost != null ? requestDetailProvider.workOrderCostModel?.exchangeCost.toString() : '', textAlign: TextAlign.center, - labelStyle: AppTextStyles.textFieldLabelStyle, textInputType: const TextInputType.numberWithOptions(decimal: true), showShadow: false, onChange: (value) { @@ -187,7 +187,7 @@ class _CostDetailFormScreenState extends State with Ticker ).expanded, Container( padding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 16.toScreenHeight), - color: AppColor.white10, + color: AppColor.background(context), child: AppFilledButton( label: "Update Cost Details", buttonColor: AppColor.primary10, @@ -264,7 +264,7 @@ class _CostDetailFormScreenState extends State with Ticker ], ) ], - ).toShimmer(isShow: snapshot.loading), + ).toShimmer(isShow: snapshot.loading, context: context), ], ); }); diff --git a/lib/modules/cm_module/views/forms/maintenance_request/components/assistant_employee_list.dart b/lib/modules/cm_module/views/forms/maintenance_request/components/assistant_employee_list.dart index 3c09f7bd..1cbedee1 100644 --- a/lib/modules/cm_module/views/forms/maintenance_request/components/assistant_employee_list.dart +++ b/lib/modules/cm_module/views/forms/maintenance_request/components/assistant_employee_list.dart @@ -14,13 +14,13 @@ import 'package:test_sa/new_views/common_widgets/app_text_form_field.dart'; import 'package:test_sa/views/widgets/date_and_time/date_picker.dart'; import 'package:test_sa/views/widgets/status/report/service_report_assistant_employee_menu.dart'; -class AssistantEmployeeList extends StatefulWidget { +class ServiceRequestAssistantEmployeeList extends StatefulWidget { final List? assistantEmployeeList; final ValueChanged>? onListChanged; final double? cardPadding; final dynamic assetId; - const AssistantEmployeeList({ + const ServiceRequestAssistantEmployeeList({ super.key, this.assistantEmployeeList, this.onListChanged, @@ -29,10 +29,10 @@ class AssistantEmployeeList extends StatefulWidget { }); @override - State createState() => _AssistantEmployeeListState(); + State createState() => _ServiceRequestAssistantEmployeeListState(); } -class _AssistantEmployeeListState extends State { +class _ServiceRequestAssistantEmployeeListState extends State { late List _list; late List _controllers; @@ -80,7 +80,7 @@ class _AssistantEmployeeListState extends State { child: AppFilledButton( label: "Add Assistant Employee".addTranslation, maxWidth: true, - textColor: AppColor.black10, + textColor: AppColor.textColor(context), buttonColor: context.isDark ? AppColor.neutral60 : AppColor.white10, icon: Icon(Icons.add_circle, color: AppColor.blueStatus(context)), showIcon: true, @@ -132,7 +132,7 @@ class EmployeeCard extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - context.translation.assistantEmployee.bodyText(context).custom(color: AppColor.black20), + context.translation.assistantEmployee.bodyText(context).custom(color: AppColor.textColor(context)), if (!isReadOnly) Container( height: 32, @@ -148,7 +148,7 @@ class EmployeeCard extends StatelessWidget { children: [ ServiceReportAssistantEmployeeMenu( title: context.translation.select, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), assetId: assetId, initialValue: model.employee, onSelect: (employee) { @@ -170,7 +170,7 @@ class EmployeeCard extends StatelessWidget { ADatePicker( label: context.translation.startTime, hideShadow: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), date: model.startDate, formatDateWithTime: true, from: requestedDate, @@ -215,7 +215,7 @@ class EmployeeCard extends StatelessWidget { ADatePicker( label: context.translation.endTime, hideShadow: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), date: model.endDate, formatDateWithTime: true, from: requestedDate, @@ -261,20 +261,21 @@ class EmployeeCard extends StatelessWidget { 8.height, AppTextFormField( labelText: context.translation.workingHours, - backgroundColor: AppColor.neutral80, + backgroundColor: AppColor.fieldBgColor(context), + // backgroundColor: AppColor.neutral80, controller: workingHoursController, suffixIcon: "clock".toSvgAsset(width: 20, color: context.isDark ? AppColor.neutral10 : null).paddingOnly(end: 16), textAlign: TextAlign.center, enable: false, showShadow: false, - labelStyle: AppTextStyles.textFieldLabelStyle, + labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), style: Theme.of(context).textTheme.titleMedium, ), 8.height, AppTextFormField( initialValue: model.technicalComment, labelText: context.translation.technicalComment, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, labelStyle: AppTextStyles.textFieldLabelStyle, alignLabelWithHint: true, diff --git a/lib/modules/cm_module/views/forms/maintenance_request/components/external_request.dart b/lib/modules/cm_module/views/forms/maintenance_request/components/external_request.dart index b6843244..e6cb952d 100644 --- a/lib/modules/cm_module/views/forms/maintenance_request/components/external_request.dart +++ b/lib/modules/cm_module/views/forms/maintenance_request/components/external_request.dart @@ -60,7 +60,7 @@ class _ExternalMaintenanceRequestState extends State SingleItemDropDownMenu( context: context, title: context.translation.supplier, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), initialValue: requestDetailProvider.activityMaintenanceHelperModel?.supplier, showAsBottomSheet: true, showShadow: false, @@ -76,7 +76,7 @@ class _ExternalMaintenanceRequestState extends State children: [ SingleItemDropDownMenu( context: context, - backgroundColor: requestDetailProvider.activityMaintenanceHelperModel?.supplier?.suppliername == null ? AppColor.neutral40 : AppColor.neutral100, + backgroundColor: requestDetailProvider.activityMaintenanceHelperModel?.supplier?.suppliername == null ? context.isDark ? AppColor.neutral20 : AppColor.neutral40 : AppColor.fieldBgColor(context), title: context.translation.supplierEngineer, showShadow: false, enabled: requestDetailProvider.activityMaintenanceHelperModel?.supplier?.suppPersons?.isNotEmpty ?? false, @@ -106,7 +106,8 @@ class _ExternalMaintenanceRequestState extends State height: 56.toScreenHeight, width: 60.toScreenWidth, decoration: BoxDecoration( - color: requestDetailProvider.activityMaintenanceHelperModel?.supplier?.suppliername == null ? AppColor.neutral40 : AppColor.neutral100, + // color: requestDetailProvider.activityMaintenanceHelperModel?.supplier?.suppliername == null ? AppColor.neutral40 : AppColor.neutral100, + color: requestDetailProvider.activityMaintenanceHelperModel?.supplier?.suppliername == null ? context.isDark ? AppColor.neutral20 : AppColor.neutral40 : AppColor.fieldBgColor(context), borderRadius: BorderRadius.circular(10), //boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 10)], ), @@ -135,7 +136,7 @@ class _ExternalMaintenanceRequestState extends State ADatePicker( label: context.translation.startTime, hideShadow: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), date: requestDetailProvider.activityMaintenanceHelperModel?.supplierStartTime, from: requestDetailProvider.currentWorkOrder?.data?.requestedDate, formatDateWithTime: true, @@ -177,7 +178,7 @@ class _ExternalMaintenanceRequestState extends State ADatePicker( label: context.translation.endTime, hideShadow: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), from: requestDetailProvider.currentWorkOrder?.data?.requestedDate, to: DateTime.now(), enable: requestDetailProvider.activityMaintenanceHelperModel?.supplierStartTime != null, @@ -240,13 +241,13 @@ class _ExternalMaintenanceRequestState extends State 8.height, AppTextFormField( labelText: context.translation.workingHours, - backgroundColor: AppColor.neutral80, + backgroundColor: AppColor.fieldBgColor(context), controller: _workingHoursController, suffixIcon: "clock".toSvgAsset(width: 20, color: context.isDark ? AppColor.neutral10 : null).paddingOnly(end: 16), initialValue: requestDetailProvider.activityMaintenanceHelperModel?.supplierWorkingHour != null ? requestDetailProvider.activityMaintenanceHelperModel?.supplierWorkingHour.toString() : '', textAlign: TextAlign.center, - labelStyle: AppTextStyles.textFieldLabelStyle, + labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), enable: false, showShadow: false, style: Theme.of(context).textTheme.titleMedium, diff --git a/lib/modules/cm_module/views/forms/maintenance_request/components/internal_request.dart b/lib/modules/cm_module/views/forms/maintenance_request/components/internal_request.dart index a214591d..d65026e6 100644 --- a/lib/modules/cm_module/views/forms/maintenance_request/components/internal_request.dart +++ b/lib/modules/cm_module/views/forms/maintenance_request/components/internal_request.dart @@ -88,7 +88,8 @@ class _InternalMaintenanceRequestState extends State height: 56.toScreenHeight, title: context.translation.activityStatus, showShadow: false, - backgroundColor: AppColor.neutral100, + // backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showAsBottomSheet: true, initialValue: requestDetailProvider.activityMaintenanceHelperModel?.activityStatus, onSelect: (status) { @@ -210,7 +211,7 @@ class _InternalMaintenanceRequestState extends State padding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth), alignment: Alignment.centerLeft, decoration: BoxDecoration( - color: context.isDark ? AppColor.neutral40 : AppColor.background(context), + color: AppColor.fieldBgColor(context), borderRadius: BorderRadius.circular(10), boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 10)], ), @@ -249,7 +250,7 @@ class _InternalMaintenanceRequestState extends State AppTextFormField( labelText: context.translation.travelingHours, controller: _travellingHoursController, - backgroundColor: AppColor.neutral100, + backgroundColor:AppColor.fieldBgColor(context), showShadow: false, labelStyle: AppTextStyles.textFieldLabelStyle, suffixIcon: "clock".toSvgAsset(width: 20, color: context.isDark ? AppColor.neutral10 : null).paddingOnly(end: 16), @@ -268,7 +269,7 @@ class _InternalMaintenanceRequestState extends State 16.height, AppTextFormField( labelText: context.translation.assignedEmployee, - backgroundColor: AppColor.neutral80, + backgroundColor: AppColor.fieldBgColor(context), initialValue: requestDetailProvider.activityMaintenanceHelperModel?.assignedEmployee?.userName, textAlign: TextAlign.center, labelStyle: AppTextStyles.textFieldLabelStyle, @@ -280,7 +281,7 @@ class _InternalMaintenanceRequestState extends State AppTextFormField( initialValue: requestDetailProvider.activityMaintenanceHelperModel?.technicalComment, labelText: context.translation.technicalComment, - backgroundColor: AppColor.neutral100, + backgroundColor:AppColor.fieldBgColor(context), showShadow: false, labelStyle: AppTextStyles.textFieldLabelStyle, alignLabelWithHint: true, @@ -295,7 +296,7 @@ class _InternalMaintenanceRequestState extends State ], ), ).toShadowContainer(context).paddingOnly(start: 13, end: 14, top: 12), - AssistantEmployeeList( + ServiceRequestAssistantEmployeeList( assetId: requestDetailProvider.currentWorkOrder?.data?.asset?.id, assistantEmployeeList: requestDetailProvider.activityMaintenanceHelperModel?.assistantEmployList, onListChanged: (updatedList) { @@ -325,7 +326,7 @@ class _InternalMaintenanceRequestState extends State crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ - context.translation.repairLocation.bodyText(context).custom(color: AppColor.black20), + context.translation.repairLocation.bodyText(context).custom(color: AppColor.textColor(context)), 8.height, Wrap( runSpacing: 8, @@ -357,7 +358,7 @@ class _InternalMaintenanceRequestState extends State ], ) ], - ).toShimmer(isShow: snapshot.isLoading), + ).toShimmer(isShow: snapshot.isLoading,context: context), ], ); }); diff --git a/lib/modules/cm_module/views/forms/maintenance_request/maintenance_request_main.dart b/lib/modules/cm_module/views/forms/maintenance_request/maintenance_request_main.dart index f6397770..d344b7e9 100644 --- a/lib/modules/cm_module/views/forms/maintenance_request/maintenance_request_main.dart +++ b/lib/modules/cm_module/views/forms/maintenance_request/maintenance_request_main.dart @@ -51,7 +51,7 @@ class _MaintenanceRequestFormState extends State with Si return Consumer(builder: (context, ServiceRequestDetailProvider requestDetailProvider, child) { bool isUpdate = requestDetailProvider.activityMaintenanceHelperModel?.id != 0; return Scaffold( - backgroundColor: AppColor.neutral110, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, appBar: DefaultAppBar( title: "CM Activity", onWillPopScope: requestDetailProvider.isReadOnlyRequest @@ -104,6 +104,7 @@ class _MaintenanceRequestFormState extends State with Si ), if (!requestDetailProvider.isReadOnlyRequest) FooterActionButton.footerContainer( + context: context, child: AppFilledButton( label: requestDetailProvider.activityMaintenanceHelperModel?.id != 0 ? context.translation.update : context.translation.addActivity, // Use the dynamic label buttonColor: AppColor.primary10, diff --git a/lib/modules/cm_module/views/forms/spare_part/spare_part_request.dart b/lib/modules/cm_module/views/forms/spare_part/spare_part_request.dart index 7e3ef23a..51ef843a 100644 --- a/lib/modules/cm_module/views/forms/spare_part/spare_part_request.dart +++ b/lib/modules/cm_module/views/forms/spare_part/spare_part_request.dart @@ -309,6 +309,7 @@ class _SparePartRequestState extends State with TickerProvider ).paddingAll(12).expanded, if (!requestDetailProvider.isReadOnlyRequest) FooterActionButton.footerContainer( + context: context, child: AppFilledButton( label: _requestDetailProvider?.sparePartHelperModel?.id == 0 ? context.translation.addSparePartActivity : context.translation.updateSparePartActivity, buttonColor: AppColor.green70, diff --git a/lib/modules/cm_module/views/nurse/create_new_request_view.dart b/lib/modules/cm_module/views/nurse/create_new_request_view.dart index 4f18a203..cd727ed9 100644 --- a/lib/modules/cm_module/views/nurse/create_new_request_view.dart +++ b/lib/modules/cm_module/views/nurse/create_new_request_view.dart @@ -171,6 +171,7 @@ class _CreateNewRequestState extends State with TickerProvider ), ).expanded, FooterActionButton.footerContainer( + context: context, child: AppFilledButton( // label: context.translation.submitRequest, buttonColor: AppColor.primary10, @@ -237,7 +238,7 @@ class _CreateNewRequestState extends State with TickerProvider ], ) ], - ).toShimmer(isShow: snapshot.loading), + ).toShimmer(isShow: snapshot.loading,context: context), ], ); }); @@ -279,7 +280,7 @@ class _CreateNewRequestState extends State with TickerProvider _serviceRequest.priority = snapshot.items.firstWhere((element) => element.value == 0, orElse: null); } setState(() {}); - }).toShimmer(isShow: snapshot.loading); + }).toShimmer(isShow: snapshot.loading,context: context); }), ], ); diff --git a/lib/modules/cm_module/views/service_request_detail_main_view.dart b/lib/modules/cm_module/views/service_request_detail_main_view.dart index 294c284b..bd89910c 100644 --- a/lib/modules/cm_module/views/service_request_detail_main_view.dart +++ b/lib/modules/cm_module/views/service_request_detail_main_view.dart @@ -73,7 +73,7 @@ class _ServiceRequestDetailMainState extends State { return true; }, child: Scaffold( - backgroundColor: AppColor.neutral100, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, appBar: DefaultAppBar( title: context.translation.cmDetails, onBackPress: () { diff --git a/lib/modules/pm_module/ppm_wo/update_ppm/ppm_calibration_tools_form.dart b/lib/modules/pm_module/ppm_wo/update_ppm/ppm_calibration_tools_form.dart index e6c31afa..ad460de5 100644 --- a/lib/modules/pm_module/ppm_wo/update_ppm/ppm_calibration_tools_form.dart +++ b/lib/modules/pm_module/ppm_wo/update_ppm/ppm_calibration_tools_form.dart @@ -43,7 +43,7 @@ class _PpmCalibrationToolsFormState extends State { child: AppFilledButton( label: "Add More Calibration Tools".addTranslation, maxWidth: true, - textColor: AppColor.black10, + textColor: AppColor.headingTextColor(context), buttonColor: context.isDark ? AppColor.neutral60 : AppColor.white10, icon: Icon(Icons.add_circle, color: AppColor.blueStatus(context)), showIcon: true, @@ -107,7 +107,7 @@ class _PpmCalibrationToolsFormState extends State { label: context.translation.calibrationDate, date: DateTime.tryParse(model.calibrationDateOfTesters ?? ""), from: DateTime.now().subtract(const Duration(days: 10*365)), - backgroundColor: context.isDark ? AppColor.neutral50 : AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), withBorder: false, hideShadow: true, onDatePicker: (date) { diff --git a/lib/modules/pm_module/ppm_wo/update_ppm/ppm_external_details_form.dart b/lib/modules/pm_module/ppm_wo/update_ppm/ppm_external_details_form.dart index b689b26a..8b1be526 100644 --- a/lib/modules/pm_module/ppm_wo/update_ppm/ppm_external_details_form.dart +++ b/lib/modules/pm_module/ppm_wo/update_ppm/ppm_external_details_form.dart @@ -66,7 +66,7 @@ class _PpmExternalDetailsFormState extends State { child: AppFilledButton( label: "Add More External Details".addTranslation, maxWidth: true, - textColor: AppColor.black10, + textColor: AppColor.headingTextColor(context), buttonColor: context.isDark ? AppColor.neutral60 : AppColor.white10, icon: Icon(Icons.add_circle, color: AppColor.blueStatus(context)), showIcon: true, @@ -150,7 +150,7 @@ class _ExternalDetailItemState extends State { context: context, title: context.translation.supplier, initialValue: widget.model.supplier, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showAsBottomSheet: true, showShadow: false, showCancel: true, @@ -168,7 +168,7 @@ class _ExternalDetailItemState extends State { context: context, title: context.translation.supplierEngineer, enabled: widget.model.supplier != null, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), initialValue: widget.model.suppPerson, staticData: widget.model.supplier?.suppPersons, showAsBottomSheet: true, @@ -184,7 +184,7 @@ class _ExternalDetailItemState extends State { height: 56.toScreenHeight, width: 60.toScreenWidth, decoration: BoxDecoration( - color: AppColor.neutral100, + color: AppColor.fieldBgColor(context), borderRadius: BorderRadius.circular(10), //boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 10)], ), @@ -217,7 +217,7 @@ class _ExternalDetailItemState extends State { ADatePicker( label: context.translation.startTime, hideShadow: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), date: widget.model.startDateTime, formatDateWithTime: true, from: DateTime.tryParse(_ppmProvider?.planPreventiveVisit?.createdDate ?? ''), @@ -260,7 +260,7 @@ class _ExternalDetailItemState extends State { ADatePicker( label: context.translation.endTime, hideShadow: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), date: widget.model.endDateTime, enable: widget.model.startDateTime != null, formatDateWithTime: true, @@ -303,7 +303,7 @@ class _ExternalDetailItemState extends State { 8.height, AppTextFormField( labelText: context.translation.workingHours, - backgroundColor: AppColor.neutral80, + backgroundColor: AppColor.fieldBgColor(context), controller: controller, textAlign: TextAlign.center, enable: false, diff --git a/lib/modules/pm_module/ppm_wo/update_ppm/ppm_pm_check_list_form.dart b/lib/modules/pm_module/ppm_wo/update_ppm/ppm_pm_check_list_form.dart index 7d6e727e..9f5b0e63 100644 --- a/lib/modules/pm_module/ppm_wo/update_ppm/ppm_pm_check_list_form.dart +++ b/lib/modules/pm_module/ppm_wo/update_ppm/ppm_pm_check_list_form.dart @@ -55,6 +55,7 @@ class _PpmPmChecklistFormState extends State { ], AppTextFormField( labelText: "Task".addTranslation, + labelStyle: AppTextStyles.tinyFont.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral120, fontWeight: FontWeight.w500), initialValue: list[index].instructionText?.text ?? "", enable: false, diff --git a/lib/modules/pm_module/ppm_wo/update_ppm/ppm_pm_kits_form.dart b/lib/modules/pm_module/ppm_wo/update_ppm/ppm_pm_kits_form.dart index e7ca9f0d..a25e4d4a 100644 --- a/lib/modules/pm_module/ppm_wo/update_ppm/ppm_pm_kits_form.dart +++ b/lib/modules/pm_module/ppm_wo/update_ppm/ppm_pm_kits_form.dart @@ -40,7 +40,7 @@ class _PpmPMKitsFormState extends State { child: AppFilledButton( label: "Add More PM Kits".addTranslation, maxWidth: true, - textColor: AppColor.black10, + textColor: AppColor.headingTextColor(context), buttonColor: context.isDark ? AppColor.neutral60 : AppColor.white10, icon: Icon(Icons.add_circle, color: AppColor.blueStatus(context)), showIcon: true, diff --git a/lib/modules/pm_module/ppm_wo/update_ppm/update_ppm.dart b/lib/modules/pm_module/ppm_wo/update_ppm/update_ppm.dart index 08156206..68da0fc5 100644 --- a/lib/modules/pm_module/ppm_wo/update_ppm/update_ppm.dart +++ b/lib/modules/pm_module/ppm_wo/update_ppm/update_ppm.dart @@ -124,7 +124,7 @@ class _UpdatePpmState extends State with TickerProviderStateMixin { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColor.neutral110, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, appBar: DefaultAppBar( title: context.translation.preventiveMaintenance, onWillPopScope: ppmProvider.isReadOnly @@ -206,6 +206,7 @@ class _UpdatePpmState extends State with TickerProviderStateMixin { if (tabIndex == 1) ...[ AppFilledButton( buttonColor: _tabController!.index == 0 ? null : AppColor.background(context), + // buttonColor: _tabController!.index == 0 ? null : AppColor.background(context), textColor: _tabController!.index == 0 ? null : AppColor.blueStatus(context), showBorder: true, disableButton: _tabController!.index == 0, @@ -223,8 +224,10 @@ class _UpdatePpmState extends State with TickerProviderStateMixin { ], if (!ppmProvider.isReadOnly) ...[ AppFilledButton( - buttonColor: AppColor.white60, - textColor: AppColor.neutral50, + // buttonColor: AppColor.white60, + // textColor: AppColor.neutral50, + buttonColor: context.isDark?AppColor.neutral50:AppColor.white60, + textColor: context.isDark ? Colors.white: AppColor.neutral150, onPressed: () { _onSubmit(status: 0); }, diff --git a/lib/modules/pm_module/ppm_wo/update_ppm/wo_info_form.dart b/lib/modules/pm_module/ppm_wo/update_ppm/wo_info_form.dart index a010f25c..75a7ed6b 100644 --- a/lib/modules/pm_module/ppm_wo/update_ppm/wo_info_form.dart +++ b/lib/modules/pm_module/ppm_wo/update_ppm/wo_info_form.dart @@ -83,7 +83,7 @@ class _WoInfoFormState extends State { backgroundColor: AppColor.getRequestStatusColorByName(context, widget.planPreventiveVisit.visitStatus?.name), ), 8.height, - widget.planPreventiveVisit.planName!.bodyText(context).custom(color: AppColor.black10), + widget.planPreventiveVisit.planName!.bodyText(context).custom(color: AppColor.headingTextColor(context)), 2.height, '${context.translation.pmPlanNo}: ${widget.planPreventiveVisit.planNo}'.bodyText2(context).custom(color: AppColor.neutral120), //need to add in translation it's suggestion from ahmed.. @@ -108,7 +108,7 @@ class _WoInfoFormState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - widget.planPreventiveVisit.assetName!.bodyText(context).custom(color: AppColor.black10).expanded, + widget.planPreventiveVisit.assetName!.bodyText(context).custom(color: AppColor.headingTextColor(context)).expanded, "info_icon".toSvgAsset(height: 17, width: 17).onPress( () { // There is only limited information for asset is returned from backend to show all info need to return the whole model from backend... @@ -128,8 +128,8 @@ class _WoInfoFormState extends State { ], ), 2.height, - '${context.translation.assetNo}: ${widget.planPreventiveVisit.asset?.assetNumber}'.bodyText2(context).custom(color: AppColor.neutral120), - '${context.translation.model}: ${widget.planPreventiveVisit.model}'.bodyText2(context).custom(color: AppColor.neutral120), + '${context.translation.assetNo}: ${widget.planPreventiveVisit.asset?.assetNumber}'.bodyText2(context).custom(color: AppColor.lightTextColor(context)), + '${context.translation.model}: ${widget.planPreventiveVisit.model}'.bodyText2(context).custom(color: AppColor.lightTextColor(context)), ], ).toShadowContainer(context), @@ -173,7 +173,7 @@ class _WoInfoFormState extends State { initialValue: widget.planPreventiveVisit.taskStatus == null ? null : Lookup(name: widget.planPreventiveVisit.taskStatus?.name ?? "", id: widget.planPreventiveVisit.taskStatus?.id), title: context.translation.pmTestResult, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), onSelect: (value) { if (value != null) { widget.planPreventiveVisit.taskStatus = value; @@ -184,7 +184,7 @@ class _WoInfoFormState extends State { ADatePicker( label: context.translation.actualVisit, hideShadow: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), date: widget.planPreventiveVisit.acutalDateOfVisit, from: DateTime.tryParse(widget.planPreventiveVisit.creationDate ?? ''), formatDateWithTime: true, @@ -231,7 +231,7 @@ class _WoInfoFormState extends State { 8.height, SingleItemDropDownMenu( context: context, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, initialValue: widget.planPreventiveVisit.safety?.id == null ? null : Lookup(name: widget.planPreventiveVisit.safety?.name ?? "", id: widget.planPreventiveVisit.safety?.id), title: "Electrical Safety", @@ -244,7 +244,7 @@ class _WoInfoFormState extends State { 8.height, SingleItemDropDownMenu( context: context, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, initialValue: widget.planPreventiveVisit.assetAvailability == null ? null @@ -259,7 +259,7 @@ class _WoInfoFormState extends State { 8.height, SingleItemDropDownMenu( context: context, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, initialValue: widget.planPreventiveVisit.typeOfService == null ? null @@ -282,7 +282,7 @@ class _WoInfoFormState extends State { 8.height, AppTextFormField( labelText: context.translation.comment, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, initialValue: (widget.planPreventiveVisit.comments ?? "").toString(), textAlign: TextAlign.center, @@ -360,7 +360,7 @@ class _WoInfoFormState extends State { children: [ AppTimer( label: context.translation.workingHours, - decoration: BoxDecoration(color: AppColor.neutral100, borderRadius: BorderRadius.circular(10)), + decoration: BoxDecoration(color: AppColor.fieldBgColor(context), borderRadius: BorderRadius.circular(10)), width: double.infinity, timer: widget.planPreventiveVisit.tbsTimer, pickerTimer: widget.planPreventiveVisit.ppMTimePicker, diff --git a/lib/modules/pm_module/recurrent_wo/components/room_inspection_card.dart b/lib/modules/pm_module/recurrent_wo/components/room_inspection_card.dart index 295eff91..1bd12455 100644 --- a/lib/modules/pm_module/recurrent_wo/components/room_inspection_card.dart +++ b/lib/modules/pm_module/recurrent_wo/components/room_inspection_card.dart @@ -1,4 +1,6 @@ import 'package:flutter/material.dart'; +import 'package:test_sa/controllers/providers/api/gas_refill_comments.dart'; +import 'package:test_sa/extensions/context_extension.dart'; import 'package:test_sa/extensions/int_extensions.dart'; import 'package:test_sa/extensions/text_extensions.dart'; import 'package:test_sa/extensions/widget_extensions.dart'; @@ -28,10 +30,10 @@ class _RoomInspectionCardState extends State { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - widget.inspectionModel!.tabName!.bodyText(context).custom(color: AppColor.neutral50, fontWeight: FontWeight.w600), + widget.inspectionModel!.tabName!.bodyText(context).custom(color:AppColor.textColor(context), fontWeight: FontWeight.w600), 8.height, Container( - color: Colors.white10, + color: context.isDark?null: Colors.white10, child: Column( children: widget.inspectionModel!.planRecurrentMedicalTaskRoomTabAttributes?.asMap().entries.map((entry) { final model = entry.value; @@ -66,7 +68,7 @@ class _RoomInspectionCardState extends State { model.attribute?.name ?? '', overflow: TextOverflow.ellipsis, maxLines: 1, - style: AppTextStyles.bodyText2.copyWith(color: AppColor.white936), + style: AppTextStyles.bodyText2.copyWith(color: context.isDark?Colors.white:AppColor.white936), ), (status ? 'Pass' : 'Fail').bodyText2(context).custom(color: AppColor.neutral120, fontWeight: FontWeight.w500), ], @@ -83,7 +85,7 @@ class _RoomInspectionCardState extends State { height: 30.toScreenHeight, padding: EdgeInsetsDirectional.all(4.toScreenHeight), decoration: BoxDecoration( - color: AppColor.white80, + color: AppColor.fieldBgColor(context), borderRadius: BorderRadius.circular(5), ), child: Row( @@ -94,14 +96,14 @@ class _RoomInspectionCardState extends State { isActive: status, activeColor: AppColor.green20, inactiveColor: Colors.transparent, - textColor: status ? AppColor.green50 : AppColor.black20, + textColor: status ? AppColor.green50 : context.isDark?Colors.white: AppColor.black20, ), buildToggleOption( label: "FAIL", isActive: !status, activeColor: AppColor.red20, inactiveColor: Colors.transparent, - textColor: status ? AppColor.black20 : AppColor.red30, + textColor: status ? context.isDark?Colors.white: AppColor.black20 : AppColor.red30, ), ], ), @@ -188,14 +190,14 @@ class _RoomInspectionCardState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ - model.attribute!.name!.bodyText2(context).custom(color: AppColor.white936, fontWeight: FontWeight.w500), + model.attribute!.name!.bodyText2(context).custom(color: context.isDark?Colors.white:AppColor.white936, fontWeight: FontWeight.w500), TextFormField( keyboardType: TextInputType.number, initialValue: model.attributeValue ?? '', decoration: InputDecoration( contentPadding: EdgeInsets.symmetric(horizontal: 5.toScreenWidth), filled: true, - fillColor: AppColor.neutral100, + fillColor: AppColor.fieldBgColor(context), constraints: BoxConstraints( maxWidth: 99.toScreenWidth, maxHeight: 30.toScreenHeight, diff --git a/lib/modules/pm_module/recurrent_wo/components/room_tabs_widget.dart b/lib/modules/pm_module/recurrent_wo/components/room_tabs_widget.dart index d74ed962..b3a71ad8 100644 --- a/lib/modules/pm_module/recurrent_wo/components/room_tabs_widget.dart +++ b/lib/modules/pm_module/recurrent_wo/components/room_tabs_widget.dart @@ -67,7 +67,7 @@ class _RoomTabsWidgetState extends State { color: selectedIndex == index ? (context.isDark ? AppColor.neutral60 : AppColor.neutral110) : Colors.transparent, borderRadius: BorderRadius.circular(7), ), - child: label.bodyText(context).custom(color: AppColor.white936), + child: label.bodyText(context).custom(color:context.isDark?Colors.white: AppColor.white936), ), ); }).toList(), diff --git a/lib/modules/pm_module/recurrent_wo/components/task_info_widget.dart b/lib/modules/pm_module/recurrent_wo/components/task_info_widget.dart index 0264d52f..1871dc61 100644 --- a/lib/modules/pm_module/recurrent_wo/components/task_info_widget.dart +++ b/lib/modules/pm_module/recurrent_wo/components/task_info_widget.dart @@ -35,7 +35,7 @@ class RecurrentTaskInfoWidget extends StatelessWidget { backgroundColor: AppColor.getRequestStatusColorByName(context, model?.status?.name), ), 8.height, - model!.title!.bodyText(context).custom(color: AppColor.black10), + model!.title!.bodyText(context).custom(color: AppColor.textColor(context)), 2.height, '${context.translation.taskNo}: ${model!.taskNo!}'.bodyText2(context).custom(color: AppColor.neutral120), '${context.translation.site}: ${model!.site!.siteName!}'.bodyText2(context).custom(color: AppColor.neutral120), @@ -79,7 +79,7 @@ class RecurrentTaskInfoWidget extends StatelessWidget { width: double.infinity, enabled: snapshot.recurrentWoData?.status?.value != 1, decoration: BoxDecoration( - color: AppColor.neutral100, + color: AppColor.fieldBgColor(context), borderRadius: BorderRadius.circular(10), ), pickerTimer: model?.recurrentWoTimePicker, @@ -103,7 +103,7 @@ class RecurrentTaskInfoWidget extends StatelessWidget { 8.width, Text( ServiceRequestUtils.formatTimerDuration(totalWorkingHours.round()), - style: AppTextStyles.bodyText.copyWith(color: AppColor.neutral50, fontWeight: FontWeight.w600), + style: AppTextStyles.bodyText.copyWith(color: AppColor.textColor(context), fontWeight: FontWeight.w600), ), ], ), @@ -117,9 +117,10 @@ class RecurrentTaskInfoWidget extends StatelessWidget { return AppTextFormField( initialValue: model?.comment, labelText: context.translation.comment, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, - labelStyle: AppTextStyles.textFieldLabelStyle, + hintStyle: TextStyle(color: context.isDark?AppColor.white10:AppColor.black10), + labelStyle: TextStyle(color: context.isDark?AppColor.white10:AppColor.black10), alignLabelWithHint: true, textInputType: TextInputType.multiline, onChange: (value) { @@ -145,8 +146,8 @@ Widget buildingInfoWidget({required String label, required String? value, requir 3.height, Text( value ?? '', - style: AppTextStyles.bodyText2.copyWith(color: AppColor.black10), + style: AppTextStyles.bodyText2.copyWith(color: AppColor.textColor(context)), ) ], - ).toShadowContainer(context, backgroundColor: AppColor.neutral100, borderRadius: 10, paddingObject: EdgeInsets.all(12.toScreenHeight), showShadow: false); + ).toShadowContainer(context, backgroundColor: AppColor.background(context), borderRadius: 10, paddingObject: EdgeInsets.all(12.toScreenHeight), showShadow: false); } diff --git a/lib/modules/pm_module/recurrent_wo/recurrent_work_order_view.dart b/lib/modules/pm_module/recurrent_wo/recurrent_work_order_view.dart index 66381ccd..327f6500 100644 --- a/lib/modules/pm_module/recurrent_wo/recurrent_work_order_view.dart +++ b/lib/modules/pm_module/recurrent_wo/recurrent_work_order_view.dart @@ -79,19 +79,22 @@ class _RecurrentWorkOrderViewState extends State { ).paddingOnly(bottom: 85), if (requestProvider.recurrentWoData?.status?.value != 1) ...[ FooterActionButton.footerContainer( + context: context, + child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ AppFilledButton( label: context.translation.save, - buttonColor: AppColor.white60, - textColor: AppColor.black10, + buttonColor: context.isDark?AppColor.neutral20: AppColor.white60, + textColor: context.isDark?Colors.white: AppColor.black10, onPressed: () => _updateTask(context: context, status: 0), ).expanded, 12.width, AppFilledButton( label: context.translation.complete, buttonColor: AppColor.primary10, + // textColor: context.isDark?Colors.white: AppColor.black10, onPressed: () => _updateTask(context: context, status: 1), ).expanded, ], diff --git a/lib/modules/tm_module/tasks_wo/create_task_view.dart b/lib/modules/tm_module/tasks_wo/create_task_view.dart index 6b60eea0..f042f489 100644 --- a/lib/modules/tm_module/tasks_wo/create_task_view.dart +++ b/lib/modules/tm_module/tasks_wo/create_task_view.dart @@ -129,6 +129,7 @@ class _CreateTaskViewState extends State with TickerProviderStat ).toShadowContainer(context).paddingAll(16), ).expanded, FooterActionButton.footerContainer( + context: context, child: AppFilledButton( buttonColor: AppColor.primary10, label: context.translation.submitRequest, diff --git a/lib/modules/tm_module/tasks_wo/update_task_request_view.dart b/lib/modules/tm_module/tasks_wo/update_task_request_view.dart index 08070b76..28be6b04 100644 --- a/lib/modules/tm_module/tasks_wo/update_task_request_view.dart +++ b/lib/modules/tm_module/tasks_wo/update_task_request_view.dart @@ -126,7 +126,8 @@ class _UpdateTaskRequestState extends State { initialValue: "", labelText: context.translation.technicalComment, textInputType: TextInputType.multiline, - backgroundColor: AppColor.neutral90, + backgroundColor: AppColor.fieldBgColor(context), + labelStyle: TextStyle(color: AppColor.textColor(context)), showShadow: false, alignLabelWithHint: true, onChange: (value) { @@ -151,6 +152,7 @@ class _UpdateTaskRequestState extends State { ), ).paddingOnly(bottom: 85), FooterActionButton.footerContainer( + context: context, child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ @@ -265,7 +267,7 @@ class _UpdateTaskRequestState extends State { ADatePicker( label: context.translation.installationDate, hideShadow: true, - backgroundColor: AppColor.neutral90, + backgroundColor: AppColor.fieldBgColor(context), date: DateTime.tryParse(taskModel.installationDate ?? ""), formatDateWithTime: false, onDatePicker: (selectedDate) { @@ -291,7 +293,7 @@ class _UpdateTaskRequestState extends State { 8.height, AppTextFormField( labelText: context.translation.serialNo, - backgroundColor: AppColor.neutral90, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, labelStyle: AppTextStyles.textFieldLabelStyle, initialValue: taskModel.serialNo ?? '', @@ -307,7 +309,7 @@ class _UpdateTaskRequestState extends State { initialValue: taskModel.site, loading: _taskProvider?.isSiteLoading, showAsBottomSheet: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, enabled: false, onSelect: (value) { @@ -325,7 +327,7 @@ class _UpdateTaskRequestState extends State { SingleItemDropDownMenu( context: context, title: 'Installation Building', - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showAsBottomSheet: true, loading: _taskProvider?.isSiteLoading, showShadow: false, @@ -346,7 +348,7 @@ class _UpdateTaskRequestState extends State { SingleItemDropDownMenu( context: context, showAsBottomSheet: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), loading: _taskProvider?.isSiteLoading, showShadow: false, title: 'Installation Floor', @@ -366,7 +368,7 @@ class _UpdateTaskRequestState extends State { SingleItemDropDownMenu( context: context, title: 'Installation Department', - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), loading: _taskProvider?.isSiteLoading, showAsBottomSheet: true, showShadow: false, @@ -426,7 +428,7 @@ class _UpdateTaskRequestState extends State { height: 56.toScreenHeight, title: context.translation.completedActions, showShadow: false, - backgroundColor: AppColor.neutral90, + backgroundColor: AppColor.fieldBgColor(context), enabled: false, showAsBottomSheet: true, initialValue: taskModel.actionNeeded, @@ -441,7 +443,7 @@ class _UpdateTaskRequestState extends State { height: 56.toScreenHeight, title: context.translation.impactStatus, showShadow: false, - backgroundColor: AppColor.neutral90, + backgroundColor: AppColor.fieldBgColor(context), showAsBottomSheet: true, initialValue: taskModel.impactStatus, onSelect: (status) { @@ -465,7 +467,7 @@ class _UpdateTaskRequestState extends State { height: 56.toScreenHeight, title: context.translation.completedActions, showShadow: false, - backgroundColor: AppColor.neutral90, + backgroundColor: AppColor.fieldBgColor(context), enabled: false, showAsBottomSheet: true, initialValue: taskModel.actionNeeded, @@ -480,7 +482,7 @@ class _UpdateTaskRequestState extends State { height: 56.toScreenHeight, title: context.translation.impactStatus, showShadow: false, - backgroundColor: AppColor.neutral90, + backgroundColor: AppColor.fieldBgColor(context), showAsBottomSheet: true, initialValue: taskModel.impactStatus, onSelect: (status) { @@ -512,7 +514,7 @@ class _UpdateTaskRequestState extends State { width: double.infinity, enabled: isTimerEnable, decoration: BoxDecoration( - color: AppColor.neutral90, + color: AppColor.fieldBgColor(context), borderRadius: BorderRadius.circular(10), ), pickerTimer: taskProvider.taskRequestModel?.taskTimePicker, @@ -531,11 +533,11 @@ class _UpdateTaskRequestState extends State { crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.start, children: [ - 'Total Working Time:'.bodyText2(context).custom(color: AppColor.neutral50), + 'Total Working Time:'.bodyText2(context).custom(color: AppColor.textColor(context)), 8.width, Text( ServiceRequestUtils.formatTimerDuration(totalWorkingHours.round()), - style: AppTextStyles.bodyText.copyWith(color: AppColor.neutral50, fontWeight: FontWeight.w600), + style: AppTextStyles.bodyText.copyWith(color: AppColor.textColor(context), fontWeight: FontWeight.w600), ), ], ), @@ -632,7 +634,7 @@ class _AssistantEmployeeCardState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - context.translation.assistantEmployee.heading6(context).custom(color: AppColor.black10), + context.translation.assistantEmployee.heading6(context).custom(color: AppColor.textColor(context)), Icon(isExpanded ? Icons.keyboard_arrow_up_rounded : Icons.keyboard_arrow_down_rounded), ], ), @@ -647,7 +649,7 @@ class _AssistantEmployeeCardState extends State { children: [ ServiceReportAssistantEmployeeMenu( title: context.translation.select, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), initialValue: (taskModel?.assistantEmployees?.isNotEmpty ?? false) ? taskModel?.assistantEmployees?.first : null, onSelect: (employee) { if (employee == null) { @@ -665,7 +667,7 @@ class _AssistantEmployeeCardState extends State { ADatePicker( label: context.translation.startTime, hideShadow: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), date: taskModel?.modelAssistantEmployees?.startDate, // from: taskModel?.d, formatDateWithTime: true, @@ -705,7 +707,7 @@ class _AssistantEmployeeCardState extends State { ADatePicker( label: context.translation.endTime, hideShadow: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), date: taskModel?.modelAssistantEmployees?.endDate, enable: taskModel?.modelAssistantEmployees?.startDate != null, formatDateWithTime: true, @@ -759,12 +761,12 @@ class _AssistantEmployeeCardState extends State { 8.height, AppTextFormField( labelText: context.translation.workingHours, - backgroundColor: AppColor.neutral80, + backgroundColor: AppColor.fieldBgColor(context), controller: _workingHoursController, suffixIcon: "clock".toSvgAsset(width: 20, color: context.isDark ? AppColor.neutral10 : null).paddingOnly(end: 16), initialValue: taskModel?.modelAssistantEmployees?.workingHours != null ? taskModel!.modelAssistantEmployees!.workingHours?.toStringAsFixed(2) : '', textAlign: TextAlign.center, - labelStyle: AppTextStyles.textFieldLabelStyle, + labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), enable: false, showShadow: false, style: Theme.of(context).textTheme.titleMedium, @@ -773,9 +775,9 @@ class _AssistantEmployeeCardState extends State { AppTextFormField( initialValue: taskModel?.modelAssistantEmployees?.comment, labelText: context.translation.comment, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, - labelStyle: AppTextStyles.textFieldLabelStyle, + labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), alignLabelWithHint: true, textInputType: TextInputType.multiline, onChange: (value) { diff --git a/lib/new_views/app_style/app_color.dart b/lib/new_views/app_style/app_color.dart index 47b65712..22a12370 100644 --- a/lib/new_views/app_style/app_color.dart +++ b/lib/new_views/app_style/app_color.dart @@ -96,6 +96,11 @@ class AppColor { static Color yellowIcon(BuildContext context) => context.isDark ? const Color(0xffFFC945) : orange70; static Color background(BuildContext context) => context.isDark ? neutral60 : Colors.white; + static Color textColor(BuildContext context) =>context.isDark ? AppColor.neutral30 : AppColor.neutral50; + static Color headingTextColor(BuildContext context) =>context.isDark ? AppColor.neutral30 : AppColor.black10; + static Color lightTextColor(BuildContext context) =>AppColor.neutral120; + static Color iconColor(BuildContext context) =>context.isDark ? AppColor.neutral30 : AppColor.neutral50; + static Color fieldBgColor(BuildContext context) => context.isDark ? AppColor.neutral20 : AppColor.neutral100; static Color selectedButtonColor(BuildContext context) => context.isDark ? neutral60 : neutral30; diff --git a/lib/new_views/common_widgets/app_bottom_nav_bar.dart b/lib/new_views/common_widgets/app_bottom_nav_bar.dart index 0d4211e6..13736b36 100644 --- a/lib/new_views/common_widgets/app_bottom_nav_bar.dart +++ b/lib/new_views/common_widgets/app_bottom_nav_bar.dart @@ -33,7 +33,8 @@ class AppBottomNavigationBar extends StatelessWidget { boxShadow: [boxShadowR14], ), child: BottomNavigationBar( - backgroundColor: Colors.white, + // backgroundColor: Colors.white, + backgroundColor: AppColor.background(context), items: [ for (int i = 0; i < navItems.length; i++) navBarItem(context, index: navItems[i].index, iconName: navItems[i].iconName, label: navItems[i].label, showLabel: navItems[i].showLabel), ], diff --git a/lib/new_views/common_widgets/app_filled_button.dart b/lib/new_views/common_widgets/app_filled_button.dart index 87376c27..8e1e67f2 100644 --- a/lib/new_views/common_widgets/app_filled_button.dart +++ b/lib/new_views/common_widgets/app_filled_button.dart @@ -1,7 +1,9 @@ import 'package:flutter/material.dart'; +import 'package:test_sa/extensions/context_extension.dart'; import 'package:test_sa/extensions/int_extensions.dart'; import 'package:test_sa/extensions/text_extensions.dart'; import 'package:test_sa/extensions/widget_extensions.dart'; +import 'package:test_sa/models/new_models/gas_refill_model.dart'; import 'package:test_sa/new_views/app_style/app_color.dart'; class AppFilledButton extends StatelessWidget { @@ -43,7 +45,7 @@ class AppFilledButton extends StatelessWidget { alignment: Alignment.center, decoration: BoxDecoration( borderRadius: BorderRadius.circular(10), - color: disableButton ? AppColor.neutral140 : (buttonColor ?? AppColor.blueStatus(context)), + color: disableButton ?context.isDark ?AppColor.neutral20 :AppColor.neutral140 : (buttonColor ?? AppColor.blueStatus(context)), border: showBorder ? Border.all(color: textColor ?? AppColor.background(context)) : null, ), child: loading diff --git a/lib/new_views/common_widgets/app_text_form_field.dart b/lib/new_views/common_widgets/app_text_form_field.dart index e607c105..2434230c 100644 --- a/lib/new_views/common_widgets/app_text_form_field.dart +++ b/lib/new_views/common_widgets/app_text_form_field.dart @@ -188,7 +188,7 @@ class _AppTextFormFieldState extends State { controller: widget.controller, textInputAction: widget.textInputType == TextInputType.multiline ? null : widget.textInputAction ?? TextInputAction.next, onEditingComplete: widget.onAction ?? () => FocusScope.of(context).nextFocus(), - style: widget.style ?? AppTextStyle.body1.copyWith(fontWeight: FontWeight.w500,color: AppColor.black10), + style: widget.style ?? AppTextStyle.body1.copyWith(fontWeight: FontWeight.w500,color:context.isDark?AppColor.white10: AppColor.black10), onTap: widget.onTap, decoration: InputDecoration( alignLabelWithHint: widget.alignLabelWithHint, @@ -208,7 +208,7 @@ class _AppTextFormFieldState extends State { ? (widget.enableColor ?? AppColor.neutral40) : AppColor.background(context)), errorStyle: AppTextStyle.tiny.copyWith(color: context.isDark ? AppColor.red50 : AppColor.red60), - floatingLabelStyle: AppTextStyle.body1.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? null : AppColor.neutral20), + floatingLabelStyle: AppTextStyle.body1.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? AppColor.white10 : AppColor.neutral20), hintText: widget.hintText ?? "", labelText: (widget.showSpeechToText && _speechToText.isListening) ? "Listening..." : widget.labelText ?? "", labelStyle: widget.labelStyle, diff --git a/lib/new_views/common_widgets/single_item_drop_down_menu.dart b/lib/new_views/common_widgets/single_item_drop_down_menu.dart index e552af1c..404269fa 100644 --- a/lib/new_views/common_widgets/single_item_drop_down_menu.dart +++ b/lib/new_views/common_widgets/single_item_drop_down_menu.dart @@ -112,7 +112,7 @@ class _SingleItemDropDownMenuState { context: context, title: context.translation.gasType, initialValue: _currentDetails.gasType, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, showAsBottomSheet: true, onSelect: (value) { @@ -93,7 +93,7 @@ class _GasRefillRequestFormState extends State { context: context, title: context.translation.cylinderType, initialValue: _currentDetails.cylinderType, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, onSelect: (value) { _currentDetails.cylinderType = value; @@ -105,7 +105,7 @@ class _GasRefillRequestFormState extends State { title: context.translation.cylinderSize, initialValue: _currentDetails.cylinderSize, showAsBottomSheet: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, onSelect: (value) { _currentDetails.cylinderSize = value; @@ -118,7 +118,7 @@ class _GasRefillRequestFormState extends State { showAsBottomSheet: true, initialValue: _requestedQuantity, staticData: gasQuantity, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, onSelect: (value) { _requestedQuantity = value; @@ -133,7 +133,7 @@ class _GasRefillRequestFormState extends State { title: context.translation.site, initialValue: _gasModel.mapSite, showAsBottomSheet: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, onSelect: (value) { setState(() { @@ -152,7 +152,7 @@ class _GasRefillRequestFormState extends State { enabled: _gasModel.mapSite?.buildings?.isNotEmpty ?? false, staticData: _gasModel.mapSite?.buildings ?? [], showAsBottomSheet: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, onSelect: (value) { setState(() { @@ -174,7 +174,7 @@ class _GasRefillRequestFormState extends State { enabled: _gasModel.mappedBuilding?.floors?.isNotEmpty ?? false, staticData: _gasModel.mappedBuilding?.floors ?? [], showAsBottomSheet: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, onSelect: (value) { setState(() { @@ -191,7 +191,7 @@ class _GasRefillRequestFormState extends State { enabled: _gasModel.mappedFloor?.departments?.isNotEmpty ?? false, staticData: _gasModel.mappedFloor?.departments ?? [], showAsBottomSheet: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, onSelect: (value) { _gasModel.mappedDepartment = value; @@ -202,10 +202,10 @@ class _GasRefillRequestFormState extends State { 8.height, AppTextFormField( labelText: context.translation.callComments, - labelStyle: AppTextStyles.tinyFont.copyWith(color: AppColor.neutral120), + labelStyle: AppTextStyles.tinyFont.copyWith(color: AppColor.textColor(context)), textInputType: TextInputType.multiline, alignLabelWithHint: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, controller: _commentController, onChange: (value) { @@ -225,7 +225,7 @@ class _GasRefillRequestFormState extends State { ).toShadowContainer(context, padding: 10).paddingOnly(start: 16, end: 16, top: 16), ).expanded, 16.height, - FooterActionButton.footerContainer(child: AppFilledButton(label: context.translation.submitRequest, maxWidth: true, onPressed: _submit)), + FooterActionButton.footerContainer(context: context, child: AppFilledButton(label: context.translation.submitRequest, maxWidth: true, onPressed: _submit)), ], ), ); diff --git a/lib/new_views/pages/land_page/calender_fragments/monthly_fragment.dart b/lib/new_views/pages/land_page/calender_fragments/monthly_fragment.dart index d30c90c1..a65bf77b 100644 --- a/lib/new_views/pages/land_page/calender_fragments/monthly_fragment.dart +++ b/lib/new_views/pages/land_page/calender_fragments/monthly_fragment.dart @@ -76,10 +76,10 @@ class _MonthlyFragmentState extends State { day: day, fill: snapshot.calendarRequests?.requestsDetails?.firstWhere( (element) => (element.date != null) && (DateTime.tryParse(element.date!)?.difference(dateTime).inDays == 0), - orElse: null, + orElse: null, ) != null, - ).toShimmer(isShow: snapshot.isCalendarLoading); + ).toShimmer(isShow: snapshot.isCalendarLoading, context: context); }, ), daysOfWeekHeight: 35.toScreenHeight, diff --git a/lib/new_views/pages/land_page/create_request-type_bottomsheet.dart b/lib/new_views/pages/land_page/create_request-type_bottomsheet.dart index 89bcbcf9..ee9b70db 100644 --- a/lib/new_views/pages/land_page/create_request-type_bottomsheet.dart +++ b/lib/new_views/pages/land_page/create_request-type_bottomsheet.dart @@ -23,6 +23,7 @@ class CreateRequestTypeBottomSheet extends StatelessWidget { return Container( padding: const EdgeInsets.all(16.0), width: double.infinity, + color: AppColor.background(context), child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, @@ -63,13 +64,13 @@ class CreateRequestTypeBottomSheet extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - const Icon( + Icon( Icons.add_circle, - color: AppColor.neutral120, + color: AppColor.iconColor(context), size: 32, ), //24.height, - label.bodyText2(context).custom(color: AppColor.black20), + label.bodyText2(context).custom(color:context.isDark?Colors.white: AppColor.black20), ], ), ), diff --git a/lib/new_views/pages/login_page.dart b/lib/new_views/pages/login_page.dart index 53ac8d78..304daf92 100644 --- a/lib/new_views/pages/login_page.dart +++ b/lib/new_views/pages/login_page.dart @@ -107,11 +107,11 @@ class _LoginPageState extends State { AppTextFormField( initialValue: _user.userName ?? "", controller: userNameController, - backgroundColor: AppColor.white20, + backgroundColor: AppColor.fieldBgColor(context), validator: (value) => Validator.hasValue(value!) ? null : context.translation.requiredField, labelText: context.translation.username, - style: TextStyle(fontWeight: FontWeight.w500, fontSize: 12, color: Color(0xff3B3D4A)), - labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 11, color: Color(0xff767676)), + style: TextStyle(fontWeight: FontWeight.w500, fontSize: 12, color:context .isDark?Colors.white: const Color(0xff3B3D4A)), + labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 11, color:context .isDark?Colors.white:const Color(0xff767676)), textInputType: TextInputType.text, showWithoutDecoration: true, contentPadding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 12.toScreenHeight), @@ -124,9 +124,9 @@ class _LoginPageState extends State { initialValue: _user.password ?? "", showWithoutDecoration: true, labelText: context.translation.password, - backgroundColor: AppColor.white20, - style: TextStyle(fontWeight: FontWeight.w500, fontSize: 12, color: Color(0xff3B3D4A)), - labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 11, color: Color(0xff767676)), + backgroundColor: AppColor.fieldBgColor(context), + style: TextStyle(fontWeight: FontWeight.w500, fontSize: 12, color: context .isDark?Colors.white: const Color(0xff3B3D4A)), + labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 11, color: context .isDark?Colors.white: const Color(0xff767676)), contentPadding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 12.toScreenHeight), obscureText: !_passwordVisible, suffixIcon: Icon( diff --git a/lib/new_views/swipe_module/dialoge/acknowledge_work_dialog.dart b/lib/new_views/swipe_module/dialoge/acknowledge_work_dialog.dart index b89f22af..916d1b06 100644 --- a/lib/new_views/swipe_module/dialoge/acknowledge_work_dialog.dart +++ b/lib/new_views/swipe_module/dialoge/acknowledge_work_dialog.dart @@ -21,7 +21,7 @@ class AcknowledgeWorkDialog extends StatelessWidget { @override Widget build(BuildContext context) { return Dialog( - backgroundColor: Colors.white, + backgroundColor: AppColor.background(context), shape: const RoundedRectangleBorder(), insetPadding: const EdgeInsets.only(left: 21, right: 21), child: Padding( @@ -30,11 +30,11 @@ class AcknowledgeWorkDialog extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ - const Text( + Text( "Confirm", - style: TextStyle(fontSize: 24, fontWeight: FontWeight.w600, color: Colors.black87, height: 35 / 24, letterSpacing: -0.96), + style: TextStyle(fontSize: 24, fontWeight: FontWeight.w600, color: AppColor.headingTextColor(context), height: 35 / 24, letterSpacing: -0.96), ).paddingOnly(top: 16, bottom: 8), - message != null ? message!.heading5(context).custom(color: AppColor.neutral50) : const SizedBox(), + message != null ? message!.heading5(context).custom(color: AppColor.textColor(context)) : const SizedBox(), 28.height, Row( children: [ diff --git a/lib/views/pages/device_transfer/create__device_transfer_request.dart b/lib/views/pages/device_transfer/create__device_transfer_request.dart index 493077ce..89a7eff8 100644 --- a/lib/views/pages/device_transfer/create__device_transfer_request.dart +++ b/lib/views/pages/device_transfer/create__device_transfer_request.dart @@ -147,7 +147,7 @@ class _CreateDeviceTransferRequestState extends State { // ? (!(_model?.senderMachineStatusName?.toLowerCase()?.contains("close") ?? false) && !(_model?.senderMachineStatusName?.toLowerCase()?.contains("complete") ?? false)) // : (!(_model?.receiverMachineStatusName?.toLowerCase()?.contains("close") ?? false) && !(_model?.receiverMachineStatusName?.toLowerCase()?.contains("complete") ?? false))) // - "edit".toSvgAsset(height: 48, width: 48).onPress(() async { + "edit".toSvgAsset(height: 48, width: 48).onPress(() async { bool isReload = (await Navigator.of(context).push(MaterialPageRoute(builder: (_) => UpdateDeviceTransfer(model: _model!, isSender: isSender)))) as bool; if (isReload ?? false) { setState(() {}); diff --git a/lib/views/pages/device_transfer/update_device_transfer.dart b/lib/views/pages/device_transfer/update_device_transfer.dart index 6ad6a5df..5fc4ca0c 100644 --- a/lib/views/pages/device_transfer/update_device_transfer.dart +++ b/lib/views/pages/device_transfer/update_device_transfer.dart @@ -249,9 +249,10 @@ class _UpdateDeviceTransferState extends State { AppTextFormField( initialValue: widget.isSender ? _formModel.senderComment ?? "" : _formModel.receiverComment ?? "", labelText: context.translation.technicalComment, - labelStyle: AppTextStyles.tinyFont.copyWith(color: AppColor.neutral20), + hintStyle: AppTextStyles.tinyFont.copyWith(color: context.isDark?AppColor.white10:AppColor.black10), + labelStyle: AppTextStyles.tinyFont.copyWith(color: context.isDark?AppColor.white10:AppColor.black10), textInputType: TextInputType.multiline, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, alignLabelWithHint: true, onSaved: (value) { @@ -285,13 +286,14 @@ class _UpdateDeviceTransferState extends State { ), ).expanded, FooterActionButton.footerContainer( + context: context, child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ AppFilledButton( label: context.translation.save, - buttonColor: AppColor.white60, - textColor: AppColor.black10, + buttonColor: context.isDark?AppColor.neutral70:AppColor.white60, + textColor: context.isDark?AppColor.white10:AppColor.black10, onPressed: () => _update(status: 0), ).expanded, 12.width, @@ -341,7 +343,7 @@ class _UpdateDeviceTransferState extends State { width: double.infinity, enabled: isTimerEnable, decoration: BoxDecoration( - color: AppColor.neutral100, + color: AppColor.fieldBgColor(context), borderRadius: BorderRadius.circular(10), ), pickerTimer: _formModel.deviceTimePicker, @@ -368,7 +370,7 @@ class _UpdateDeviceTransferState extends State { 8.width, Text( ServiceRequestUtils.formatTimerDuration(totalWorkingHours.round()), - style: AppTextStyles.bodyText.copyWith(color: AppColor.neutral50, fontWeight: FontWeight.w600), + style: AppTextStyles.bodyText.copyWith(color: context.isDark?AppColor.white10: AppColor.neutral50, fontWeight: FontWeight.w600), ), ], ), @@ -443,7 +445,7 @@ class _DeviceTransferAssistantEmployeeListState extends State onUpdate((model) => model.techComment = value), diff --git a/lib/views/pages/user/gas_refill/update_gas_refill_request.dart b/lib/views/pages/user/gas_refill/update_gas_refill_request.dart index 7cb0fd61..660a996e 100644 --- a/lib/views/pages/user/gas_refill/update_gas_refill_request.dart +++ b/lib/views/pages/user/gas_refill/update_gas_refill_request.dart @@ -234,7 +234,7 @@ class _UpdateGasRefillRequestState extends State { SingleItemDropDownMenu( context: context, title: context.translation.quantity, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, showAsBottomSheet: true, initialValue: _deliveredQuantity, @@ -250,8 +250,10 @@ class _UpdateGasRefillRequestState extends State { AppTextFormField( labelText: context.translation.technicalComment, textInputType: TextInputType.multiline, + hintStyle: TextStyle(color: context.isDark?AppColor.white10:AppColor.black10), + labelStyle: TextStyle(color: context.isDark?AppColor.white10:AppColor.black10), alignLabelWithHint: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showShadow: false, controller: _commentController, onChange: (value) { @@ -272,13 +274,14 @@ class _UpdateGasRefillRequestState extends State { ).toShadowContainer(context), ).expanded, FooterActionButton.footerContainer( + context: context, child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ AppFilledButton( label: context.translation.save, - buttonColor: AppColor.white60, - textColor: AppColor.black10, + buttonColor: context.isDark?AppColor.neutral70:AppColor.white60, + textColor: context.isDark?AppColor.white10:AppColor.black10, onPressed: () => _onSubmit(context, 0), ).expanded, 12.width, @@ -315,7 +318,8 @@ class _UpdateGasRefillRequestState extends State { }, width: double.infinity, decoration: BoxDecoration( - color: AppColor.neutral100, + color: AppColor.fieldBgColor(context), + // color: AppColor.neutral100, borderRadius: BorderRadius.circular(10), ), timerProgress: (isRunning) {}, @@ -334,7 +338,7 @@ class _UpdateGasRefillRequestState extends State { 8.width, Text( ServiceRequestUtils.formatTimerDuration(totalWorkingHours.round()), - style: AppTextStyles.bodyText.copyWith(color: AppColor.neutral50, fontWeight: FontWeight.w600), + style: AppTextStyles.bodyText.copyWith(color:context.isDark?AppColor.white10: AppColor.neutral50, fontWeight: FontWeight.w600), ), ], ), diff --git a/lib/views/pages/user/profile_page.dart b/lib/views/pages/user/profile_page.dart index 3ba6fa42..8c8fe93f 100644 --- a/lib/views/pages/user/profile_page.dart +++ b/lib/views/pages/user/profile_page.dart @@ -175,7 +175,7 @@ class _ProfilePageState extends State { 16.height, AppFilledButton( label: "Update Information", - buttonColor: AppColor.neutral50, + buttonColor: context.isDark? AppColor.primary10:AppColor.neutral50, onPressed: () { showModalBottomSheet( context: context, diff --git a/lib/views/pages/user/requests/create_service_request_page.dart b/lib/views/pages/user/requests/create_service_request_page.dart index 3362b874..4bc0ef98 100644 --- a/lib/views/pages/user/requests/create_service_request_page.dart +++ b/lib/views/pages/user/requests/create_service_request_page.dart @@ -192,7 +192,7 @@ class CreateServiceRequestPageState extends State { _serviceRequest.priority = snapshot.items.firstWhere((element) => element.value == 0, orElse: null); } setState(() {}); - }).toShimmer(isShow: snapshot.loading), + }).toShimmer(isShow: snapshot.loading,context: context), ); }), ], @@ -241,7 +241,7 @@ class CreateServiceRequestPageState extends State { ], ) ], - ).toShimmer(isShow: snapshot.loading), + ).toShimmer(isShow: snapshot.loading,context: context), ], ); }), diff --git a/lib/views/pages/user/update_user_contact_info_bottomsheet.dart b/lib/views/pages/user/update_user_contact_info_bottomsheet.dart index 1f6eb1da..d04d55ba 100644 --- a/lib/views/pages/user/update_user_contact_info_bottomsheet.dart +++ b/lib/views/pages/user/update_user_contact_info_bottomsheet.dart @@ -56,7 +56,7 @@ class _UpdateUserContactInfoBottomSheetState extends State extends State> { Widget build(BuildContext context) { return Container( height: MediaQuery.of(context).size.height * .7, + color: Theme.of(context).scaffoldBackgroundColor, padding: const EdgeInsets.all(21), child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -94,6 +95,9 @@ class _SelectionBottomSheetState extends State> { decoration: InputDecoration( hintText: 'Search by name', labelText: 'Search', + labelStyle: TextStyle(color: AppColor.textColor(context)), + filled: true, + fillColor: AppColor.fieldBgColor(context), hintStyle: const TextStyle(fontSize: 14), focusedBorder: OutlineInputBorder( borderSide: BorderSide(color: AppColor.blueStatus(context), width: 2.0), @@ -112,21 +116,33 @@ class _SelectionBottomSheetState extends State> { child: ListView.builder( itemCount: filteredList?.length, padding: const EdgeInsets.only(top: 8), - itemBuilder: (cxt, index) => RadioListTile( - // Specify type for RadioListTile - value: filteredList![index], - dense: true, - contentPadding: EdgeInsets.zero, - groupValue: _selectedValue, - activeColor: Colors.black87, - onChanged: (value) { - _selectedValue = value; - searchFocusNode.unfocus(); - setState(() {}); - }, - title: Text( - widget.builderString(filteredList![index]).cleanupWhitespace.capitalizeFirstOfEach ?? "", - style: Theme.of(context).textTheme.bodyLarge, + itemBuilder: (cxt, index) => Theme( + data: Theme.of(context).copyWith( + radioTheme: RadioThemeData( + fillColor: MaterialStateColor.resolveWith((states) { + if (states.contains(MaterialState.selected)) { + return AppColor.textColor(context); // Active color + } + return Colors.grey; // Inactive color + }), + ), + ), + child: RadioListTile( + // Specify type for RadioListTile + value: filteredList![index], + dense: true, + contentPadding: EdgeInsets.zero, + groupValue: _selectedValue, + activeColor: AppColor.textColor(context), + onChanged: (value) { + _selectedValue = value; + searchFocusNode.unfocus(); + setState(() {}); + }, + title: Text( + widget.builderString(filteredList![index]).cleanupWhitespace.capitalizeFirstOfEach ?? "", + style: Theme.of(context).textTheme.bodyLarge, + ), ), ), ), diff --git a/lib/views/widgets/equipment/asset_picker.dart b/lib/views/widgets/equipment/asset_picker.dart index 8a3b35e2..a9d8e5f0 100644 --- a/lib/views/widgets/equipment/asset_picker.dart +++ b/lib/views/widgets/equipment/asset_picker.dart @@ -164,7 +164,7 @@ class AssetPicker extends StatelessWidget { color: Colors.black87, decoration: TextDecoration.none, ), - ).toShimmer(isShow: showLoading).expanded, + ).toShimmer(isShow: showLoading,context: context).expanded, const Icon( Icons.info, color: Color(0xff7D859A), @@ -195,10 +195,10 @@ class AssetPicker extends StatelessWidget { ], ), 8.height, - "${context.translation.assetNo}: ${device!.assetNumber}".bodyText2(context).toShimmer(isShow: showLoading), + "${context.translation.assetNo}: ${device!.assetNumber}".bodyText2(context).toShimmer(isShow: showLoading,context: context), 2.height, // "${context.translation.manufacture}: ${device.modelDefinition?.manufacturerName}".bodyText(context), - "${context.translation.model}: ${device!.modelDefinition?.modelName}".bodyText2(context).toShimmer(isShow: showLoading), + "${context.translation.model}: ${device!.modelDefinition?.modelName}".bodyText2(context).toShimmer(isShow: showLoading,context: context), // "${context.translation.serialNumber}: ${device.assetNumber}".bodyText(context), // const Divider().defaultStyle(context), // "${context.translation.department}: ${device.department?.departmentName}".bodyText(context), diff --git a/lib/views/widgets/fullscreen_dialogs/selection_fullscreen_dialog.dart b/lib/views/widgets/fullscreen_dialogs/selection_fullscreen_dialog.dart index 6a5f80c0..10a2b596 100644 --- a/lib/views/widgets/fullscreen_dialogs/selection_fullscreen_dialog.dart +++ b/lib/views/widgets/fullscreen_dialogs/selection_fullscreen_dialog.dart @@ -83,12 +83,15 @@ class _SelectionBottomSheetState extends State> SearchBar( focusNode: searchFocusNode, elevation: WidgetStateProperty.all(0), - leading: const Icon(Icons.search, color: AppColor.neutral50), + backgroundColor: WidgetStateProperty.all( + AppColor.fieldBgColor(context), // Your custom background color + ), + leading: Icon(Icons.search, color: AppColor.iconColor(context)), textStyle: WidgetStateProperty.all( - const TextStyle(color: AppColor.neutral50, fontSize: 16.0), + TextStyle(color: AppColor.textColor(context), fontSize: 16.0), ), hintStyle: WidgetStateProperty.all( - const TextStyle(color: AppColor.neutral20, fontSize: 14.0), + TextStyle(color: AppColor.textColor(context), fontSize: 14.0), ), hintText: 'Search by name', onChanged: (queryString) { @@ -123,22 +126,34 @@ class _SelectionBottomSheetState extends State> child: ListView.builder( itemCount: filteredList?.length, padding: EdgeInsets.zero, - itemBuilder: (cxt, index) => RadioListTile( - // Specify type for RadioListTile - value: filteredList![index], - dense: true, - contentPadding: const EdgeInsets.only(left: 16, right: 16), - groupValue: _selectedValue, - activeColor: Colors.black87, - hoverColor: Colors.transparent, - onChanged: (value) { - _selectedValue = value; - searchFocusNode.unfocus(); - setState(() {}); - }, - title: Text( - widget.builderString(filteredList![index]).cleanupWhitespace.capitalizeFirstOfEach ?? "", - style: Theme.of(context).textTheme.bodyLarge, + itemBuilder: (cxt, index) =>Theme( + data: Theme.of(context).copyWith( + radioTheme: RadioThemeData( + fillColor: MaterialStateColor.resolveWith((states) { + if (states.contains(MaterialState.selected)) { + return AppColor.iconColor(context); // Active color + } + return Colors.grey; // Inactive color + }), + ), + ), + child: RadioListTile( + // Specify type for RadioListTile + value: filteredList![index], + dense: true, + contentPadding: const EdgeInsets.only(left: 16, right: 16), + groupValue: _selectedValue, + activeColor: AppColor.iconColor(context), + hoverColor: Colors.transparent, + onChanged: (value) { + _selectedValue = value; + searchFocusNode.unfocus(); + setState(() {}); + }, + title: Text( + widget.builderString(filteredList![index]).cleanupWhitespace.capitalizeFirstOfEach ?? "", + style: Theme.of(context).textTheme.bodyLarge, + ), ), ), ), diff --git a/lib/views/widgets/notifications/notification_item.dart b/lib/views/widgets/notifications/notification_item.dart index 682deea7..89fef4b5 100644 --- a/lib/views/widgets/notifications/notification_item.dart +++ b/lib/views/widgets/notifications/notification_item.dart @@ -28,14 +28,14 @@ class NotificationItem extends StatelessWidget { label: notification.priorityName, textColor: AppColor.getRequestStatusTextColorByName(context, notification.priorityName!), backgroundColor: AppColor.getRequestStatusColorByName(context, notification.priorityName!), - ).toShimmer(isShow: isLoading), + ).toShimmer(isShow: isLoading,context: context), 8.width, if ((notification.statusName ?? "").isNotEmpty && notification.sourceName != "Asset Transfer") StatusLabel( label: notification.statusName ?? "", textColor: AppColor.getRequestStatusTextColorByName(context, notification.statusName ?? ""), backgroundColor: AppColor.getRequestStatusColorByName(context, notification.statusName ?? ""), - ).toShimmer(isShow: isLoading), + ).toShimmer(isShow: isLoading,context: context), ], ), 8.height, @@ -47,7 +47,7 @@ class NotificationItem extends StatelessWidget { style: AppTextStyles.heading6.copyWith( color: context.isDark ? AppColor.neutral30 : AppColor.neutral50, ), - ).toShimmer(isShow: isLoading).expanded, + ).toShimmer(isShow: isLoading,context: context).expanded, 8.width, Text( notification.createdOn?.toServiceRequestCardFormat ?? "", @@ -55,7 +55,7 @@ class NotificationItem extends StatelessWidget { style: AppTextStyles.tinyFont.copyWith( color: context.isDark ? AppColor.neutral20 : AppColor.neutral50, ), - ).toShimmer(isShow: isLoading), + ).toShimmer(isShow: isLoading,context: context), ], ), Text( @@ -63,7 +63,7 @@ class NotificationItem extends StatelessWidget { style: AppTextStyles.bodyText2.copyWith( color: context.isDark ? AppColor.neutral10 : const Color(0xFF757575), ), - ).toShimmer(isShow: isLoading), + ).toShimmer(isShow: isLoading,context: context), ], ).onPress(() { onPressed(notification); diff --git a/lib/views/widgets/parts/auto_complete_parts_field.dart b/lib/views/widgets/parts/auto_complete_parts_field.dart index 649d2d38..566c0b8f 100644 --- a/lib/views/widgets/parts/auto_complete_parts_field.dart +++ b/lib/views/widgets/parts/auto_complete_parts_field.dart @@ -88,11 +88,11 @@ class _AutoCompletePartsFieldState extends State { constraints: const BoxConstraints(), suffixIconConstraints: const BoxConstraints(minWidth: 0), filled: true, - fillColor: (context.isDark ? AppColor.neutral50 : AppColor.neutral100), + fillColor: AppColor.fieldBgColor(context), errorStyle: AppTextStyle.tiny.copyWith(color: context.isDark ? AppColor.red50 : AppColor.red60), floatingLabelStyle: AppTextStyle.body1.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? null : AppColor.neutral20), labelText: widget.byName ? context.translation.partName : context.translation.partNumber, - labelStyle: AppTextStyles.tinyFont.copyWith(color: AppColor.neutral120), + labelStyle: AppTextStyles.tinyFont.copyWith(color: AppColor.textColor(context)), ), textInputAction: TextInputAction.search, onChanged: (text) { diff --git a/lib/views/widgets/pentry/calibration_tool_asset_picker.dart b/lib/views/widgets/pentry/calibration_tool_asset_picker.dart index bad35478..740c6f58 100644 --- a/lib/views/widgets/pentry/calibration_tool_asset_picker.dart +++ b/lib/views/widgets/pentry/calibration_tool_asset_picker.dart @@ -64,7 +64,7 @@ class _CalibrationToolAssetPickerState extends State PickAsset( showAssetInfo: false, forPPM: true, - cardColor: AppColor.neutral100, + cardColor: AppColor.fieldBgColor(context), device: widget.initialValue == null ? null : Asset( diff --git a/lib/views/widgets/timer/app_timer.dart b/lib/views/widgets/timer/app_timer.dart index 090f6913..93270c9e 100644 --- a/lib/views/widgets/timer/app_timer.dart +++ b/lib/views/widgets/timer/app_timer.dart @@ -162,7 +162,7 @@ class _AppTimerState extends State { ADatePicker( label: context.translation.startTime, hideShadow: true, - backgroundColor: AppColor.neutral100, + backgroundColor: context.isDark ? AppColor.neutral20 : AppColor.neutral90, date: _pickerStartAt, from: widget.pickerFromDate, enable: widget.enabled ? _tempPickerTimer == null : false, @@ -195,7 +195,7 @@ class _AppTimerState extends State { ADatePicker( label: context.translation.endTime, hideShadow: true, - backgroundColor: AppColor.neutral100, + backgroundColor: context.isDark ? AppColor.neutral20 : AppColor.neutral90, enable: widget.enabled ? _pickerStartAt != null : false, from: _pickerStartAt, date: _pickerEndAt, @@ -256,8 +256,9 @@ class _AppTimerState extends State { color: context.isDark && !widget.enabled ? AppColor.neutral60 : !widget.enabled + // backgroundColor: context.isDark ? AppColor.neutral20 : AppColor.neutral90, ? AppColor.neutral40 - : AppColor.background(context), + : AppColor.fieldBgColor(context), borderRadius: BorderRadius.circular(10), boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 10)], ), @@ -355,7 +356,7 @@ class _AppTimerState extends State { // ADatePicker( // label: context.translation.startTime, // hideShadow: true, -// backgroundColor: AppColor.neutral100, +// backgroundColor: context.isDark ? AppColor.neutral20 : AppColor.neutral90, // date: _pickerStartAt, // enable: _tempPickerTimer == null, // formatDateWithTime: true, @@ -375,7 +376,7 @@ class _AppTimerState extends State { // ADatePicker( // label: context.translation.endTime, // hideShadow: true, -// backgroundColor: AppColor.neutral100, +// backgroundColor: context.isDark ? AppColor.neutral20 : AppColor.neutral90, // enable: _pickerStartAt != null, // date: _pickerEndAt, // formatDateWithTime: true,