From 3d77a96fda98b4b12a237ad6e7d9751a110bdbf8 Mon Sep 17 00:00:00 2001 From: WaseemAbbasi22 Date: Wed, 28 Jan 2026 09:42:15 +0300 Subject: [PATCH] added vendor dropdown along with free text --- .../pages/create_loan_request_page.dart | 37 ++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) 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 a896526d..b544eb99 100644 --- a/lib/modules/loan_module/pages/create_loan_request_page.dart +++ b/lib/modules/loan_module/pages/create_loan_request_page.dart @@ -439,7 +439,42 @@ class _CreateLoanRequestPageState extends State with Tick List vendorDetailsSection() { return [ - 'Vendor Details'.addTranslation.bodyText(context).custom(color: AppColor.black10), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + 'Vendor Details'.addTranslation.bodyText(context).custom(color: AppColor.black10), + Row( + children: [ + Container( + height: 24, + width: 24, + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: AppColor.primary10, // or AppColor.blueStatus(context) + ), + alignment: Alignment.center, + child: Icon( + !_loanFormModel.isNewVendor? Icons.add:Icons.search, + color: Colors.white, + size: 16, + ), + ), + 4.width, + Text( + !_loanFormModel.isNewVendor ? "Add new vendor" : "Select existing vendor", + style: AppTextStyles.bodyText.copyWith( + color: context.isDark ? AppColor.neutral30 : AppColor.neutral50, + // decoration: TextDecoration.underline, + ), + ), + ], + ).onPress(() async { + setState(() { + _loanFormModel.isNewVendor = !_loanFormModel.isNewVendor; + }); + }), + ], + ), 8.height, if (!_loanFormModel.isNewVendor) ...[ SingleItemDropDownMenu(