attachment color scheme changed.

main_production_RSG
Sikander Saleem 2 months ago
parent 6a01df319d
commit 620945d1c1

@ -303,7 +303,7 @@ class _AssetInventoryFormViewState extends State<AssetInventoryFormView> {
attachment: attachments, attachment: attachments,
buttonColor: AppColor.black10, buttonColor: AppColor.black10,
onlyImages: false, onlyImages: false,
buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.neutral120), buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.primary10),
), ),
12.height, 12.height,
AppTextFormField( AppTextFormField(

@ -107,7 +107,7 @@ class _AssetRetiredState extends State<AssetRetired> with TickerProviderStateMix
label: context.translation.attachFiles, label: context.translation.attachFiles,
attachment: _attachments, attachment: _attachments,
onlyImages: false, onlyImages: false,
buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.neutral120), buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.primary10),
buttonColor: AppColor.black10, buttonColor: AppColor.black10,
), ),
], ],

@ -296,7 +296,7 @@ class _SparePartRequestState extends State<SparePartRequest> with TickerProvider
AttachmentPicker( AttachmentPicker(
label: context.translation.attachQuotation, label: context.translation.attachQuotation,
attachment: attachments, attachment: attachments,
buttonIcon: 'quotation_icon'.toSvgAsset(), buttonIcon: 'quotation_icon'.toSvgAsset(color: AppColor.primary10),
buttonColor: AppColor.primary10, buttonColor: AppColor.primary10,
), ),
], ],

@ -27,13 +27,13 @@ class ChatFilePicker extends StatelessWidget {
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 1, crossAxisSpacing: 12, mainAxisSpacing: 12), gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 1, crossAxisSpacing: 12, mainAxisSpacing: 12),
children: <Widget>[ children: <Widget>[
gridItem(Icons.camera_enhance_rounded, context.translation.pickFromCamera).onPress(() async { gridItem(context, Icons.camera_enhance_rounded, context.translation.pickFromCamera).onPress(() async {
await fromMediaPicker(context, ImageSource.camera); await fromMediaPicker(context, ImageSource.camera);
}), }),
gridItem(Icons.image_rounded, context.translation.pickFromGallery).onPress(() async { gridItem(context, Icons.image_rounded, context.translation.pickFromGallery).onPress(() async {
await fromMediaPicker(context, ImageSource.gallery); await fromMediaPicker(context, ImageSource.gallery);
}), }),
gridItem(Icons.file_present_rounded, context.translation.pickFromFiles).onPress(() async { gridItem(context, Icons.file_present_rounded, context.translation.pickFromFiles).onPress(() async {
await fromFilePicker(context); await fromFilePicker(context);
}), }),
], ],
@ -81,23 +81,20 @@ class ChatFilePicker extends StatelessWidget {
} }
} }
Widget gridItem(IconData iconData, String title) { Widget gridItem(BuildContext context, IconData iconData, String title) {
return Container( return Container(
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(12),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: AppColor.background(context),
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(16),
border: Border.all(color: const Color(0xffF1F1F1), width: 1), border: Border.all(color: AppColor.borderColor(context), width: 2),
), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Icon(iconData, color: const Color(0xff7D859A), size: 36), Icon(iconData, color: AppColor.icon2Color(context), size: 36),
Text( title.bodyText2(context).custom(color: AppColor.labelTextStyleColor(context), fontSize: context.isTablet() ? 10.toScreenWidth : null),
title,
style: const TextStyle(fontSize: 12, fontWeight: FontWeight.w500),
),
], ],
), ),
); );

@ -148,7 +148,7 @@ class _CreateDemoRequestPageState extends State<CreateDemoRequestPage> with Tick
enabled: demoDocumentLookup != null, enabled: demoDocumentLookup != null,
documentType: demoDocumentLookup, documentType: demoDocumentLookup,
showAsListView: true, showAsListView: true,
buttonIcon: 'image-plus'.toSvgAsset(color: (context.isDark ? AppColor.primary10 : AppColor.neutral120).withOpacity(demoDocumentLookup != null ? 1 : .4)), buttonIcon: 'image-plus'.toSvgAsset(color: (AppColor.primary10).withOpacity(demoDocumentLookup != null ? 1 : .4)),
onChange: (attachments) { onChange: (attachments) {
_attachments = attachments; _attachments = attachments;
setState(() {}); setState(() {});

@ -227,7 +227,7 @@ class _UpdateDemoRequestViewState extends State<UpdateDemoRequestView> with Tick
documentType: demoDocumentLookup, documentType: demoDocumentLookup,
enabled: demoDocumentLookup != null, enabled: demoDocumentLookup != null,
showAsListView: true, showAsListView: true,
buttonIcon: 'image-plus'.toSvgAsset(color: (context.isDark ? AppColor.primary10 : AppColor.neutral120).withOpacity(demoDocumentLookup != null ? 1 : .4)), buttonIcon: 'image-plus'.toSvgAsset(color: (AppColor.primary10).withOpacity(demoDocumentLookup != null ? 1 : .4)),
), ),
], ],
).toShadowContainer(context, borderRadius: 20), ).toShadowContainer(context, borderRadius: 20),

