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 448ff6ba..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 @@ -94,8 +94,8 @@ class FooterActionButton { context: context, child: AppFilledButton( label: context.translation.activities, - buttonColor: AppColor.neutral50, - textColor: context.isDark ? AppColor.neutral30 : Colors.white, + buttonColor: context.isDark? AppColor.primary10:AppColor.neutral50, + textColor: context.isDark ? AppColor.black10 : Colors.white, onPressed: () async { Navigator.push(context, MaterialPageRoute(builder: (context) => const ActivitiesListView())); }, @@ -209,9 +209,8 @@ class FooterActionButton { children: [ AppFilledButton( label: context.translation.activities, - // maxWidth: true, - textColor: context.isDark ? AppColor.neutral30 : Colors.white, - 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())); 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 ae9b888b..239bfd42 100644 --- a/lib/modules/cm_module/views/components/asset_detail_card.dart +++ b/lib/modules/cm_module/views/components/asset_detail_card.dart @@ -30,7 +30,7 @@ class AssetDetailCard extends StatelessWidget { textColor: AppColor.white10, backgroundColor: AppColor.getEquipmentStatusColor(context, requestDetailProvider.engineerUpdateWorkOrderHelperModel!.equipmentStatus!.id ?? 0), ), - if(requestDetailProvider.engineerUpdateWorkOrderHelperModel?.cmFrameId!=null)...[ + if (requestDetailProvider.engineerUpdateWorkOrderHelperModel?.cmFrameId != null) ...[ 6.width, StatusLabel( label: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.cmFrameId?.name, @@ -52,7 +52,7 @@ class AssetDetailCard extends StatelessWidget { ), //hide if status is closed or complete . if (!requestDetailProvider.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 { requestDetailProvider.refreshTimer = false; await Navigator.push(context, MaterialPageRoute(builder: (context) => VerifyAssetDetails(isEdit: true))); requestDetailProvider.refreshTimer = true; @@ -98,7 +98,9 @@ class AssetDetailCard extends StatelessWidget { ), ] ], - ).toShadowContainer(context,); + ).toShadowContainer( + context, + ); }); } } 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 38e619ab..42e2e03f 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 @@ -497,6 +497,7 @@ class _ServiceRequestDetailViewState extends State { ).expanded, if (!provider.isReadOnlyRequest) "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))); 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 4ede727b..5ecdc2f2 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 @@ -75,7 +75,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, 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 197c85cd..1fd163e2 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 @@ -131,7 +131,7 @@ class _VerifyAssetDetailsState extends State with TickerProv ADatePicker( label: context.translation.returnToService, hideShadow: true, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), // initialDate: DateTime.tryParse(requestDetailProvider.engineerUpdateWorkOrderHelperModel?.returnToService ?? ""), from: requestDetailProvider.currentWorkOrder?.data?.requestedDate, date: DateTime.tryParse(requestDetailProvider.engineerUpdateWorkOrderHelperModel?.returnToService ?? ""), @@ -167,7 +167,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: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.cmFrameId, @@ -181,7 +181,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: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.failureReason, @@ -195,7 +195,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: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.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: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.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(requestDetailProvider.engineerUpdateWorkOrderHelperModel?.edd ?? ""), from: requestDetailProvider.currentWorkOrder?.data?.requestedDate, date: DateTime.tryParse(requestDetailProvider.engineerUpdateWorkOrderHelperModel?.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: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.callResponse, textAlign: TextAlign.center, - labelStyle: AppTextStyles.textFieldLabelStyle, + labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), showShadow: false, onChange: (value) { requestDetailProvider.engineerUpdateWorkOrderHelperModel?.callResponse = value; @@ -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, 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 7bf990d5..4dd0fe54 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: TextInputType.text, showShadow: false, onChange: (value) { @@ -171,10 +171,10 @@ class _CostDetailFormScreenState extends State with Ticker 8.height, AppTextFormField( labelText: "Exchange Cost", - backgroundColor: AppColor.neutral100, - initialValue: requestDetailProvider.workOrderCostModel?.exchangeCost!=null?requestDetailProvider.workOrderCostModel?.exchangeCost.toString():'', + 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,context: context), + ).toShimmer(isShow: snapshot.loading, context: context), ], ); }); 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 45d485a0..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 @@ -86,14 +86,15 @@ class _RecurrentWorkOrderViewState extends State { 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/views/pages/device_transfer/device_transfer_details.dart b/lib/views/pages/device_transfer/device_transfer_details.dart index 20a9acb8..1f857949 100644 --- a/lib/views/pages/device_transfer/device_transfer_details.dart +++ b/lib/views/pages/device_transfer/device_transfer_details.dart @@ -273,7 +273,7 @@ class _DeviceTransferDetailsState 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 7df1aa63..61a7041c 100644 --- a/lib/views/pages/device_transfer/update_device_transfer.dart +++ b/lib/views/pages/device_transfer/update_device_transfer.dart @@ -252,7 +252,8 @@ 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.fieldBgColor(context), showShadow: false, 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/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,8 +95,9 @@ class _SelectionBottomSheetState extends State> { decoration: InputDecoration( hintText: 'Search by name', labelText: 'Search', + labelStyle: TextStyle(color: AppColor.textColor(context)), filled: true, - focusColor: AppColor.fieldBgColor(context), + fillColor: AppColor.fieldBgColor(context), hintStyle: const TextStyle(fontSize: 14), focusedBorder: OutlineInputBorder( borderSide: BorderSide(color: AppColor.blueStatus(context), width: 2.0), @@ -114,22 +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/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, + ), ), ), ),