ui/ux asset delivery improvements

ui_ux_rollout_merge_notification_settings
Sikander Saleem 3 weeks ago
parent 91003cc8a1
commit d71ddcdf1a

@ -12,6 +12,9 @@ import 'package:test_sa/controllers/providers/api/notifications_provider.dart';
import 'package:test_sa/models/all_requests_and_count_model.dart';
import 'package:test_sa/models/device/device_transfer.dart';
import 'package:test_sa/models/new_models/gas_refill_model.dart';
import 'package:test_sa/modules/asset_delivery_module/pages/asset_delivery_page.dart';
import 'package:test_sa/modules/asset_inventory_module/pages/asset_inventory_detail_view.dart';
import 'package:test_sa/modules/asset_inventory_module/pages/asset_inventory_page.dart';
import 'package:test_sa/modules/cm_module/cm_detail_page.dart';
import 'package:test_sa/modules/cx_module/survey/survey_page.dart';
import 'package:test_sa/modules/demo_module/demo_detail_view_page.dart';
@ -172,9 +175,9 @@ class FirebaseNotificationManger {
requestDetails: RequestsDetails(nameOfType: messageData["sourceName"], status: messageData["statusName"], priority: messageData["priorityName"], date: messageData["createdDate"]),
moduleId: 7);
break;
// case "8":
// serviceClass = AssetInventoryDetailView(requestId: int.parse(messageData["requestNumber"].toString()), moduleId: 1);
// break;
case "8":
serviceClass = AssetInventoryPage(sessionId: int.parse(messageData["requestNumber"].toString()), moduleId: int.parse(transactionType));
break;
case "9":
serviceClass = TrafRequestDetailPage(trafId: int.parse(messageData["requestNumber"].toString()));
break;
@ -187,9 +190,9 @@ class FirebaseNotificationManger {
case "12":
serviceClass = LoanEquipmentDetailPage(loanId: int.parse(messageData["requestNumber"].toString()));
break;
// case "13":
// serviceClass = AssetDeliveryPage(requestId: int.parse(messageData["requestNumber"].toString()));
// break;
case "13":
serviceClass = AssetDeliveryPage(requestId: int.parse(messageData["requestNumber"].toString()));
break;
case "14":
serviceClass = MedicalGasInspectionDetailPage(inspectionId: int.parse(messageData["requestNumber"].toString()), prority: messageData["priorityName"]);
break;
@ -271,12 +274,7 @@ class FirebaseNotificationManger {
final String body = message.notification?.body ?? message.data['body'] ?? 'New notification';
// Always show with our grouping logic
NotificationManger.showNotification(
title: title,
subtext: body,
hashcode: DateTime.now().millisecondsSinceEpoch.hashCode,
payload: json.encode(message.data),
context: context);
NotificationManger.showNotification(title: title, subtext: body, hashcode: DateTime.now().millisecondsSinceEpoch.hashCode, payload: json.encode(message.data), context: context);
// Update unread notification count badge when new notification arrives
try {

@ -35,8 +35,8 @@ class AssetDeliveryItemView extends StatelessWidget {
Navigator.of(context).push(MaterialPageRoute(
builder: (_) => AssetDeliveryPage(
requestId: requestData!.id!,
poInternal: requestData?.poInternal,
poExternal: requestData?.poExternal,
// poInternal: requestData?.poInternal,
// poExternal: requestData?.poExternal,
)));
});
}
@ -52,8 +52,8 @@ class AssetDeliveryItemView extends StatelessWidget {
Navigator.of(context).push(MaterialPageRoute(
builder: (_) => AssetDeliveryPage(
requestId: requestDetails!.id!,
poInternal: requestDetails?.poInternal,
poExternal: requestDetails?.poExternal,
// poInternal: requestDetails?.poInternal,
// poExternal: requestDetails?.poExternal,
)));
});
}