@ -156,7 +156,7 @@ class _CreateIncidentRequestPageState extends State<CreateIncidentRequestPage> {
buttonColor: AppColor.black10, buttonColor: AppColor.black10,
onlyImages: false, onlyImages: false,
showAsListView: true, showAsListView: true,
buttonIcon: 'image-plus'.toSvgAsset(color: context.isDark ? AppColor.primary10 : AppColor.neutral120), buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.primary10),
onChange: (_attachments) { onChange: (_attachments) {
attachments = _attachments; attachments = _attachments;
setState(() {}); setState(() {});

@ -223,9 +223,7 @@ class _UpdateEquipmentInternalAuditPageState extends State<UpdateEquipmentIntern
attachment: _attachments, attachment: _attachments,
buttonColor: AppColor.primary10, buttonColor: AppColor.primary10,
onlyImages: false, onlyImages: false,
buttonIcon: 'attachment_icon'.toSvgAsset( buttonIcon: 'attachment_icon'.toSvgAsset(color: AppColor.primary10),
color: AppColor.primary10,
),
), ),
8.height, 8.height,
], ],

@ -119,7 +119,7 @@ class _UpdateSystemInternalAuditPageState extends State<UpdateSystemInternalAudi
// // }); // // });
bool isTimerPickerEnable = ApiManager.instance.assetGroup?.enabledEngineerTimer ?? false; bool isTimerPickerEnable = ApiManager.instance.assetGroup?.enabledEngineerTimer ?? false;
InternalAuditProvider provider = Provider.of<InternalAuditProvider>(context, listen: false); InternalAuditProvider provider = Provider.of<InternalAuditProvider>(context, listen: false);
if ( formModel.startTime == null) { if (formModel.startTime == null) {
Fluttertoast.showToast(msg: "Working Hours Required"); Fluttertoast.showToast(msg: "Working Hours Required");
return; return;
} }
@ -162,9 +162,7 @@ class _UpdateSystemInternalAuditPageState extends State<UpdateSystemInternalAudi
formModel.startTime = start; formModel.startTime = start;
formModel.endTime = end; formModel.endTime = end;
formModel.totalHours = totalHours; formModel.totalHours = totalHours;
setState(() { setState(() {});
});
} }
} }
@ -216,9 +214,7 @@ class _UpdateSystemInternalAuditPageState extends State<UpdateSystemInternalAudi
attachment: _attachments, attachment: _attachments,
buttonColor: AppColor.primary10, buttonColor: AppColor.primary10,
onlyImages: false, onlyImages: false,
buttonIcon: 'attachment_icon'.toSvgAsset( buttonIcon: 'attachment_icon'.toSvgAsset(color: AppColor.primary10),
color: AppColor.primary10,
),
), ),
8.height, 8.height,
], ],

