dark mode color fixes

design_3.0_TM_Module_snagsFix
WaseemAbbasi22 2 months ago
parent e0ad359295
commit 5e3b09315f

@ -37,6 +37,7 @@ class _AssetRetiredState extends State<AssetRetired> with TickerProviderStateMix
bool _isLoading = false;
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
final List<GenericAttachmentModel> _attachments = [];
@override
void initState() {
@ -54,7 +55,7 @@ class _AssetRetiredState extends State<AssetRetired> with TickerProviderStateMix
@override
Widget build(BuildContext context) {
final List<GenericAttachmentModel> attachments = [];
return Scaffold(
key: _scaffoldKey,
@ -106,8 +107,10 @@ class _AssetRetiredState extends State<AssetRetired> 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<AssetRetired> 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) {

@ -78,7 +78,7 @@ class _CreateTaskViewState extends State<CreateTaskView> 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<CreateTaskView> 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<CreateTaskView> 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;

@ -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",

@ -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<NfcLayout> {
Widget scanNfc() {
return Container(
color: AppColor.background(context),
key: ValueKey(1),
child: Column(
mainAxisSize: MainAxisSize.min,
@ -86,11 +91,12 @@ class _NfcLayoutState extends State<NfcLayout> {
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<NfcLayout> {
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<NfcLayout> {
Widget doneNfc() {
return Container(
color: AppColor.background(context),
key: ValueKey(2),
child: Column(
mainAxisSize: MainAxisSize.min,
@ -151,6 +159,7 @@ class _NfcLayoutState extends State<NfcLayout> {
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 24,
color:AppColor.headingTextColor(context)
),
),
SizedBox(
@ -161,6 +170,7 @@ class _NfcLayoutState extends State<NfcLayout> {
"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<NfcLayout> {
// },
onPressed: null,
// elevation: 0,
child: Text("DONE"),
child: Text("DONE",style: TextStyle(color: context.isDark?AppColor.primary10:null),),
),
),
SizedBox(

@ -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,

Loading…
Cancel
Save