@ -4,6 +4,7 @@ import 'package:test_sa/extensions/text_extensions.dart';
import 'package:test_sa/extensions/widget_extensions.dart';
import 'package:test_sa/modules/asset_delivery_module/models/delivery_line_model.dart';
import 'package:test_sa/new_views/app_style/app_color.dart';
import 'package:test_sa/views/widgets/item_views/info_text_widget.dart';
class AssetDeliveryLineCard extends StatelessWidget {
DeliveryLineModel deliveryLineModel;
@ -28,59 +29,27 @@ class AssetDeliveryLineCard extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'Item Category: ${deliveryLineModel.itemCategory ?? '-'}',
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
),
InfoTextWidget(label: "Item Category", value: deliveryLineModel.itemCategory ?? '-'),
if (!isViewOnly)
'edit_icon'.toSvgAsset().onPress(() {
'edit_icon'.toSvgAsset(width: 24, height: 24, color: AppColor.icon2Color(context)).onPress(() {
if (editPress != null) {
editPress!();
}
}),
],
),
Text(
'Item No: ${deliveryLineModel.itemNumber ?? '-'}',
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
),
Text(
'Item Description: ${deliveryLineModel.itemDescription ?? '-'}',
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
),
Text(
'Quantity: ${deliveryLineModel.qty ?? '-'}',
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
),
if(!isTechnical)...[
Text(
'Remaining Quantity: ${deliveryLineModel.remainingQty ?? '-'}',
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
),
Text(
'Quantity of this Delivery: ${deliveryLineModel.usingQtyInThisDelivery ?? '-'}',
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
),
InfoTextWidget(label: "Item No", value: deliveryLineModel.itemNumber ?? '-'),
InfoTextWidget(label: "Item Description", value: deliveryLineModel.itemDescription ?? '-'),
InfoTextWidget(label: "Quantity", value: deliveryLineModel.qty?.toString() ?? '-'),
if (!isTechnical) ...[
InfoTextWidget(label: "Remaining Quantity", value: deliveryLineModel.remainingQty?.toString() ?? '-'),
InfoTextWidget(label: "Quantity of this Delivery", value: deliveryLineModel.usingQtyInThisDelivery?.toString() ?? '-'),
],
Text(
'Measure Unit: ${deliveryLineModel.unitOfMeasure ?? '-'}',
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
),
Text(
'Unit price: ${deliveryLineModel.unitPrice ?? '-'}',
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
),
Text(
'Line Type: ${deliveryLineModel.lineType ?? '-'}',
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
),
Text(
'Total: ${deliveryLineModel.total ?? '-'}',
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
),
InfoTextWidget(label: "Measure Unit", value: deliveryLineModel.unitOfMeasure?.toString() ?? '-'),
InfoTextWidget(label: "Unit price", value: deliveryLineModel.unitPrice?.toString() ?? '-'),
InfoTextWidget(label: "Line Type", value: deliveryLineModel.lineType?.toString() ?? '-'),
InfoTextWidget(label: "Total", value: deliveryLineModel.total?.toString() ?? '-'),
],
).toShadowContainer(context, borderRadius: 20, padding: 12);
).toShadowContainer(context);
}
}