@ -148,7 +148,7 @@ class _CreateLoanRequestPageState extends State<CreateLoanRequestPage> with Tick
attachment: attachments, attachment: attachments,
onlyImages: false, onlyImages: false,
showAsListView: true, showAsListView: true,
buttonIcon: 'image-plus'.toSvgAsset(color: context.isDark ? AppColor.primary10 : AppColor.neutral120), buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.primary10),
onChange: (attachments) { onChange: (attachments) {
attachments = attachments; attachments = attachments;
setState(() {}); setState(() {});

@ -206,9 +206,7 @@ class _UpdateDeliveryNotesState extends State<UpdateDeliveryNotes> {
buttonColor: AppColor.primary10, buttonColor: AppColor.primary10,
// showAsListView: true, // showAsListView: true,
onlyImages: false, onlyImages: false,
buttonIcon: 'attachment_icon'.toSvgAsset( buttonIcon: 'attachment_icon'.toSvgAsset(color: AppColor.primary10),
color: AppColor.primary10,
),
), ),
16.height, 16.height,
//should create a reusable widget. //should create a reusable widget.

@ -203,9 +203,7 @@ class _UpdateMedicalGasInspectionPageState extends State<UpdateMedicalGasInspect
buttonColor: AppColor.primary10, buttonColor: AppColor.primary10,
showAsListView: true, showAsListView: true,
onlyImages: false, onlyImages: false,
buttonIcon: 'attachment_icon'.toSvgAsset( buttonIcon: 'attachment_icon'.toSvgAsset(color: AppColor.primary10),
color: AppColor.primary10,
),
), ),
16.height, 16.height,
Row( Row(

@ -329,7 +329,7 @@ class _WoInfoFormState extends State<WoInfoForm> {
attachment: ppmProvider.ppmPlanAttachments, attachment: ppmProvider.ppmPlanAttachments,
buttonColor: AppColor.black10, buttonColor: AppColor.black10,
onlyImages: false, onlyImages: false,
buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.neutral120), buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.primary10),
), ),
], ],
).toShadowContainer(context), ).toShadowContainer(context),

@ -247,7 +247,7 @@ class _CreateDeviceTransferRequestState extends State<CreateDeviceTransferReques
attachment: attachments, attachment: attachments,
buttonColor: AppColor.black10, buttonColor: AppColor.black10,
onlyImages: false, onlyImages: false,
buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.neutral120), buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.primary10),
), ),
// 100.height, // 100.height,
], ],

@ -295,7 +295,7 @@ class _UpdateDeviceTransferState extends State<UpdateDeviceTransfer> {
attachment: attachments, attachment: attachments,
buttonColor: AppColor.black10, buttonColor: AppColor.black10,
onlyImages: false, onlyImages: false,
buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.neutral120), buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.primary10),
), ),
8.height, 8.height,
], ],

@ -219,7 +219,7 @@ class _GasRefillRequestFormState extends State<GasRefillRequestForm> {
attachment: attachments, attachment: attachments,
buttonColor: AppColor.black10, buttonColor: AppColor.black10,
onlyImages: false, onlyImages: false,
buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.neutral120), buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.primary10),
), ),
], ],
).toShadowContainer(context, padding: 10).paddingOnly(start: 16, end: 16, top: 16), ).toShadowContainer(context, padding: 10).paddingOnly(start: 16, end: 16, top: 16),

@ -294,7 +294,7 @@ class _UpdateGasRefillRequestState extends State<UpdateGasRefillRequest> {
attachment: _attachments, attachment: _attachments,
buttonColor: AppColor.black10, buttonColor: AppColor.black10,
onlyImages: false, onlyImages: false,
buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.neutral120), buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.primary10),
), ),
8.height, 8.height,
], ],

@ -111,13 +111,13 @@ class _CreateTaskViewState extends State<CreateTaskView> with TickerProviderStat
_addTaskModel?.callComment = value; _addTaskModel?.callComment = value;
}, },
), ),
23.height, 24.height,
AttachmentPicker( AttachmentPicker(
label: context.translation.attachImage, label: context.translation.attachImage,
attachment: attachments, attachment: attachments,
buttonColor: AppColor.black10, buttonColor: AppColor.black10,
onlyImages: false, onlyImages: false,
buttonIcon: 'image-plus'.toSvgAsset(color: context.isDark ? AppColor.primary10 : AppColor.neutral120), buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.primary10),
//verify this if not required delete this .. //verify this if not required delete this ..
onChange: (attachments) { onChange: (attachments) {
attachments = attachments; attachments = attachments;

@ -193,7 +193,7 @@ class _UpdateTaskRequestState extends State<UpdateTaskRequest> {
attachment: attachments, attachment: attachments,
buttonColor: AppColor.black10, buttonColor: AppColor.black10,
onlyImages: false, onlyImages: false,
buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.neutral120), buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.primary10),
), ),
], ],
).toShadowContainer(context), ).toShadowContainer(context),

@ -213,7 +213,7 @@ class _UpdateTrafRequestPageState extends State<UpdateTrafRequestPage> {
attachment: attachments, attachment: attachments,
buttonColor: AppColor.black10, buttonColor: AppColor.black10,
onlyImages: false, onlyImages: false,
buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.neutral120), buttonIcon: 'image-plus'.toSvgAsset(color: AppColor.primary10),
onChange: (attachment) { onChange: (attachment) {
attachments = attachment; attachments = attachment;
}, },

