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 d16cd01c..34416d06 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 @@ -37,6 +37,7 @@ class _AssetRetiredState extends State with TickerProviderStateMix bool _isLoading = false; final GlobalKey _formKey = GlobalKey(); final GlobalKey _scaffoldKey = GlobalKey(); + final List _attachments = []; @override void initState() { @@ -54,7 +55,7 @@ class _AssetRetiredState extends State with TickerProviderStateMix @override Widget build(BuildContext context) { - final List attachments = []; + return Scaffold( key: _scaffoldKey, @@ -106,8 +107,10 @@ class _AssetRetiredState extends State with TickerProviderStateMix 23.height, AttachmentPicker( label: context.translation.attachFiles, - attachment: attachments, - buttonIcon: 'image-plus'.toSvgAsset(), + attachment: _attachments, + onlyImages: false, + buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.neutral120), + buttonColor: AppColor.black10, ), ], ).paddingOnly(start: 13, end: 13, top: 14, bottom: 16), @@ -121,10 +124,10 @@ class _AssetRetiredState extends State with TickerProviderStateMix loading: requestDetailProvider.isLoading, onPressed: () async { requestDetailProvider.assetRetiredHelperModel?.activityAssetToBeRetiredAttachments = []; - for (var attachment in attachments) { - String fileName = ServiceRequestUtils.isLocalUrl(attachment.name??'') ? ("${attachment.name??''.split("/").last}|${base64Encode(File(attachment.name??'').readAsBytesSync())}") :attachment.name??''; + for (var item in _attachments) { + String fileName = ServiceRequestUtils.isLocalUrl(item.name??'') ? ("${item.name??''.split("/").last}|${base64Encode(File(item.name??'').readAsBytesSync())}") :item.name??''; requestDetailProvider.assetRetiredHelperModel?.activityAssetToBeRetiredAttachments - ?.add(ActivityAssetToBeRetiredAttachments(id: attachment.id, name: fileName)); + ?.add(ActivityAssetToBeRetiredAttachments(id: item.id, name: fileName)); } int status = await requestDetailProvider.createActivityAssetToBeRetired(); if (status == 200) { 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 906975c7..6178941b 100644 --- a/lib/modules/tm_module/tasks_wo/create_task_view.dart +++ b/lib/modules/tm_module/tasks_wo/create_task_view.dart @@ -78,7 +78,7 @@ class _CreateTaskViewState extends State with TickerProviderStat height: 56.toScreenHeight, title: context.translation.taskType, showShadow: false, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), showAsBottomSheet: true, initialValue: selectedType, onSelect: (type) { @@ -102,9 +102,9 @@ class _CreateTaskViewState extends State with TickerProviderStat initialValue: _addTaskModel?.callComment, controller: commentController, labelText: context.translation.callComments, - backgroundColor: AppColor.neutral100, + backgroundColor: AppColor.fieldBgColor(context), + labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), showShadow: false, - labelStyle: AppTextStyles.textFieldLabelStyle, alignLabelWithHint: true, textInputType: TextInputType.multiline, onChange: (value) { @@ -117,7 +117,7 @@ class _CreateTaskViewState extends State with TickerProviderStat attachment: attachments, buttonColor: AppColor.black10, onlyImages: false, - buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.neutral120), + buttonIcon: 'image-plus'.toSvgAsset(color:context.isDark?AppColor.primary10: AppColor.neutral120), //verify this if not required delete this .. onChange: (attachments) { attachments = attachments; diff --git a/lib/new_views/swipe_module/dialoge/confirm_dialog.dart b/lib/new_views/swipe_module/dialoge/confirm_dialog.dart index f8cfacfb..7b76d715 100644 --- a/lib/new_views/swipe_module/dialoge/confirm_dialog.dart +++ b/lib/new_views/swipe_module/dialoge/confirm_dialog.dart @@ -17,7 +17,7 @@ class ConfirmDialog 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( @@ -32,20 +32,20 @@ class ConfirmDialog extends StatelessWidget { Expanded( child: Text( title ?? "Confirm", - style: const 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), ), IconButton( padding: EdgeInsets.zero, icon: const Icon(Icons.close), - color: Colors.black87, + color: AppColor.iconColor(context), constraints: const BoxConstraints(), onPressed: () => onCloseTap ?? Navigator.pop(context), // onPressed: () => Navigator.pop(context), ) ], ), - message != null ? message!.heading5(context).custom(color: AppColor.neutral70) : const SizedBox(), + message != null ? message!.heading5(context).custom(color: AppColor.textColor(context)) : const SizedBox(), 28.height, AppFilledButton( label: okTitle ?? "OK", diff --git a/lib/new_views/swipe_module/dialoge/nfc_reader_sheet.dart b/lib/new_views/swipe_module/dialoge/nfc_reader_sheet.dart index 0b26f9da..3ee2e5d7 100644 --- a/lib/new_views/swipe_module/dialoge/nfc_reader_sheet.dart +++ b/lib/new_views/swipe_module/dialoge/nfc_reader_sheet.dart @@ -4,6 +4,10 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:nfc_manager/nfc_manager.dart'; import 'package:nfc_manager/platform_tags.dart'; +import 'package:test_sa/dashboard_latest/dashboard_view.dart'; +import 'package:test_sa/extensions/context_extension.dart'; +import 'package:test_sa/new_views/app_style/app_color.dart'; +import 'package:test_sa/views/app_style/sizing.dart'; void showNfcReader(BuildContext context, {Function(String nfcId)? onNcfScan}) { showModalBottomSheet( @@ -79,6 +83,7 @@ class _NfcLayoutState extends State { Widget scanNfc() { return Container( + color: AppColor.background(context), key: ValueKey(1), child: Column( mainAxisSize: MainAxisSize.min, @@ -86,11 +91,12 @@ class _NfcLayoutState extends State { SizedBox( height: 30, ), - const Text( + Text( "Ready To Scan", style: TextStyle( fontWeight: FontWeight.bold, fontSize: 24, + color:AppColor.headingTextColor(context) ), ), SizedBox( @@ -99,6 +105,7 @@ class _NfcLayoutState extends State { Image.asset( "assets/images/ic_nfc.png", height: MediaQuery.of(context).size.width / 3, + color: AppColor.iconColor(context), width: double.infinity, ), const SizedBox( @@ -139,6 +146,7 @@ class _NfcLayoutState extends State { Widget doneNfc() { return Container( + color: AppColor.background(context), key: ValueKey(2), child: Column( mainAxisSize: MainAxisSize.min, @@ -151,6 +159,7 @@ class _NfcLayoutState extends State { style: TextStyle( fontWeight: FontWeight.bold, fontSize: 24, + color:AppColor.headingTextColor(context) ), ), SizedBox( @@ -161,6 +170,7 @@ class _NfcLayoutState extends State { "assets/images/ic_done.png", height: MediaQuery.of(context).size.width / 3, width: double.infinity, + color: AppColor.iconColor(context), ), SizedBox( height: 30, @@ -189,7 +199,7 @@ class _NfcLayoutState extends State { // }, onPressed: null, // elevation: 0, - child: Text("DONE"), + child: Text("DONE",style: TextStyle(color: context.isDark?AppColor.primary10:null),), ), ), SizedBox( diff --git a/lib/new_views/swipe_module/utils/swipe_general_utils.dart b/lib/new_views/swipe_module/utils/swipe_general_utils.dart index d437b1b6..4d6b6bf4 100644 --- a/lib/new_views/swipe_module/utils/swipe_general_utils.dart +++ b/lib/new_views/swipe_module/utils/swipe_general_utils.dart @@ -113,19 +113,20 @@ class SwipeGeneralUtils { } Widget attendanceTypeCard(String title, String icon, bool isEnabled, VoidCallback onPress, BuildContext context) { + return Container( padding: const EdgeInsets.all(12), decoration: BoxDecoration( - color: isEnabled ? Colors.white : AppColor.white70, + color: isEnabled ?context.isDark ? AppColor.neutral60 : Colors.white : AppColor.background(context), borderRadius: BorderRadius.circular(18), - border: Border.all(color: AppColor.white70, width: 2), + border: Border.all(color:context.isDark ? AppColor.neutral60 : Colors.white70 , width: 2), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - icon.toSvgAsset(color: isEnabled ? null : Colors.grey.withOpacity(0.5)), - title.heading5(context).custom(color: isEnabled ? AppColor.neutral50 : Colors.grey.withOpacity(0.5)), + icon.toSvgAsset(color: isEnabled ?context.isDark ? AppColor.neutral30 : AppColor.neutral50 : Colors.grey.withOpacity(0.5)), + title.heading5(context).custom(color: isEnabled ?context.isDark ? AppColor.neutral30 : AppColor.neutral50 : Colors.grey.withOpacity(0.5)), ], ), ).onPress( @@ -428,12 +429,13 @@ class SwipeGeneralUtils { top: Radius.circular(20), ), ), + backgroundColor: Theme.of(context).scaffoldBackgroundColor, clipBehavior: Clip.antiAliasWithSaveLayer, builder: (BuildContext context) => Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - context.translation.markAttendance.heading4(context).custom(color: AppColor.white936), + context.translation.markAttendance.heading4(context).custom(color:context.isDark?AppColor.white50: AppColor.white936), 8.height, context.translation.selectMethodToMarkAttendance.bodyText2(context).custom(color: AppColor.neutral120), 12.height,