@ -25,14 +25,14 @@ import 'package:test_sa/views/widgets/item_views/info_text_widget.dart';
class AssetDeliveryPage extends StatefulWidget {
final int? requestId;
final String? poInternal;
final String? poExternal;
// final String? poInternal;
// final String? poExternal;
const AssetDeliveryPage({
Key? key,
this.requestId,
this.poInternal,
this.poExternal,
// this.poInternal,
// this.poExternal,
}) : super(key: key);
@override
@ -101,7 +101,7 @@ class _AssetDeliveryPageState extends State<AssetDeliveryPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
requestDetailCard(context).toShadowContainer(context, borderRadius: 20, padding: 0),
requestDetailCard(context).toShadowContainer(context),
16.height,
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -160,7 +160,7 @@ class _AssetDeliveryPageState extends State<AssetDeliveryPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
InfoHeader16Widget('PO Details'.addTranslation),
InfoTextWidget(label: 'PO No. Internal'.addTranslation, value: widget.poInternal ?? '-'),
InfoTextWidget(label: 'PO No. Internal'.addTranslation, value: dataModel?.poNumber?.toString() ?? '-'),
InfoTextWidget(label: 'Client Name'.addTranslation, value: dataModel?.clientName ?? '-'),
// Row(
// mainAxisSize: MainAxisSize.min,
@ -193,7 +193,7 @@ class _AssetDeliveryPageState extends State<AssetDeliveryPage> {
InfoTextWidget(label: 'Total'.addTranslation, value: dataModel?.total != null ? dataModel!.total.toString() : '-'),
InfoTextWidget(label: 'Total Invoice'.addTranslation, value: dataModel?.totalInvoice != null ? dataModel!.totalInvoice.toString() : '-'),
],
).paddingAll(16);
);
}
String getPOExternal() {
@ -218,7 +218,7 @@ class _AssetDeliveryPageState extends State<AssetDeliveryPage> {
? const NoDataFound().center
: ListView.separated(
itemCount: assetDeliveryTableList.length,
separatorBuilder: (_, __) => 8.height,
separatorBuilder: (_, __) => 12.height,
padding: EdgeInsets.zero,
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),

@ -7,6 +7,7 @@ import 'package:test_sa/extensions/text_extensions.dart';
import 'package:test_sa/extensions/widget_extensions.dart';
import 'package:test_sa/modules/asset_delivery_module/models/asset_delivery_data_model.dart';
import 'package:test_sa/new_views/app_style/app_color.dart';
import 'package:test_sa/views/widgets/item_views/info_text_widget.dart';
import 'package:test_sa/views/widgets/requests/request_status.dart';
class AssetDeliveryTableCard extends StatelessWidget {
@ -54,24 +55,11 @@ class AssetDeliveryTableCard extends StatelessWidget {
// ],
// ),
8.height,
Text(
'Delivery Number: ${deliveryTableModel.number ?? '-'}',
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
),
Text(
'Delivery Amount: ${deliveryTableModel.deliveryAmount ?? '-'}',
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
),
Text(
'Invoice Amount: ${deliveryTableModel.invoiceAmount ?? '-'}',
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
),
Align(
alignment: Alignment.centerRight,
child: Icon(Icons.arrow_forward, color: AppColor.blueStatus(context), size: 14),
),
InfoTextWidget(label: "Delivery Number", value: deliveryTableModel.number ?? '-'),
InfoTextWidget(label: "Delivery Amount", value: deliveryTableModel.deliveryAmount?.toString() ?? '-'),
InfoTextWidget(label: "Invoice Amount", value: deliveryTableModel.invoiceAmount?.toString() ?? '-', showArrow: true),
],
).toShadowContainer(context, borderRadius: 20).onPress(() {
).toShadowContainer(context).onPress(() {
onCardTap();
});
}

@ -1,5 +1,6 @@
import 'dart:convert';
import 'dart:developer';
import 'package:date_picker_timeline/extra/color.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -32,6 +33,8 @@ import 'package:test_sa/views/widgets/date_and_time/time_picker.dart';
import 'package:test_sa/new_views/common_widgets/single_item_drop_down_menu.dart';
import 'package:test_sa/new_views/swipe_module/dialoge/acknowledge_work_dialog.dart';
import 'package:test_sa/views/widgets/date_and_time/date_picker.dart';
import 'package:test_sa/views/widgets/item_views/info_header_widget.dart';
import 'package:test_sa/views/widgets/item_views/info_text_widget.dart';
import 'package:test_sa/views/widgets/loaders/no_data_found.dart';
import '../../../../new_views/common_widgets/app_filled_button.dart';
@ -97,23 +100,19 @@ class _DeliveryInspectionFormViewState extends State<DeliveryInspectionFormView>
return Scaffold(
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: isLoading
? CircularProgressIndicator(color: AppColor.loadingColor(context)).center
? CircularProgressIndicator(color: AppColor.loadingColor(context)).center
: Form(
key: _formKey,
child: Column(
children: [
SingleChildScrollView(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 12,
children: [
if (!viewOnly) ...[inspectionDetailsForm()] else ...[inspectionDetails()],
20.height,
Text(
"Lines",
style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.black10),
),
8.height,
InfoHeader16Widget("Lines"),
linesList(context),
],
)).expanded,
@ -178,12 +177,12 @@ class _DeliveryInspectionFormViewState extends State<DeliveryInspectionFormView>
return Consumer<AssetDeliveryProvider>(builder: (context, provider, child) {
List<DeliveryLineModel> linesList = provider.deliveryLinesList;
return provider.isDeliveryLineListLoading
? SizedBox.expand(child: CircularProgressIndicator(color: AppColor.loadingColor(context)).center)
? SizedBox.expand(child: CircularProgressIndicator(color: AppColor.loadingColor(context)).center)
: linesList.isEmpty
? const NoDataFound().center
: ListView.separated(
itemCount: linesList.length,
separatorBuilder: (_, __) => 8.height,
separatorBuilder: (_, __) => 12.height,
padding: EdgeInsets.zero,
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
@ -234,6 +233,7 @@ class _DeliveryInspectionFormViewState extends State<DeliveryInspectionFormView>
Widget inspectionDetailsForm() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 12,
children: [
_inspectionTile(
title: 'Inspected by'.addTranslation,
@ -251,7 +251,6 @@ class _DeliveryInspectionFormViewState extends State<DeliveryInspectionFormView>
}
},
),
8.height,
_inspectionTile(
title: 'Approved by'.addTranslation,
model: model.approvedByModel,
@ -269,7 +268,6 @@ class _DeliveryInspectionFormViewState extends State<DeliveryInspectionFormView>
},
),
if (widget.requestModel?.paymentTerm?.value == 2) ...[
8.height,
_inspectionTile(
title: 'ThirdApprover'.addTranslation,
model: model.thirdApprovalModel,
@ -287,7 +285,6 @@ class _DeliveryInspectionFormViewState extends State<DeliveryInspectionFormView>
},
),
],
8.height,
ADatePicker(
label: 'Inspected Date/Time From'.addTranslation,
hideShadow: true,
@ -314,12 +311,10 @@ class _DeliveryInspectionFormViewState extends State<DeliveryInspectionFormView>
if (!_validateInspectionDates(from: fromDateTime, to: model.deliveryInspectionInspectedDateTo)) {
return; // invalid, do not assign
}
model.deliveryInspectionInspectedDateFrom = fromDateTime;
setState(() {});
},
),
8.height,
ADatePicker(
label: 'Inspected Date/Time To'.addTranslation,
hideShadow: true,
@ -356,18 +351,7 @@ class _DeliveryInspectionFormViewState extends State<DeliveryInspectionFormView>
setState(() {});
},
),
8.height,
Text(
'Total Time'.addTranslation,
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.black10),
),
8.height,
Text(
formatInspectionDuration(model.totalTime),
style: AppTextStyles.bodyText2.copyWith(
color: context.isDark ? AppColor.neutral30 : AppColor.neutral120,
),
),
InfoTextWidget(label: 'Total Time'.addTranslation, value: formatInspectionDuration(model.totalTime)),
],
).toShadowContainer(context, borderRadius: 20, padding: 12);
}
@ -421,64 +405,18 @@ class _DeliveryInspectionFormViewState extends State<DeliveryInspectionFormView>
return '${hours.toStringAsFixed(2)} hours';
}
Widget inspectionDetails() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 4,
children: [
Text(
'Inspected by'.addTranslation,
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.black10),
),
8.height,
Text(
model.deliveryInspectionInspectedBy ?? '-',
style: AppTextStyles.bodyText2.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral120),
),
8.height,
Text(
'Approved by'.addTranslation,
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.black10),
),
8.height,
Text(
model.deliveryInspectionApprovedBy ?? '-',
style: AppTextStyles.bodyText2.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral120),
),
8.height,
Text(
'Inspected Date/Time From'.addTranslation,
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.black10),
),
8.height,
Text(
model.deliveryInspectionInspectedDateFrom != null ? model.deliveryInspectionInspectedDateFrom!.toString().toServiceRequestDetailsFormat : '-',
style: AppTextStyles.bodyText2.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral120),
),
8.height,
Text(
'Inspected Date/Time To'.addTranslation,
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.black10),
),
8.height,
Text(
model.deliveryInspectionInspectedDateTo != null ? model.deliveryInspectionInspectedDateTo!.toString().toServiceRequestDetailsFormat : '-',
style: AppTextStyles.bodyText2.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral120),
),
8.height,
Text(
'Total Time'.addTranslation,
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.black10),
),
8.height,
Text(
formatInspectionDuration(model.totalTime),
style: AppTextStyles.bodyText2.copyWith(
color: context.isDark ? AppColor.neutral30 : AppColor.neutral120,
),
),
InfoTextWidget(label: "Inspected by", value: "\n${model.deliveryInspectionInspectedBy ?? '-'}"),
InfoTextWidget(label: "Approved by", value: "\n${model.deliveryInspectionApprovedBy ?? '-'}"),
InfoTextWidget(label: 'Inspected Date/Time From'.addTranslation, value: "\n${model.deliveryInspectionInspectedDateFrom?.toString().toServiceRequestDetailsFormat ?? '-'}"),
InfoTextWidget(label: 'Inspected Date/Time To'.addTranslation, value: "\n${model.deliveryInspectionInspectedDateTo?.toString().toServiceRequestDetailsFormat ?? '-'}"),
InfoTextWidget(label: 'Total Time'.addTranslation, value: "\n${formatInspectionDuration(model.totalTime) ?? '-'}"),
],
).toShadowContainer(context, borderRadius: 20, padding: 12);
).toShadowContainer(context);
}
Widget _inspectionTile({
@ -493,8 +431,9 @@ class _DeliveryInspectionFormViewState extends State<DeliveryInspectionFormView>
child: Container(
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: AppColor.fieldBgColor(context),
borderRadius: BorderRadius.circular(12),
color: AppColor.background(context),
border: Border.all(color: AppColor.border2Color(context), width: 1),
borderRadius: BorderRadius.circular(16),
),
child: Row(
children: [
@ -502,25 +441,9 @@ class _DeliveryInspectionFormViewState extends State<DeliveryInspectionFormView>
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(title, style: AppTextStyles.textFieldLabelStyle),
6.height,
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
model?.name?.isNotEmpty == true ? model!.name! : 'Tap to add'.addTranslation,
style: AppTextStyles.bodyText,
),
///Need to display other info as well
// Text(
// model?.email?.isNotEmpty == true
// ? model!.email!
// : '',
// style: AppTextStyles.bodyText,
// ),
],
),
InfoTextLabelWidget(label: title, textStyle: AppTextStyles.textFieldLabelStyle),
4.height,
InfoTextLabelWidget(label: model?.name?.isNotEmpty == true ? model!.name! : 'Tap to add'.addTranslation, textStyle: AppTextStyles.bodyText),
],
),
],
@ -630,6 +553,7 @@ class _DeliveryInspectionFormViewState extends State<DeliveryInspectionFormView>
return showModalBottomSheet<InspectionPersonModel>(
context: context,
isScrollControlled: true,
backgroundColor: AppColor.bottomSheetColor(context),
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top: Radius.circular(20)),
),

