ui ux improvement

main_production
Sikander Saleem 1 week ago
parent a109734171
commit 03ea176ca1

@ -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),
),
InfoTextWidget(label: "Item No", value: deliveryLineModel.itemNumber ?? '-'),
InfoTextWidget(label: "Item Description", value: deliveryLineModel.itemDescription ?? '-'),
InfoTextWidget(label: "Quantity", value: deliveryLineModel.qty?.toString() ?? '-'),
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: "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);
}
}

@ -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();
});
}

@ -18,6 +18,7 @@ import 'package:test_sa/new_views/common_widgets/app_lazy_loading.dart';
import 'package:test_sa/new_views/common_widgets/app_text_form_field.dart';
import 'package:test_sa/new_views/common_widgets/default_app_bar.dart';
import 'package:test_sa/new_views/common_widgets/single_item_drop_down_menu.dart';
import 'package:test_sa/views/widgets/item_views/info_text_widget.dart';
class CostCenterFormView extends StatefulWidget {
final List<CostCenterModel>? costCenterList;
@ -115,10 +116,17 @@ class _CostCenterFormViewState extends State<CostCenterFormView> {
return provider.isLoading
? CircularProgressIndicator(color: AppColor.loadingColor(context)).center
: Column(
children: [
ListView(
padding: const EdgeInsets.all(16),
children: [
itemDetails(),
12.height,
selectionButton(),
12.height,
_selectedType == CostCenterType.costCenter ? _buildCostCenterList() : _buildSerialNumberList(),
],
).expanded,
FooterActionButton.footerContainer(
context: context,
child: AppFilledButton(
@ -147,10 +155,12 @@ class _CostCenterFormViewState extends State<CostCenterFormView> {
}
Widget _buildCostCenterList() {
return ListView.builder(
return ListView.separated(
itemCount: formModel.costCenters!.length + 1,
shrinkWrap: true,
padding: const EdgeInsets.only(left: 16, right: 16, bottom: 16, top: 8),
padding: EdgeInsets.zero,
physics: const NeverScrollableScrollPhysics(),
separatorBuilder: (context, index) => 12.height,
itemBuilder: (context, index) {
if (index == formModel.costCenters!.length) {
return AppFilledButton(
@ -184,10 +194,12 @@ class _CostCenterFormViewState extends State<CostCenterFormView> {
}
Widget _buildSerialNumberList() {
return ListView.builder(
return ListView.separated(
itemCount: formModel.serialNos!.length + 1,
shrinkWrap: true,
padding: const EdgeInsets.only(left: 16, right: 16, bottom: 16, top: 8),
padding: EdgeInsets.zero,
physics: const NeverScrollableScrollPhysics(),
separatorBuilder: (context, index) => 12.height,
itemBuilder: (context, index) {
if (index == formModel.serialNos!.length) {
return AppFilledButton(
@ -217,9 +229,7 @@ class _CostCenterFormViewState extends State<CostCenterFormView> {
}
Widget selectionButton() {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
child: Row(
return Row(
children: [
Expanded(
child: _radioItem(
@ -246,7 +256,6 @@ class _CostCenterFormViewState extends State<CostCenterFormView> {
),
),
],
),
);
}
@ -263,6 +272,13 @@ class _CostCenterFormViewState extends State<CostCenterFormView> {
children: [
Radio<CostCenterType>(
value: value,
activeColor: AppColor.primary10,
fillColor: WidgetStateColor.resolveWith((states) {
if (states.contains(WidgetState.selected)) {
return AppColor.primary10; // Thumb color when selected
}
return AppColor.icon2Color(context); // Thumb color when unselected (grey)
}),
groupValue: groupValue,
onChanged: (_) => onTap(),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
@ -279,34 +295,12 @@ class _CostCenterFormViewState extends State<CostCenterFormView> {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
spacing: 4,
children: [
Text(
'Item No'.addTranslation,
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.black10),
),
8.height,
Text(
widget.itemNo ?? '-',
style: AppTextStyles.bodyText2.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral120),
),
8.height,
Text(
'Item Description'.addTranslation,
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.black10),
),
8.height,
Text(
widget.itemDescription ?? '-',
style: AppTextStyles.bodyText2.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral120),
),
InfoTextWidget(label: "Item No", value: "\n${widget.itemNo ?? '-'}"),
InfoTextWidget(label: "Item Description", value: "\n${widget.itemDescription ?? '-'}"),
],
).toShadowContainer(
context,
borderRadius: 20,
padding: 12,
showShadow: false,
margin: const EdgeInsets.only(left: 16, right: 16, top: 16, bottom: 8),
);
).toShadowContainer(context);
}
}
@ -402,7 +396,7 @@ class CostCenterItemCard extends StatelessWidget {
],
)
],
).toShadowContainer(context, paddingObject: const EdgeInsets.symmetric(horizontal: 12, vertical: 12)).paddingOnly(bottom: 12);
).toShadowContainer(context);
}
}
@ -447,11 +441,6 @@ class SerialNumberItemCard extends StatelessWidget {
style: Theme.of(context).textTheme.titleMedium,
),
],
)
.toShadowContainer(
context,
paddingObject: const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
)
.paddingOnly(bottom: 12);
).toShadowContainer(context);
}
}

@ -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';
@ -103,17 +106,13 @@ class _DeliveryInspectionFormViewState extends State<DeliveryInspectionFormView>
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,
@ -183,7 +182,7 @@ class _DeliveryInspectionFormViewState extends State<DeliveryInspectionFormView>
? 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)),
),

@ -72,9 +72,9 @@ class _InspectionPersonBottomSheetState extends State<InspectionPersonBottomShee
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