@ -482,19 +482,20 @@ class _AttachmentPickerState extends State<AttachmentPicker> {
return Container( return Container(
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(12),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: AppColor.background(context),
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(16),
border: Border.all(color: const Color(0xffF1F1F1), width: 1), border: Border.all(color: AppColor.borderColor(context), width: 2),
), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Icon(iconData, color: const Color(0xff7D859A), size: 36), Icon(iconData, color: AppColor.icon2Color(context), size: 24),
Text( title.bodyText2(context).custom(color: AppColor.labelTextStyleColor(context), fontSize: context.isTablet() ? 10.toScreenWidth : null),
title, // Text(
style: const TextStyle(fontSize: 12, fontWeight: FontWeight.w500), // title,
), // style: const TextStyle(fontSize: 12, fontWeight: FontWeight.w500),
// ),
], ],
), ),
); );
@ -509,20 +510,15 @@ class _AttachmentPickerState extends State<AttachmentPicker> {
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(12),
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColor.background(context), color: AppColor.background(context),
// color: Colors.white, borderRadius: BorderRadius.circular(16),
borderRadius: BorderRadius.circular(12), border: Border.all(color: AppColor.borderColor(context), width: 2),
border: Border.all(color: const Color(0xffF1F1F1), width: 1),
), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
icon.toSvgAsset(color: AppColor.iconColor(context), width: 36, height: 36), icon.toSvgAsset(color: AppColor.icon2Color(context), width: 36, height: 36),
// Icon(iconData, color: const Color(0xff7D859A), size: 36), label.bodyText2(context).custom(color: AppColor.labelTextStyleColor(context), fontSize: context.isTablet() ? 10.toScreenWidth : null),
Text(
label,
style: const TextStyle(fontSize: 12, fontWeight: FontWeight.w500),
),
], ],
), ),
).onPress(onTap); ).onPress(onTap);

@ -64,14 +64,14 @@ class MultiFilesPickerItem extends StatelessWidget {
Flexible( Flexible(
child: EllipsizedText( child: EllipsizedText(
file.path.split("/").last, file.path.split("/").last,
style: AppTextStyles.bodyText.copyWith(color: AppColor.black10), style: AppTextStyles.bodyText.copyWith(color: AppColor.labelTextStyleColor(context)),
type: EllipsisType.start, // or EllipsisType.middle type: EllipsisType.start, // or EllipsisType.middle
), ),
), ),
8.width, 8.width,
if (enabled) if (enabled)
InkWell( InkWell(
child: "remove".toSvgAsset(width: 16), child: "remove".toSvgAsset(width: 16,color: AppColor.red30),
onTap: () { onTap: () {
onRemoveTap(file); onRemoveTap(file);
if (onRemove != null) { if (onRemove != null) {
@ -85,7 +85,7 @@ class MultiFilesPickerItem extends StatelessWidget {
RichText( RichText(
text: TextSpan( text: TextSpan(
text: documentType == null ? 'Asset Guide | ' : '$documentType | ', text: documentType == null ? 'Asset Guide | ' : '$documentType | ',
style: AppTextStyles.bodyText.copyWith(color: AppColor.neutral120), style: AppTextStyles.bodyText.copyWith(color: AppColor.lightTextColor(context)),
children: <TextSpan>[ children: <TextSpan>[
TextSpan( TextSpan(
text: 'View', text: 'View',

@ -174,19 +174,20 @@ class _MultiFilesPickerState extends State<NewMultiFilesPicker> {
return Container( return Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: AppColor.background(context),
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(16),
border: Border.all(color: Color(0xffF1F1F1), width: 1), border: Border.all(color: AppColor.borderColor(context), width: 2),
), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Icon(iconData, color: Color(0xff7D859A), size: 36), Icon(iconData, color: AppColor.icon2Color(context), size: 36),
Text( title.bodyText2(context).custom(color: AppColor.labelTextStyleColor(context), fontSize: context.isTablet() ? 10.toScreenWidth : null),
title, // Text(
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w500), // title,
), // style: TextStyle(fontSize: 12, fontWeight: FontWeight.w500),
// ),
], ],
), ),
); );

Loading…
Cancel
Save