dark mode fixes

design_3.0_dark_mode
WaseemAbbasi22 3 months ago
parent 0f7a8e0955
commit 8d9aacb870

@ -94,8 +94,8 @@ class FooterActionButton {
context: context, context: context,
child: AppFilledButton( child: AppFilledButton(
label: context.translation.activities, label: context.translation.activities,
buttonColor: AppColor.neutral50, buttonColor: context.isDark? AppColor.primary10:AppColor.neutral50,
textColor: context.isDark ? AppColor.neutral30 : Colors.white, textColor: context.isDark ? AppColor.black10 : Colors.white,
onPressed: () async { onPressed: () async {
Navigator.push(context, MaterialPageRoute(builder: (context) => const ActivitiesListView())); Navigator.push(context, MaterialPageRoute(builder: (context) => const ActivitiesListView()));
}, },
@ -209,9 +209,8 @@ class FooterActionButton {
children: [ children: [
AppFilledButton( AppFilledButton(
label: context.translation.activities, label: context.translation.activities,
// maxWidth: true, textColor: context.isDark ? AppColor.black10 : Colors.white,
textColor: context.isDark ? AppColor.neutral30 : Colors.white, buttonColor: context.isDark? AppColor.primary10:AppColor.neutral50,
buttonColor: AppColor.neutral50,
onPressed: () async { onPressed: () async {
// ServiceRequestBottomSheet.activityTypeBottomSheet(context: context); // ServiceRequestBottomSheet.activityTypeBottomSheet(context: context);
Navigator.push(context, MaterialPageRoute(builder: (context) => const ActivitiesListView())); Navigator.push(context, MaterialPageRoute(builder: (context) => const ActivitiesListView()));

@ -52,7 +52,7 @@ class AssetDetailCard extends StatelessWidget {
), ),
//hide if status is closed or complete . //hide if status is closed or complete .
if (!requestDetailProvider.isReadOnlyRequest) 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; requestDetailProvider.refreshTimer = false;
await Navigator.push(context, MaterialPageRoute(builder: (context) => VerifyAssetDetails(isEdit: true))); await Navigator.push(context, MaterialPageRoute(builder: (context) => VerifyAssetDetails(isEdit: true)));
requestDetailProvider.refreshTimer = true; requestDetailProvider.refreshTimer = true;
@ -98,7 +98,9 @@ class AssetDetailCard extends StatelessWidget {
), ),
] ]
], ],
).toShadowContainer(context,); ).toShadowContainer(
context,
);
}); });
} }
} }

