From 8e29c84c7014130c382f5964aefca101ef3ae476 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Mon, 1 Dec 2025 11:56:30 +0300 Subject: [PATCH] loan improvements. --- lib/extensions/widget_extensions.dart | 2 +- .../loan_module/pages/create_loan_request_page.dart | 11 +++++++++++ .../loan_module/pages/loan_equipment_detail_page.dart | 4 +--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/extensions/widget_extensions.dart b/lib/extensions/widget_extensions.dart index 3fd48cd8..25aee136 100644 --- a/lib/extensions/widget_extensions.dart +++ b/lib/extensions/widget_extensions.dart @@ -115,7 +115,7 @@ extension WidgetExtensions on Widget { bool withShadow = true, Color? backgroundColor, Color borderColor = Colors.transparent, - double padding = 16, + double padding = 12, EdgeInsets? paddingObject, EdgeInsets? margin, }) => diff --git a/lib/modules/loan_module/pages/create_loan_request_page.dart b/lib/modules/loan_module/pages/create_loan_request_page.dart index 7edef553..9590a9f4 100644 --- a/lib/modules/loan_module/pages/create_loan_request_page.dart +++ b/lib/modules/loan_module/pages/create_loan_request_page.dart @@ -145,6 +145,7 @@ class _CreateLoanRequestPageState extends State with Tick labelStyle: AppTextStyles.textFieldLabelStyle, hintStyle: AppTextStyles.textFieldLabelStyle, textInputType: TextInputType.text, + textInputAction: TextInputAction.next, showShadow: false, onSaved: (value) { _loanFormModel.docName = value; @@ -160,6 +161,7 @@ class _CreateLoanRequestPageState extends State with Tick labelStyle: AppTextStyles.textFieldLabelStyle, hintStyle: AppTextStyles.textFieldLabelStyle, textInputType: TextInputType.phone, + textInputAction: TextInputAction.next, showShadow: false, onSaved: (value) { _loanFormModel.docNumber = value; @@ -175,6 +177,7 @@ class _CreateLoanRequestPageState extends State with Tick labelStyle: AppTextStyles.textFieldLabelStyle, hintStyle: AppTextStyles.textFieldLabelStyle, textInputType: TextInputType.emailAddress, + textInputAction: TextInputAction.next, showShadow: false, onSaved: (value) { _loanFormModel.docEmail = value; @@ -295,6 +298,7 @@ class _CreateLoanRequestPageState extends State with Tick floatingLabelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), showShadow: false, textInputType: TextInputType.text, + textInputAction: TextInputAction.next, onChange: (value) { _loanFormModel.itemDescription = value; }, @@ -323,6 +327,7 @@ class _CreateLoanRequestPageState extends State with Tick floatingLabelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), showShadow: false, textInputType: TextInputType.text, + textInputAction: TextInputAction.next, onChange: (value) { _loanFormModel.requestDescription = value; }, @@ -340,6 +345,7 @@ class _CreateLoanRequestPageState extends State with Tick floatingLabelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), showShadow: false, textInputType: TextInputType.text, + textInputAction: TextInputAction.next, onChange: (value) { _loanFormModel.model = value; }, @@ -357,6 +363,7 @@ class _CreateLoanRequestPageState extends State with Tick floatingLabelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), showShadow: false, textInputType: TextInputType.text, + textInputAction: TextInputAction.next, onChange: (value) { _loanFormModel.manufacturer = value; }, @@ -401,6 +408,7 @@ class _CreateLoanRequestPageState extends State with Tick labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), showShadow: false, textInputType: TextInputType.name, + textInputAction: TextInputAction.next, onChange: (value) { _loanFormModel.vendorName = value; }, @@ -418,6 +426,7 @@ class _CreateLoanRequestPageState extends State with Tick labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), showShadow: false, textInputType: TextInputType.name, + textInputAction: TextInputAction.next, onChange: (value) { _loanFormModel.vendorRepresentativeName = value; }, @@ -435,6 +444,7 @@ class _CreateLoanRequestPageState extends State with Tick labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), showShadow: false, textInputType: TextInputType.phone, + textInputAction: TextInputAction.next, onChange: (value) { _loanFormModel.vendorNumber = value; }, @@ -455,6 +465,7 @@ class _CreateLoanRequestPageState extends State with Tick labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), showShadow: false, textInputType: TextInputType.emailAddress, + textInputAction: TextInputAction.next, onChange: (value) { _loanFormModel.vendorEmail = value; }, diff --git a/lib/modules/loan_module/pages/loan_equipment_detail_page.dart b/lib/modules/loan_module/pages/loan_equipment_detail_page.dart index 4d108e79..f9ed2c0e 100644 --- a/lib/modules/loan_module/pages/loan_equipment_detail_page.dart +++ b/lib/modules/loan_module/pages/loan_equipment_detail_page.dart @@ -86,11 +86,10 @@ class LoanEquipmentDetailPage extends StatelessWidget { "Attachments".addTranslation, style: AppTextStyles.heading4.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), ), - 8.height, FilesList(images: allAttachments.map((e) => URLs.getFileUrl(e.attachmentName ?? '') ?? '').toList() ?? []), ], ], - ).toShadowContainer(context), + ).toShadowContainer(context, padding: 12), ], ); }), @@ -100,7 +99,6 @@ class LoanEquipmentDetailPage extends StatelessWidget { List requestDetails(BuildContext context, LoanRequestModel loanData) { return [ Text("Request Details", style: AppTextStyles.heading4.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50)), - 6.height, 'Loan Type: ${loanData.loanTypeName ?? "-"}'.bodyText(context), 'Loan No: ${loanData.reqCode ?? "-"}'.bodyText(context), 'Loan Period: ${loanData.loanPeriodName ?? "-"}'.bodyText(context),