@ -67,14 +67,14 @@ class _InspectionPersonBottomSheetState extends State<InspectionPersonBottomShee
top: 16,
left: 16,
right: 16,
bottom: MediaQuery.of(context).viewInsets.bottom+MediaQuery.of(context).padding.bottom,
bottom: MediaQuery.of(context).viewInsets.bottom + MediaQuery.of(context).padding.bottom,
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 12,
children: [
Text(widget.title, style: Theme.of(context).textTheme.titleLarge),
12.height,
widget.title.heading4(context),
if (widget.isHmg)
OracleUserAutoCompleteField(
clearAfterPick: false,
@ -101,7 +101,6 @@ class _InspectionPersonBottomSheetState extends State<InspectionPersonBottomShee
setState(() {});
},
),
8.height,
Row(
children: [
AppTextFormField(
@ -121,7 +120,7 @@ class _InspectionPersonBottomSheetState extends State<InspectionPersonBottomShee
},
).expanded,
if (emailController.text.isNotEmpty) ...[
8.width,
12.width,
AppFilledButton(
buttonColor: AppColor.primary10,
label: 'SendEmail'.addTranslation,
@ -161,7 +160,6 @@ class _InspectionPersonBottomSheetState extends State<InspectionPersonBottomShee
],
],
),
8.height,
ESignature(
title: '',
editable: false,
@ -184,7 +182,6 @@ class _InspectionPersonBottomSheetState extends State<InspectionPersonBottomShee
// });
// },
),
12.height,
AppFilledButton(
label: context.translation.save,
maxWidth: true,

@ -52,11 +52,12 @@ class _AutoCompletePartsFieldState extends State<OracleUserAutoCompleteField> {
@override
Widget build(BuildContext context) {
assetDeliveryProvider ??= Provider.of<AssetDeliveryProvider>(context);
final border = UnderlineInputBorder(borderSide: BorderSide.none, borderRadius: BorderRadius.circular(10));
final border = UnderlineInputBorder(borderSide: BorderSide.none, borderRadius: BorderRadius.circular(16));
return Container(
decoration: BoxDecoration(
color: AppColor.background(context),
borderRadius: BorderRadius.circular(AppStyle.borderRadius * AppStyle.getScaleFactor(context)),
border: Border.all(color: AppColor.border2Color(context), width: 1),
borderRadius: BorderRadius.circular(16),
// boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 10)],
),
child: Autocomplete<OracleUserModel>(
@ -73,7 +74,7 @@ class _AutoCompletePartsFieldState extends State<OracleUserAutoCompleteField> {
return TextField(
controller: fieldTextEditingController,
focusNode: fieldFocusNode,
style: AppTextStyles.bodyText.copyWith(color: AppColor.black10),
style: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 14, color: AppColor.textStyleColor(context)),
textAlign: TextAlign.start,
decoration: InputDecoration(
border: border,
@ -81,15 +82,16 @@ class _AutoCompletePartsFieldState extends State<OracleUserAutoCompleteField> {
focusedBorder: border,
enabledBorder: border,
errorBorder: border,
contentPadding: EdgeInsets.symmetric(vertical: 8.toScreenHeight, horizontal: 16.toScreenWidth),
contentPadding: EdgeInsets.symmetric(vertical: 12.toScreenHeight, horizontal: 16.toScreenWidth),
constraints: const BoxConstraints(),
suffixIconConstraints: const BoxConstraints(minWidth: 0),
filled: true,
fillColor: AppColor.fieldBgColor(context),
fillColor: AppColor.dropDownBackground(context),
errorStyle: AppTextStyle.tiny.copyWith(color: context.isDark ? AppColor.red50 : AppColor.red60),
floatingLabelStyle: AppTextStyle.body1.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? null : AppColor.neutral20),
labelText: widget.label,
labelStyle: AppTextStyles.tinyFont.copyWith(color: AppColor.textColor(context)),
floatingLabelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: AppColor.floatingTextStyleColor(context)),
labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: AppColor.labelTextStyleColor(context)),
),
textInputAction: TextInputAction.search,
onChanged: (text) {

@ -61,8 +61,8 @@ class _AssetDeliveryHistoryLogViewState extends State<AssetDeliveryHistoryLogVie
children: [
Padding(
padding: EdgeInsets.only(left: 122.toScreenWidth),
child: const VerticalDivider(
color: AppColor.white40,
child: VerticalDivider(
color: AppColor.borderColor(context),
thickness: 2,
width: 20,
indent: 10,

@ -57,12 +57,12 @@ class _AssetAutoCompleteFieldState extends State<AssetAutoCompleteField> {
@override
Widget build(BuildContext context) {
final border = UnderlineInputBorder(borderSide: BorderSide.none, borderRadius: BorderRadius.circular(10));
final border = UnderlineInputBorder(borderSide: BorderSide.none, borderRadius: BorderRadius.circular(16));
return Container(
decoration: BoxDecoration(
color: AppColor.background(context),
borderRadius: BorderRadius.circular(AppStyle.borderRadius * AppStyle.getScaleFactor(context)),
// boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 10)],
border: Border.all(color: AppColor.border2Color(context), width: 1),
borderRadius: BorderRadius.circular(16),
),
child: Autocomplete<AssetNDAutoCompleteByDynamicCodesModel>(
optionsBuilder: (TextEditingValue textEditingValue) async {
@ -90,7 +90,7 @@ class _AssetAutoCompleteFieldState extends State<AssetAutoCompleteField> {
return TextField(
controller: _controller,
focusNode: fieldFocusNode,
style: AppTextStyles.bodyText.copyWith(color: AppColor.black10),
style: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 14, color: AppColor.textStyleColor(context)),
textAlign: TextAlign.start,
decoration: InputDecoration(
border: border,
@ -98,15 +98,15 @@ class _AssetAutoCompleteFieldState extends State<AssetAutoCompleteField> {
focusedBorder: border,
enabledBorder: border,
errorBorder: border,
contentPadding: EdgeInsets.symmetric(vertical: 8.toScreenHeight, horizontal: 16.toScreenWidth),
contentPadding: EdgeInsets.symmetric(vertical: 12.toScreenHeight, horizontal: 16.toScreenWidth),
constraints: const BoxConstraints(),
suffixIconConstraints: const BoxConstraints(maxHeight: 24, maxWidth: 24 + 8),
filled: true,
fillColor: AppColor.fieldBgColor(context),
fillColor: AppColor.dropDownBackground(context),
errorStyle: AppTextStyle.tiny.copyWith(color: context.isDark ? AppColor.red50 : AppColor.red60),
floatingLabelStyle: AppTextStyle.body1.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? null : AppColor.neutral20),
floatingLabelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: AppColor.floatingTextStyleColor(context)),
labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: AppColor.labelTextStyleColor(context)),
labelText: "Name/Oracle Code",
labelStyle: AppTextStyles.tinyFont.copyWith(color: AppColor.textColor(context)),
suffixIcon: loading ? CircularProgressIndicator(color: AppColor.loadingColor(context), strokeWidth: 3.0).paddingOnly(end: 8) : null,
),
textInputAction: TextInputAction.search,

@ -57,7 +57,7 @@ class ADatePicker extends StatelessWidget {
children: [
Text(
label,
style: AppTextStyles.tinyFont.copyWith(color: AppColor.floatingTextStyleColor(context)),
style: AppTextStyles.tinyFont2.copyWith(color: AppColor.floatingTextStyleColor(context)),
),
4.height,
(date == null

@ -8,6 +8,7 @@ import 'package:test_sa/extensions/string_extensions.dart';
import 'package:test_sa/extensions/text_extensions.dart';
import 'package:test_sa/extensions/widget_extensions.dart';
import 'package:test_sa/new_views/app_style/app_color.dart';
import 'package:test_sa/views/widgets/item_views/info_text_widget.dart';
import '../loaders/image_loader.dart';
@ -67,18 +68,16 @@ class _ESignatureState extends State<ESignature> {
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 8.toScreenHeight),
decoration: BoxDecoration(
color: widget.backgroundColor ?? (context.isDark ? AppColor.background(context) : Colors.white),
borderRadius: _editable ? const BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10)) : BorderRadius.circular(10),
color: AppColor.dropDownBackground(context),
border: Border.all(color: AppColor.border2Color(context), width: 1),
borderRadius: BorderRadius.circular(16),
boxShadow: widget.showShadow ? [BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 10)] : null,
),
child: widget.editable == false
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Signature'.addTranslation,
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.black10),
),
InfoTextLabelWidget(label: "Signature", textStyle: AppTextStyles.bodyText),
Container(
height: 135.toScreenHeight,
width: MediaQuery.of(context).size.width,

Loading…
Cancel
Save