@ -497,6 +497,7 @@ class _ServiceRequestDetailViewState extends State<ServiceRequestDetailView> {
).expanded, ).expanded,
if (!provider.isReadOnlyRequest) if (!provider.isReadOnlyRequest)
"edit_icon".toSvgAsset(height: 21, width: 21, "edit_icon".toSvgAsset(height: 21, width: 21,
color: context.isDark?AppColor.primary10:null
).onPress(() async { ).onPress(() async {
provider.refreshTimer = false; provider.refreshTimer = false;
await Navigator.push(context, MaterialPageRoute(builder: (context) => CostDetailFormScreen(isEdit: true))); await Navigator.push(context, MaterialPageRoute(builder: (context) => CostDetailFormScreen(isEdit: true)));

@ -75,7 +75,7 @@ class _AssetRetiredState extends State<AssetRetired> with TickerProviderStateMix
SingleItemDropDownMenu<Lookup, RetirementTypeProvider>( SingleItemDropDownMenu<Lookup, RetirementTypeProvider>(
context: context, context: context,
title: context.translation.retirementType, title: context.translation.retirementType,
backgroundColor: AppColor.neutral100, backgroundColor: AppColor.fieldBgColor(context),
showAsBottomSheet: true, showAsBottomSheet: true,
height: 56.toScreenHeight, height: 56.toScreenHeight,
showShadow: false, showShadow: false,

@ -131,7 +131,7 @@ class _VerifyAssetDetailsState extends State<VerifyAssetDetails> with TickerProv
ADatePicker( ADatePicker(
label: context.translation.returnToService, label: context.translation.returnToService,
hideShadow: true, hideShadow: true,
backgroundColor: AppColor.neutral100, backgroundColor: AppColor.fieldBgColor(context),
// initialDate: DateTime.tryParse(requestDetailProvider.engineerUpdateWorkOrderHelperModel?.returnToService ?? ""), // initialDate: DateTime.tryParse(requestDetailProvider.engineerUpdateWorkOrderHelperModel?.returnToService ?? ""),
from: requestDetailProvider.currentWorkOrder?.data?.requestedDate, from: requestDetailProvider.currentWorkOrder?.data?.requestedDate,
date: DateTime.tryParse(requestDetailProvider.engineerUpdateWorkOrderHelperModel?.returnToService ?? ""), date: DateTime.tryParse(requestDetailProvider.engineerUpdateWorkOrderHelperModel?.returnToService ?? ""),
@ -167,7 +167,7 @@ class _VerifyAssetDetailsState extends State<VerifyAssetDetails> with TickerProv
SingleItemDropDownMenu<Lookup, WoFrameProvider>( SingleItemDropDownMenu<Lookup, WoFrameProvider>(
context: context, context: context,
title: "WO Frame", title: "WO Frame",
backgroundColor: AppColor.neutral100, backgroundColor: AppColor.fieldBgColor(context),
height: 56.toScreenHeight, height: 56.toScreenHeight,
showShadow: false, showShadow: false,
initialValue: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.cmFrameId, initialValue: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.cmFrameId,
@ -181,7 +181,7 @@ class _VerifyAssetDetailsState extends State<VerifyAssetDetails> with TickerProv
SingleItemDropDownMenu<Lookup, ReasonProvider>( SingleItemDropDownMenu<Lookup, ReasonProvider>(
context: context, context: context,
title: context.translation.failureReason, title: context.translation.failureReason,
backgroundColor: AppColor.neutral100, backgroundColor: AppColor.fieldBgColor(context),
height: 56.toScreenHeight, height: 56.toScreenHeight,
showShadow: false, showShadow: false,
initialValue: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.failureReason, initialValue: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.failureReason,
@ -195,7 +195,7 @@ class _VerifyAssetDetailsState extends State<VerifyAssetDetails> with TickerProv
SingleItemDropDownMenu<FaultDescription, NullableLoadingProvider>( SingleItemDropDownMenu<FaultDescription, NullableLoadingProvider>(
context: context, context: context,
title: context.translation.faultDescription, title: context.translation.faultDescription,
backgroundColor: AppColor.neutral100, backgroundColor: AppColor.fieldBgColor(context),
staticData: _faults, staticData: _faults,
showShadow: false, showShadow: false,
initialValue: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.faultDescription, initialValue: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.faultDescription,
@ -219,7 +219,7 @@ class _VerifyAssetDetailsState extends State<VerifyAssetDetails> with TickerProv
SingleItemDropDownMenu<Lookup, LoanAvailabilityProvider>( SingleItemDropDownMenu<Lookup, LoanAvailabilityProvider>(
context: context, context: context,
title: context.translation.loanAvailability, title: context.translation.loanAvailability,
backgroundColor: AppColor.neutral100, backgroundColor: AppColor.fieldBgColor(context),
height: 56.toScreenHeight, height: 56.toScreenHeight,
showShadow: false, showShadow: false,
initialValue: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.loanAvailability, initialValue: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.loanAvailability,
@ -250,7 +250,7 @@ class _VerifyAssetDetailsState extends State<VerifyAssetDetails> with TickerProv
ADatePicker( ADatePicker(
label: "EDD", label: "EDD",
hideShadow: true, hideShadow: true,
backgroundColor: AppColor.neutral100, backgroundColor: AppColor.fieldBgColor(context),
// initialDate: DateTime.tryParse(requestDetailProvider.engineerUpdateWorkOrderHelperModel?.edd ?? ""), // initialDate: DateTime.tryParse(requestDetailProvider.engineerUpdateWorkOrderHelperModel?.edd ?? ""),
from: requestDetailProvider.currentWorkOrder?.data?.requestedDate, from: requestDetailProvider.currentWorkOrder?.data?.requestedDate,
date: DateTime.tryParse(requestDetailProvider.engineerUpdateWorkOrderHelperModel?.edd ?? ""), date: DateTime.tryParse(requestDetailProvider.engineerUpdateWorkOrderHelperModel?.edd ?? ""),
@ -284,10 +284,10 @@ class _VerifyAssetDetailsState extends State<VerifyAssetDetails> with TickerProv
12.height, 12.height,
AppTextFormField( AppTextFormField(
labelText: context.translation.callResponse, labelText: context.translation.callResponse,
backgroundColor: AppColor.neutral100, backgroundColor: AppColor.fieldBgColor(context),
initialValue: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.callResponse, initialValue: requestDetailProvider.engineerUpdateWorkOrderHelperModel?.callResponse,
textAlign: TextAlign.center, textAlign: TextAlign.center,
labelStyle: AppTextStyles.textFieldLabelStyle, labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)),
showShadow: false, showShadow: false,
onChange: (value) { onChange: (value) {
requestDetailProvider.engineerUpdateWorkOrderHelperModel?.callResponse = value; requestDetailProvider.engineerUpdateWorkOrderHelperModel?.callResponse = value;
@ -376,7 +376,7 @@ class _VerifyAssetDetailsState extends State<VerifyAssetDetails> with TickerProv
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
context.translation.assetStatus.bodyText(context).custom(color: AppColor.black20), context.translation.assetStatus.bodyText(context).custom(color: AppColor.textColor(context)),
8.height, 8.height,
Wrap( Wrap(
runSpacing: 8, runSpacing: 8,

@ -86,11 +86,11 @@ class _CostDetailFormScreenState extends State<CostDetailFormScreen> with Ticker
// ), // ),
// 8.height, // 8.height,
AppTextFormField( AppTextFormField(
labelText: "Labor Cost",
backgroundColor: AppColor.neutral100,
initialValue: requestDetailProvider.workOrderCostModel?.labourCost?.toString(), initialValue: requestDetailProvider.workOrderCostModel?.labourCost?.toString(),
textAlign: TextAlign.center, 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), textInputType: const TextInputType.numberWithOptions(decimal: true),
showShadow: false, showShadow: false,
onChange: (value) { onChange: (value) {
@ -101,10 +101,10 @@ class _CostDetailFormScreenState extends State<CostDetailFormScreen> with Ticker
8.height, 8.height,
AppTextFormField( AppTextFormField(
labelText: "Travel Cost", labelText: "Travel Cost",
backgroundColor: AppColor.neutral100, backgroundColor: AppColor.fieldBgColor(context),
labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)),
initialValue: requestDetailProvider.workOrderCostModel?.travelCost?.toString(), initialValue: requestDetailProvider.workOrderCostModel?.travelCost?.toString(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
labelStyle: AppTextStyles.textFieldLabelStyle,
textInputType: const TextInputType.numberWithOptions(decimal: true), textInputType: const TextInputType.numberWithOptions(decimal: true),
showShadow: false, showShadow: false,
onChange: (value) { onChange: (value) {
@ -115,10 +115,10 @@ class _CostDetailFormScreenState extends State<CostDetailFormScreen> with Ticker
8.height, 8.height,
AppTextFormField( AppTextFormField(
labelText: "Quot Amount", labelText: "Quot Amount",
backgroundColor: AppColor.neutral100, backgroundColor: AppColor.fieldBgColor(context),
labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)),
initialValue: requestDetailProvider.workOrderCostModel?.qAmount?.toString(), initialValue: requestDetailProvider.workOrderCostModel?.qAmount?.toString(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
labelStyle: AppTextStyles.textFieldLabelStyle,
textInputType: const TextInputType.numberWithOptions(decimal: true), textInputType: const TextInputType.numberWithOptions(decimal: true),
showShadow: false, showShadow: false,
onChange: (value) { onChange: (value) {
@ -129,10 +129,10 @@ class _CostDetailFormScreenState extends State<CostDetailFormScreen> with Ticker
8.height, 8.height,
AppTextFormField( AppTextFormField(
labelText: "PR No", labelText: "PR No",
backgroundColor: AppColor.neutral100, backgroundColor: AppColor.fieldBgColor(context),
labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)),
initialValue: requestDetailProvider.workOrderCostModel?.prNo, initialValue: requestDetailProvider.workOrderCostModel?.prNo,
textAlign: TextAlign.center, textAlign: TextAlign.center,
labelStyle: AppTextStyles.textFieldLabelStyle,
textInputType: const TextInputType.numberWithOptions(decimal: true), textInputType: const TextInputType.numberWithOptions(decimal: true),
showShadow: false, showShadow: false,
onChange: (value) { onChange: (value) {
@ -143,10 +143,10 @@ class _CostDetailFormScreenState extends State<CostDetailFormScreen> with Ticker
8.height, 8.height,
AppTextFormField( AppTextFormField(
labelText: "PO No", labelText: "PO No",
backgroundColor: AppColor.neutral100, backgroundColor: AppColor.fieldBgColor(context),
labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)),
initialValue: requestDetailProvider.workOrderCostModel?.poNo, initialValue: requestDetailProvider.workOrderCostModel?.poNo,
textAlign: TextAlign.center, textAlign: TextAlign.center,
labelStyle: AppTextStyles.textFieldLabelStyle,
textInputType: const TextInputType.numberWithOptions(decimal: true), textInputType: const TextInputType.numberWithOptions(decimal: true),
showShadow: false, showShadow: false,
onChange: (value) { onChange: (value) {
@ -157,10 +157,10 @@ class _CostDetailFormScreenState extends State<CostDetailFormScreen> with Ticker
8.height, 8.height,
AppTextFormField( AppTextFormField(
labelText: "MR No", labelText: "MR No",
backgroundColor: AppColor.neutral100, backgroundColor: AppColor.fieldBgColor(context),
labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)),
initialValue: requestDetailProvider.workOrderCostModel?.mrNo, initialValue: requestDetailProvider.workOrderCostModel?.mrNo,
textAlign: TextAlign.center, textAlign: TextAlign.center,
labelStyle: AppTextStyles.textFieldLabelStyle,
textInputType: TextInputType.text, textInputType: TextInputType.text,
showShadow: false, showShadow: false,
onChange: (value) { onChange: (value) {
@ -171,10 +171,10 @@ class _CostDetailFormScreenState extends State<CostDetailFormScreen> with Ticker
8.height, 8.height,
AppTextFormField( AppTextFormField(
labelText: "Exchange Cost", 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() : '', initialValue: requestDetailProvider.workOrderCostModel?.exchangeCost != null ? requestDetailProvider.workOrderCostModel?.exchangeCost.toString() : '',
textAlign: TextAlign.center, textAlign: TextAlign.center,
labelStyle: AppTextStyles.textFieldLabelStyle,
textInputType: const TextInputType.numberWithOptions(decimal: true), textInputType: const TextInputType.numberWithOptions(decimal: true),
showShadow: false, showShadow: false,
onChange: (value) { onChange: (value) {
@ -187,7 +187,7 @@ class _CostDetailFormScreenState extends State<CostDetailFormScreen> with Ticker
).expanded, ).expanded,
Container( Container(
padding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 16.toScreenHeight), padding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 16.toScreenHeight),
color: AppColor.white10, color: AppColor.background(context),
child: AppFilledButton( child: AppFilledButton(
label: "Update Cost Details", label: "Update Cost Details",
buttonColor: AppColor.primary10, buttonColor: AppColor.primary10,

@ -1,4 +1,6 @@
import 'package:flutter/material.dart'; 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/int_extensions.dart';
import 'package:test_sa/extensions/text_extensions.dart'; import 'package:test_sa/extensions/text_extensions.dart';
import 'package:test_sa/extensions/widget_extensions.dart'; import 'package:test_sa/extensions/widget_extensions.dart';
@ -28,10 +30,10 @@ class _RoomInspectionCardState extends State<RoomInspectionCard> {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ 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, 8.height,
Container( Container(
color: Colors.white10, color: context.isDark?null: Colors.white10,
child: Column( child: Column(
children: widget.inspectionModel!.planRecurrentMedicalTaskRoomTabAttributes?.asMap().entries.map<Widget>((entry) { children: widget.inspectionModel!.planRecurrentMedicalTaskRoomTabAttributes?.asMap().entries.map<Widget>((entry) {
final model = entry.value; final model = entry.value;
@ -66,7 +68,7 @@ class _RoomInspectionCardState extends State<RoomInspectionCard> {
model.attribute?.name ?? '', model.attribute?.name ?? '',
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 1, 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), (status ? 'Pass' : 'Fail').bodyText2(context).custom(color: AppColor.neutral120, fontWeight: FontWeight.w500),
], ],
@ -83,7 +85,7 @@ class _RoomInspectionCardState extends State<RoomInspectionCard> {
height: 30.toScreenHeight, height: 30.toScreenHeight,
padding: EdgeInsetsDirectional.all(4.toScreenHeight), padding: EdgeInsetsDirectional.all(4.toScreenHeight),
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColor.white80, color: AppColor.fieldBgColor(context),
borderRadius: BorderRadius.circular(5), borderRadius: BorderRadius.circular(5),
), ),
child: Row( child: Row(
@ -94,14 +96,14 @@ class _RoomInspectionCardState extends State<RoomInspectionCard> {
isActive: status, isActive: status,
activeColor: AppColor.green20, activeColor: AppColor.green20,
inactiveColor: Colors.transparent, inactiveColor: Colors.transparent,
textColor: status ? AppColor.green50 : AppColor.black20, textColor: status ? AppColor.green50 : context.isDark?Colors.white: AppColor.black20,
), ),
buildToggleOption( buildToggleOption(
label: "FAIL", label: "FAIL",
isActive: !status, isActive: !status,
activeColor: AppColor.red20, activeColor: AppColor.red20,
inactiveColor: Colors.transparent, 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<RoomInspectionCard> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ 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( TextFormField(
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
initialValue: model.attributeValue ?? '', initialValue: model.attributeValue ?? '',
decoration: InputDecoration( decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric(horizontal: 5.toScreenWidth), contentPadding: EdgeInsets.symmetric(horizontal: 5.toScreenWidth),
filled: true, filled: true,
fillColor: AppColor.neutral100, fillColor: AppColor.fieldBgColor(context),
constraints: BoxConstraints( constraints: BoxConstraints(
maxWidth: 99.toScreenWidth, maxWidth: 99.toScreenWidth,
maxHeight: 30.toScreenHeight, maxHeight: 30.toScreenHeight,

@ -67,7 +67,7 @@ class _RoomTabsWidgetState extends State<RoomTabsWidget> {
color: selectedIndex == index ? (context.isDark ? AppColor.neutral60 : AppColor.neutral110) : Colors.transparent, color: selectedIndex == index ? (context.isDark ? AppColor.neutral60 : AppColor.neutral110) : Colors.transparent,
borderRadius: BorderRadius.circular(7), 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(), }).toList(),

@ -35,7 +35,7 @@ class RecurrentTaskInfoWidget extends StatelessWidget {
backgroundColor: AppColor.getRequestStatusColorByName(context, model?.status?.name), backgroundColor: AppColor.getRequestStatusColorByName(context, model?.status?.name),
), ),
8.height, 8.height,
model!.title!.bodyText(context).custom(color: AppColor.black10), model!.title!.bodyText(context).custom(color: AppColor.textColor(context)),
2.height, 2.height,
'${context.translation.taskNo}: ${model!.taskNo!}'.bodyText2(context).custom(color: AppColor.neutral120), '${context.translation.taskNo}: ${model!.taskNo!}'.bodyText2(context).custom(color: AppColor.neutral120),
'${context.translation.site}: ${model!.site!.siteName!}'.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, width: double.infinity,
enabled: snapshot.recurrentWoData?.status?.value != 1, enabled: snapshot.recurrentWoData?.status?.value != 1,
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColor.neutral100, color: AppColor.fieldBgColor(context),
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
), ),
pickerTimer: model?.recurrentWoTimePicker, pickerTimer: model?.recurrentWoTimePicker,
@ -103,7 +103,7 @@ class RecurrentTaskInfoWidget extends StatelessWidget {
8.width, 8.width,
Text( Text(
ServiceRequestUtils.formatTimerDuration(totalWorkingHours.round()), 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( return AppTextFormField(
initialValue: model?.comment, initialValue: model?.comment,
labelText: context.translation.comment, labelText: context.translation.comment,
backgroundColor: AppColor.neutral100, backgroundColor: AppColor.fieldBgColor(context),
showShadow: false, 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, alignLabelWithHint: true,
textInputType: TextInputType.multiline, textInputType: TextInputType.multiline,
onChange: (value) { onChange: (value) {
@ -145,8 +146,8 @@ Widget buildingInfoWidget({required String label, required String? value, requir
3.height, 3.height,
Text( Text(
value ?? '', 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);
} }

@ -86,14 +86,15 @@ class _RecurrentWorkOrderViewState extends State<RecurrentWorkOrderView> {
children: [ children: [
AppFilledButton( AppFilledButton(
label: context.translation.save, label: context.translation.save,
buttonColor: AppColor.white60, buttonColor: context.isDark?AppColor.neutral20: AppColor.white60,
textColor: AppColor.black10, textColor: context.isDark?Colors.white: AppColor.black10,
onPressed: () => _updateTask(context: context, status: 0), onPressed: () => _updateTask(context: context, status: 0),
).expanded, ).expanded,
12.width, 12.width,
AppFilledButton( AppFilledButton(
label: context.translation.complete, label: context.translation.complete,
buttonColor: AppColor.primary10, buttonColor: AppColor.primary10,
// textColor: context.isDark?Colors.white: AppColor.black10,
onPressed: () => _updateTask(context: context, status: 1), onPressed: () => _updateTask(context: context, status: 1),
).expanded, ).expanded,
], ],

@ -252,7 +252,8 @@ class _UpdateDeviceTransferState extends State<UpdateDeviceTransfer> {
AppTextFormField( AppTextFormField(
initialValue: widget.isSender ? _formModel.senderComment ?? "" : _formModel.receiverComment ?? "", initialValue: widget.isSender ? _formModel.senderComment ?? "" : _formModel.receiverComment ?? "",
labelText: context.translation.technicalComment, 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, textInputType: TextInputType.multiline,
backgroundColor: AppColor.fieldBgColor(context), backgroundColor: AppColor.fieldBgColor(context),
showShadow: false, showShadow: false,

@ -175,7 +175,7 @@ class _ProfilePageState extends State<ProfilePage> {
16.height, 16.height,
AppFilledButton( AppFilledButton(
label: "Update Information", label: "Update Information",
buttonColor: AppColor.neutral50, buttonColor: context.isDark? AppColor.primary10:AppColor.neutral50,
onPressed: () { onPressed: () {
showModalBottomSheet( showModalBottomSheet(
context: context, context: context,

@ -56,7 +56,7 @@ class _UpdateUserContactInfoBottomSheetState extends State<UpdateUserContactInfo
16.height, 16.height,
AppTextFormField( AppTextFormField(
labelText: "Email", labelText: "Email",
backgroundColor: AppColor.neutral100, backgroundColor: AppColor.fieldBgColor(context),
initialValue: widget.uEmail, initialValue: widget.uEmail,
textAlign: TextAlign.center, textAlign: TextAlign.center,
hintText: "email@example.com", hintText: "email@example.com",
@ -72,7 +72,7 @@ class _UpdateUserContactInfoBottomSheetState extends State<UpdateUserContactInfo
12.height, 12.height,
AppTextFormField( AppTextFormField(
labelText: "Phone Number", labelText: "Phone Number",
backgroundColor: AppColor.neutral100, backgroundColor: AppColor.fieldBgColor(context),
initialValue: widget.uPhoneNo, initialValue: widget.uPhoneNo,
textAlign: TextAlign.center, textAlign: TextAlign.center,
hintText: "05xxxxxxxx", hintText: "05xxxxxxxx",
@ -88,7 +88,7 @@ class _UpdateUserContactInfoBottomSheetState extends State<UpdateUserContactInfo
12.height, 12.height,
AppTextFormField( AppTextFormField(
labelText: "Extension No", labelText: "Extension No",
backgroundColor: AppColor.neutral100, backgroundColor: AppColor.fieldBgColor(context),
initialValue: widget.uExtensionNo, initialValue: widget.uExtensionNo,
textAlign: TextAlign.center, textAlign: TextAlign.center,
hintText: "1234", hintText: "1234",
@ -104,7 +104,7 @@ class _UpdateUserContactInfoBottomSheetState extends State<UpdateUserContactInfo
12.height, 12.height,
AppFilledButton( AppFilledButton(
label: "Update", label: "Update",
buttonColor: AppColor.neutral50, buttonColor: context.isDark? AppColor.primary10:AppColor.neutral50,
onPressed: () async { onPressed: () async {
FocusManager.instance.primaryFocus!.unfocus(); FocusManager.instance.primaryFocus!.unfocus();
if (email.isEmpty || !Validator.isEmail(email)) { if (email.isEmpty || !Validator.isEmail(email)) {

@ -47,6 +47,7 @@ class _SelectionBottomSheetState<T> extends State<SelectionBottomSheet<T>> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
height: MediaQuery.of(context).size.height * .7, height: MediaQuery.of(context).size.height * .7,
color: Theme.of(context).scaffoldBackgroundColor,
padding: const EdgeInsets.all(21), padding: const EdgeInsets.all(21),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -94,8 +95,9 @@ class _SelectionBottomSheetState<T> extends State<SelectionBottomSheet<T>> {
decoration: InputDecoration( decoration: InputDecoration(
hintText: 'Search by name', hintText: 'Search by name',
labelText: 'Search', labelText: 'Search',
labelStyle: TextStyle(color: AppColor.textColor(context)),
filled: true, filled: true,
focusColor: AppColor.fieldBgColor(context), fillColor: AppColor.fieldBgColor(context),
hintStyle: const TextStyle(fontSize: 14), hintStyle: const TextStyle(fontSize: 14),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: AppColor.blueStatus(context), width: 2.0), borderSide: BorderSide(color: AppColor.blueStatus(context), width: 2.0),
@ -114,14 +116,24 @@ class _SelectionBottomSheetState<T> extends State<SelectionBottomSheet<T>> {
child: ListView.builder( child: ListView.builder(
itemCount: filteredList?.length, itemCount: filteredList?.length,
padding: const EdgeInsets.only(top: 8), padding: const EdgeInsets.only(top: 8),
itemBuilder: (cxt, index) => RadioListTile<T>( 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<T>(
// Specify type for RadioListTile // Specify type for RadioListTile
value: filteredList![index], value: filteredList![index],
dense: true, dense: true,
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,
groupValue: _selectedValue, groupValue: _selectedValue,
activeColor: Colors.black87, activeColor: AppColor.textColor(context),
onChanged: (value) { onChanged: (value) {
_selectedValue = value; _selectedValue = value;
searchFocusNode.unfocus(); searchFocusNode.unfocus();
@ -134,6 +146,7 @@ class _SelectionBottomSheetState<T> extends State<SelectionBottomSheet<T>> {
), ),
), ),
), ),
),
8.height, 8.height,
if (_selectedValue != null) if (_selectedValue != null)
AppFilledButton( AppFilledButton(

@ -83,12 +83,15 @@ class _SelectionBottomSheetState<T> extends State<SelectionFullScreenDialog<T>>
SearchBar( SearchBar(
focusNode: searchFocusNode, focusNode: searchFocusNode,
elevation: WidgetStateProperty.all<double>(0), elevation: WidgetStateProperty.all<double>(0),
leading: const Icon(Icons.search, color: AppColor.neutral50), backgroundColor: WidgetStateProperty.all<Color>(
AppColor.fieldBgColor(context), // Your custom background color
),
leading: Icon(Icons.search, color: AppColor.iconColor(context)),
textStyle: WidgetStateProperty.all<TextStyle>( textStyle: WidgetStateProperty.all<TextStyle>(
const TextStyle(color: AppColor.neutral50, fontSize: 16.0), TextStyle(color: AppColor.textColor(context), fontSize: 16.0),
), ),
hintStyle: WidgetStateProperty.all<TextStyle>( hintStyle: WidgetStateProperty.all<TextStyle>(
const TextStyle(color: AppColor.neutral20, fontSize: 14.0), TextStyle(color: AppColor.textColor(context), fontSize: 14.0),
), ),
hintText: 'Search by name', hintText: 'Search by name',
onChanged: (queryString) { onChanged: (queryString) {
@ -123,13 +126,24 @@ class _SelectionBottomSheetState<T> extends State<SelectionFullScreenDialog<T>>
child: ListView.builder( child: ListView.builder(
itemCount: filteredList?.length, itemCount: filteredList?.length,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemBuilder: (cxt, index) => RadioListTile<T>( 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<T>(
// Specify type for RadioListTile // Specify type for RadioListTile
value: filteredList![index], value: filteredList![index],
dense: true, dense: true,
contentPadding: const EdgeInsets.only(left: 16, right: 16), contentPadding: const EdgeInsets.only(left: 16, right: 16),
groupValue: _selectedValue, groupValue: _selectedValue,
activeColor: Colors.black87, activeColor: AppColor.iconColor(context),
hoverColor: Colors.transparent, hoverColor: Colors.transparent,
onChanged: (value) { onChanged: (value) {
_selectedValue = value; _selectedValue = value;
@ -143,6 +157,7 @@ class _SelectionBottomSheetState<T> extends State<SelectionFullScreenDialog<T>>
), ),
), ),
), ),
),
8.height, 8.height,
if (_selectedValue != null) if (_selectedValue != null)
AppFilledButton( AppFilledButton(

Loading…
Cancel
Save