This commit is contained in:
venbaittech 2025-11-21 19:00:16 +05:30
parent 3233093da9
commit cd201d608e
6 changed files with 199 additions and 126 deletions

View File

@ -326,7 +326,7 @@ class RaiseEnqFormState extends ConsumerState<RaiseEnqForm> {
return Container( return Container(
// color: Color(0xFFFCFCFC), // color: Color(0xFFFCFCFC),
// margin: const EdgeInsets.symmetric(vertical: 8), // margin: const EdgeInsets.symmetric(vertical: 8),
padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 25), padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 25),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
@ -384,7 +384,7 @@ class RaiseEnqFormState extends ConsumerState<RaiseEnqForm> {
// width: fromHeader // width: fromHeader
// ? MediaQuery.of(context).size.width * 0.11 // ? MediaQuery.of(context).size.width * 0.11
// : MediaQuery.of(context).size.width * 0.08, // : MediaQuery.of(context).size.width * 0.08,
height: 30, // height: 30,
child: DropdownSearch<Map<String, dynamic>>( child: DropdownSearch<Map<String, dynamic>>(
key: dropDownKeyAgent, key: dropDownKeyAgent,
selectedItem: selectedAgntName.isNotEmpty ? selectedAgntName : null, selectedItem: selectedAgntName.isNotEmpty ? selectedAgntName : null,
@ -564,6 +564,7 @@ class RaiseEnqFormState extends ConsumerState<RaiseEnqForm> {
// errorText: fieldErrors['name'], // errorText: fieldErrors['name'],
borderColor: Color(0xFFE2E8F0), borderColor: Color(0xFFE2E8F0),
highlightColor: Color(0xFF50A398), highlightColor: Color(0xFF50A398),
padVertical: 13,
isdense: true, isdense: true,
validator: (value) => Validators.requiredField(value, "name"), validator: (value) => Validators.requiredField(value, "name"),
widthNone: true, widthNone: true,
@ -585,7 +586,7 @@ class RaiseEnqFormState extends ConsumerState<RaiseEnqForm> {
SizedBox(height: 5), SizedBox(height: 5),
Container( Container(
height: 30, // height: 30,
width: MediaQuery.of(context).size.width * 0.12, width: MediaQuery.of(context).size.width * 0.12,
child: DropdownSearch<Map<String, dynamic>>( child: DropdownSearch<Map<String, dynamic>>(
key: dropDownKeyInsurerEnqAsgn, key: dropDownKeyInsurerEnqAsgn,
@ -746,6 +747,7 @@ class RaiseEnqFormState extends ConsumerState<RaiseEnqForm> {
hintText: 'Vehicle Number', hintText: 'Vehicle Number',
borderColor: Color(0xFFE2E8F0), borderColor: Color(0xFFE2E8F0),
highlightColor: Color(0xFF50A398), highlightColor: Color(0xFF50A398),
padVertical: 13,
isdense: true, isdense: true,
inputFormatters: [ inputFormatters: [
UpperCaseTextFormatter(), // 👈 custom formatter for uppercase UpperCaseTextFormatter(), // 👈 custom formatter for uppercase
@ -777,7 +779,7 @@ class RaiseEnqFormState extends ConsumerState<RaiseEnqForm> {
SizedBox(height: 5), SizedBox(height: 5),
SizedBox( SizedBox(
height: 30, // height: 30,
width: MediaQuery.of(context).size.width * 0.15, width: MediaQuery.of(context).size.width * 0.15,
child: DropdownSearch<Map<String, dynamic>>( child: DropdownSearch<Map<String, dynamic>>(
key: dropDownSelectStaffKey, key: dropDownSelectStaffKey,

View File

@ -371,6 +371,7 @@ class CreateProposalFormState extends ConsumerState<CreateProposalForm> {
// final bool isUpdating = widget.selectedQuotationFrmListId != null; // final bool isUpdating = widget.selectedQuotationFrmListId != null;
// final id = widget.selectedQuotationFrmListId!; // final id = widget.selectedQuotationFrmListId!;
print("userDatauserData1 - $userData");
final bool isUpdating = widget.selectedQuotationFrmListId != null; final bool isUpdating = widget.selectedQuotationFrmListId != null;
final id = widget.selectedQuotationFrmListId; // keep nullable final id = widget.selectedQuotationFrmListId; // keep nullable
@ -396,6 +397,7 @@ class CreateProposalFormState extends ConsumerState<CreateProposalForm> {
// request.fields['_method'] = 'PUT'; // request.fields['_method'] = 'PUT';
request.fields['id'] = id!; request.fields['id'] = id!;
request.fields['updated_by'] = widget.userId!.toString(); request.fields['updated_by'] = widget.userId!.toString();
request.fields['created_by'] = widget.userId!.toString();
} else { } else {
print('Not Updatrinf'); print('Not Updatrinf');
request.fields['created_by'] = widget.userId!.toString(); request.fields['created_by'] = widget.userId!.toString();
@ -591,6 +593,7 @@ class CreateProposalFormState extends ConsumerState<CreateProposalForm> {
SizedBox(height: 10), SizedBox(height: 10),
ThemedFormField( ThemedFormField(
controller: controllers['idv']!, controller: controllers['idv']!,
inputFormatters: [ inputFormatters: [
FilteringTextInputFormatter.allow(RegExp(r'[0-9.]')), FilteringTextInputFormatter.allow(RegExp(r'[0-9.]')),
], ],
@ -603,7 +606,7 @@ class CreateProposalFormState extends ConsumerState<CreateProposalForm> {
txtwidth: ResponsiveLayout.isMobile(context) txtwidth: ResponsiveLayout.isMobile(context)
? null ? null
: MediaQuery.of(context).size.width * 0.18, : MediaQuery.of(context).size.width * 0.18,
txtheight: 35, // txtheight: 35,
), ),
], ],
); );
@ -628,7 +631,7 @@ class CreateProposalFormState extends ConsumerState<CreateProposalForm> {
txtwidth: ResponsiveLayout.isMobile(context) txtwidth: ResponsiveLayout.isMobile(context)
? null ? null
: MediaQuery.of(context).size.width * 0.18, : MediaQuery.of(context).size.width * 0.18,
txtheight: 35, // txtheight: 35,
), ),
], ],
); );
@ -650,7 +653,7 @@ class CreateProposalFormState extends ConsumerState<CreateProposalForm> {
width: ResponsiveLayout.isMobile(context) width: ResponsiveLayout.isMobile(context)
? null ? null
: MediaQuery.of(context).size.width * 0.18, : MediaQuery.of(context).size.width * 0.18,
height: 35, // height: 35,
child: DropdownSearch<Map<String, dynamic>>( child: DropdownSearch<Map<String, dynamic>>(
key: dropDownKey, key: dropDownKey,
selectedItem: selectedVehicle.isNotEmpty ? selectedVehicle : null, selectedItem: selectedVehicle.isNotEmpty ? selectedVehicle : null,
@ -804,7 +807,7 @@ class CreateProposalFormState extends ConsumerState<CreateProposalForm> {
width: ResponsiveLayout.isMobile(context) width: ResponsiveLayout.isMobile(context)
? null ? null
: MediaQuery.of(context).size.width * 0.18, : MediaQuery.of(context).size.width * 0.18,
height: 35, // height: 35,
child: DropdownSearch<Map<String, dynamic>>( child: DropdownSearch<Map<String, dynamic>>(
key: dropDownSelectPaymentModeKey, key: dropDownSelectPaymentModeKey,
selectedItem: selectedVehicle.isNotEmpty ? selectedVehicle : null, selectedItem: selectedVehicle.isNotEmpty ? selectedVehicle : null,
@ -938,7 +941,7 @@ class CreateProposalFormState extends ConsumerState<CreateProposalForm> {
width: ResponsiveLayout.isMobile(context) width: ResponsiveLayout.isMobile(context)
? null ? null
: MediaQuery.of(context).size.width * 0.18, : MediaQuery.of(context).size.width * 0.18,
height: 35, // height: 35,
child: DropdownSearch<Map<String, dynamic>>( child: DropdownSearch<Map<String, dynamic>>(
key: dropDownKeyBroker, key: dropDownKeyBroker,
selectedItem: selectedBrokers.isNotEmpty ? selectedBrokers : null, selectedItem: selectedBrokers.isNotEmpty ? selectedBrokers : null,
@ -1066,19 +1069,46 @@ class CreateProposalFormState extends ConsumerState<CreateProposalForm> {
children: [ children: [
ThemedUploadField( ThemedUploadField(
hintText: selectedFileNames ?? "Upload Document", hintText: selectedFileNames ?? "Upload Document",
txtheight: 40, // txtheight: 40,
txtwidth: ResponsiveLayout.isMobile(context) txtwidth: ResponsiveLayout.isMobile(context)
? null ? null
: MediaQuery.of(context).size.width * 0.18, : MediaQuery.of(context).size.width * 0.18,
borderColor: Color(0xFFE2E8F0), borderColor: Color(0xFFE2E8F0),
// highlightColor: Color(0xFF50A398), // highlightColor: Color(0xFF50A398),
// backgroundColor: Color(0xFFEDF6F5), // backgroundColor: Color(0xFFEDF6F5),
onFileSelected: (fileName, file) { onFileSelected: (fileName, file) async {
print("Picked file: $fileName (${file.size} bytes)");
if (!fileName.toLowerCase().endsWith('.pdf')) {
ToastHelper.showErrorToast(
context,
'Only PDF files are allowed.',
);
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('Only PDF files are allowed.'),
backgroundColor: Colors.red,
),
);
return; // Stop here
}
print("Picked file: $fileName (${file.size} bytes)"); print("Picked file: $fileName (${file.size} bytes)");
setState(() { setState(() {
docUploadedFile = file; docUploadedFile = file;
}); });
// if (selectedBrokerName == 'Nhance') {
// handleUploadPolicy();
// }
}, },
// onFileSelected: (fileName, file) {
// print("Picked file: $fileName (${file.size} bytes)");
// setState(() {
// docUploadedFile = file;
// });
// },
), ),
// const SizedBox(height: 5), // const SizedBox(height: 5),
// //

View File

@ -404,7 +404,20 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
} }
} }
String fixInvalidDate(dynamic value) {
if (value == null) return '';
final str = value.toString();
// Check for your invalid date patterns
if (str.contains('--0001') || str == '30-11--0001' || str == '0000-00-00') {
return '';
}
return str;
}
void updatePolicyData(Map<String, dynamic> policyData) { void updatePolicyData(Map<String, dynamic> policyData) {
print("updatePolicyDataupdatePolicyData - $policyData");
if (!mounted || policyData.isEmpty) return; if (!mounted || policyData.isEmpty) return;
setState(() { setState(() {
@ -422,11 +435,18 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
policyData['policy_number']?.toString() ?? ''; policyData['policy_number']?.toString() ?? '';
controllers["policyPaymentMode"]?.text = controllers["policyPaymentMode"]?.text =
policyData['payment_mode']?.toString() ?? ''; policyData['payment_mode']?.toString() ?? '';
controllers["issueDate"]?.text =
policyData['issued_date']?.toString() ?? ''; controllers["issueDate"]?.text = fixInvalidDate(
controllers["startDate"]?.text = policyData['issued_date'],
policyData['start_date']?.toString() ?? ''; );
controllers["endDate"]?.text = policyData['end_date']?.toString() ?? ''; controllers["startDate"]?.text = fixInvalidDate(policyData['start_date']);
controllers["endDate"]?.text = fixInvalidDate(policyData['end_date']);
// controllers["issueDate"]?.text =
// policyData['issued_date']?.toString() ?? '';
// controllers["startDate"]?.text =
// policyData['start_date']?.toString() ?? '';
// controllers["endDate"]?.text = policyData['end_date']?.toString() ?? '';
controllers["tp"]?.text = policyData['tp']?.toString() ?? ''; controllers["tp"]?.text = policyData['tp']?.toString() ?? '';
controllers["od"]?.text = policyData['od']?.toString() ?? ''; controllers["od"]?.text = policyData['od']?.toString() ?? '';
@ -479,7 +499,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
} }
void updateUploadPDFPolicyData(Map<String, dynamic> policyData) { void updateUploadPDFPolicyData(Map<String, dynamic> policyData) {
print('updateUploadPDFPolicyData - $policyData'); print('updateUploadPDFPolicyDataJJ - $policyData');
if (!mounted || policyData.isEmpty) return; if (!mounted || policyData.isEmpty) return;
setState(() { setState(() {
@ -527,9 +547,9 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
} }
void handleSave() { void handleSave() {
if (!_formKey.currentState!.validate()) return; // if (!_formKey.currentState!.validate()) return;
setState(() { setState(() {
if (_formKey.currentState!.validate()) { // if (_formKey.currentState!.validate()) {
calculateAmount(); calculateAmount();
dataDetails(); dataDetails();
final dataSet = dataDetails(); final dataSet = dataDetails();
@ -553,9 +573,9 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
return; return;
} }
createUserData(dataSet); createUserData(dataSet);
} else { // } else {
// isDi sable = false; // // isDi sable = false;
} // }
}); });
} }
@ -1070,6 +1090,14 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
key: _formKey, key: _formKey,
child: Column( child: Column(
children: [ children: [
if (docUploadedPDFFileUrlFromApi == null ||
docUploadedPDFFileUrlFromApi!.isEmpty) ...[
Text('No Data Found'),
],
// Show form fields when URL is NOT null AND NOT empty
if (docUploadedPDFFileUrlFromApi != null &&
docUploadedPDFFileUrlFromApi!.isNotEmpty) ...[
Row( Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -1132,6 +1160,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
), ),
], ],
], ],
],
), ),
); );
} }
@ -1393,13 +1422,13 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text('Policy Number *', style: _textStyle), Text('Policy Number ', style: _textStyle),
SizedBox(height: 10), SizedBox(height: 10),
ThemedFormField( ThemedFormField(
controller: controllers['policyNumber']!, controller: controllers['policyNumber']!,
borderColor: Color(0xFFE2E8F0), borderColor: Color(0xFFE2E8F0),
highlightColor: Color(0xFF50A398), highlightColor: Color(0xFF50A398),
validator: (value) => Validators.requiredField(value, "policyNumber"), // validator: (value) => Validators.requiredField(value, "policyNumber"),
inputFormatters: [ inputFormatters: [
FilteringTextInputFormatter.allow(RegExp(r'[a-zA-Z 0-9]')), FilteringTextInputFormatter.allow(RegExp(r'[a-zA-Z 0-9]')),
], ],
@ -1605,7 +1634,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text('Issue Date *', style: _textStyle), Text('Issue Date', style: _textStyle),
SizedBox(height: 10), SizedBox(height: 10),
ThemedDateField( ThemedDateField(
hintText: "Select Date", hintText: "Select Date",
@ -1614,7 +1643,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
: MediaQuery.of(context).size.width * 0.14, : MediaQuery.of(context).size.width * 0.14,
txtheight: 50, txtheight: 50,
// backgroundColor: const Color(0xFFECECEC), // backgroundColor: const Color(0xFFECECEC),
validator: (value) => Validators.requiredField(value, "date"), // validator: (value) => Validators.requiredField(value, "date"),
controller: controllers['issueDate']!, controller: controllers['issueDate']!,
onDateSelected: (date) { onDateSelected: (date) {
print("Picked Date: $date"); print("Picked Date: $date");
@ -1633,7 +1662,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text('Start Date *', style: _textStyle), Text('Start Date', style: _textStyle),
SizedBox(height: 10), SizedBox(height: 10),
ThemedDateField( ThemedDateField(
hintText: "Select Date", hintText: "Select Date",
@ -1642,7 +1671,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
: MediaQuery.of(context).size.width * 0.14, : MediaQuery.of(context).size.width * 0.14,
txtheight: 50, txtheight: 50,
// backgroundColor: const Color(0xFFECECEC), // backgroundColor: const Color(0xFFECECEC),
validator: (value) => Validators.requiredField(value, "date"), // validator: (value) => Validators.requiredField(value, "date"),
controller: controllers['startDate']!, controller: controllers['startDate']!,
onDateSelected: (date) { onDateSelected: (date) {
print("Picked Date: $date"); print("Picked Date: $date");
@ -1674,7 +1703,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text('End Date *', style: _textStyle), Text('End Date', style: _textStyle),
SizedBox(height: 10), SizedBox(height: 10),
ThemedDateField( ThemedDateField(
hintText: "Select Date", hintText: "Select Date",
@ -1685,9 +1714,9 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
// backgroundColor: const Color(0xFFECECEC), // backgroundColor: const Color(0xFFECECEC),
// validator: (value) => Validators.requiredField(value, "date"), // validator: (value) => Validators.requiredField(value, "date"),
validator: (value) { validator: (value) {
if (value == null || value.isEmpty) { // if (value == null || value.isEmpty) {
return "Required"; // return "Required";
} // }
final startDateControllerText = controllers['startDate']?.text; final startDateControllerText = controllers['startDate']?.text;
if (startDateControllerText == null || if (startDateControllerText == null ||
@ -1698,7 +1727,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
final startDate = DateFormat( final startDate = DateFormat(
'dd-MM-yyyy', 'dd-MM-yyyy',
).parse(startDateControllerText); ).parse(startDateControllerText);
final endDate = DateFormat('dd-MM-yyyy').parse(value); final endDate = DateFormat('dd-MM-yyyy').parse(value!);
if (endDate.isBefore(startDate)) { if (endDate.isBefore(startDate)) {
return "End date cannot be before start date"; return "End date cannot be before start date";
@ -1993,7 +2022,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
children: [ children: [
SizedBox( SizedBox(
width: MediaQuery.of(context).size.width * 0.15, width: MediaQuery.of(context).size.width * 0.15,
child: Text('Third Party *', style: _textStyle), child: Text('Third Party', style: _textStyle),
), ),
SizedBox(width: 20), SizedBox(width: 20),
ThemedFormField( ThemedFormField(
@ -2001,7 +2030,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
// backgroundColor: Color(0xffEDF6F5), // backgroundColor: Color(0xffEDF6F5),
errorBorderColor: Color(0xffEDF6F5), errorBorderColor: Color(0xffEDF6F5),
hintText: '0', hintText: '0',
validator: (value) => Validators.requiredField(value, "Third Party"), // validator: (value) => Validators.requiredField(value, "Third Party"),
inputFormatters: [ inputFormatters: [
FilteringTextInputFormatter.allow(RegExp(r'[.0-9]')), FilteringTextInputFormatter.allow(RegExp(r'[.0-9]')),
], ],
@ -2025,7 +2054,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
children: [ children: [
SizedBox( SizedBox(
width: MediaQuery.of(context).size.width * 0.15, width: MediaQuery.of(context).size.width * 0.15,
child: Text('Own Damage *', style: _textStyle), child: Text('Own Damage ', style: _textStyle),
), ),
SizedBox(width: 20), SizedBox(width: 20),
ThemedFormField( ThemedFormField(
@ -2033,7 +2062,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
// backgroundColor: Color(0xffEDF6F5), // backgroundColor: Color(0xffEDF6F5),
errorBorderColor: Color(0xffEDF6F5), errorBorderColor: Color(0xffEDF6F5),
hintText: '0', hintText: '0',
validator: (value) => Validators.requiredField(value, "OwnDamage"), // validator: (value) => Validators.requiredField(value, "OwnDamage"),
onChanged: (value) => calculateAmount(), onChanged: (value) => calculateAmount(),
inputFormatters: [ inputFormatters: [
FilteringTextInputFormatter.allow(RegExp(r'[.0-9]')), FilteringTextInputFormatter.allow(RegExp(r'[.0-9]')),
@ -2053,7 +2082,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
children: [ children: [
SizedBox( SizedBox(
width: MediaQuery.of(context).size.width * 0.15, width: MediaQuery.of(context).size.width * 0.15,
child: Text('Personal Accident*', style: _textStyle), child: Text('Personal Accident', style: _textStyle),
), ),
SizedBox(width: 20), SizedBox(width: 20),
ThemedFormField( ThemedFormField(
@ -2062,8 +2091,8 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
errorBorderColor: Color(0xffEDF6F5), errorBorderColor: Color(0xffEDF6F5),
hintText: '0', hintText: '0',
onChanged: (value) => calculateAmount(), onChanged: (value) => calculateAmount(),
validator: (value) => // validator: (value) =>
Validators.requiredField(value, "PersonalAccident"), // Validators.requiredField(value, "PersonalAccident"),
inputFormatters: [ inputFormatters: [
FilteringTextInputFormatter.allow(RegExp(r'[.0-9]')), FilteringTextInputFormatter.allow(RegExp(r'[.0-9]')),
], ],
@ -2082,7 +2111,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
children: [ children: [
SizedBox( SizedBox(
width: MediaQuery.of(context).size.width * 0.15, width: MediaQuery.of(context).size.width * 0.15,
child: Text('CGST *', style: _textStyle), child: Text('CGST', style: _textStyle),
), ),
SizedBox(width: 20), SizedBox(width: 20),
ThemedFormField( ThemedFormField(
@ -2109,7 +2138,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
children: [ children: [
SizedBox( SizedBox(
width: MediaQuery.of(context).size.width * 0.15, width: MediaQuery.of(context).size.width * 0.15,
child: Text('SGST *', style: _textStyle), child: Text('SGST', style: _textStyle),
), ),
SizedBox(width: 20), SizedBox(width: 20),
ThemedFormField( ThemedFormField(
@ -2136,7 +2165,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
children: [ children: [
SizedBox( SizedBox(
width: MediaQuery.of(context).size.width * 0.15, width: MediaQuery.of(context).size.width * 0.15,
child: Text('IGST *', style: _textStyle), child: Text('IGST', style: _textStyle),
), ),
SizedBox(width: 20), SizedBox(width: 20),
ThemedFormField( ThemedFormField(

View File

@ -126,9 +126,11 @@ class TabEnquiryStaffListState extends ConsumerState<TabEnquiryStaffList> {
// } // }
// Auto-select tab based on showKey // Auto-select tab based on showKey
if (widget.showKey == "Policy") { // if (widget.showKey == "Policy") {
selectedIndex = 1; // Policy tab index // selectedIndex = 1; // Policy tab index
} else if (tabIndex != null) { // } else
if (tabIndex != null) {
selectedIndex = tabIndex; selectedIndex = tabIndex;
} else { } else {
selectedIndex = 0; // Default Quotation tab selectedIndex = 0; // Default Quotation tab

View File

@ -106,9 +106,14 @@ class ThemedFormField extends HookWidget {
), ),
filled: true, filled: true,
fillColor: backgroundColor ?? Colors.white, fillColor: backgroundColor ?? Colors.white,
// contentPadding: EdgeInsets.symmetric(
// vertical: verticalPad ?? 12,
// horizontal: horizonalPad ?? 15,
// ),
contentPadding: EdgeInsets.symmetric( contentPadding: EdgeInsets.symmetric(
vertical: verticalPad ?? 14, vertical: verticalPad ?? 10,
horizontal: horizonalPad ?? 15, horizontal: 10,
), ),
border: OutlineInputBorder( border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),

View File

@ -30,6 +30,7 @@ class ThemedFormInlineField extends HookWidget {
this.isShowCursor, this.isShowCursor,
this.onChanged, this.onChanged,
this.isdense, this.isdense,
this.padVertical,
}); });
final String? hintText; final String? hintText;
@ -52,6 +53,7 @@ class ThemedFormInlineField extends HookWidget {
final TextInputType? keyboardType; final TextInputType? keyboardType;
final int? maxLength; final int? maxLength;
final double? txtheight; final double? txtheight;
final double? padVertical;
final List<TextInputFormatter>? inputFormatters; final List<TextInputFormatter>? inputFormatters;
// void Function(dynamic value)? onChanged; // void Function(dynamic value)? onChanged;
final ValueChanged<String>? onChanged; final ValueChanged<String>? onChanged;
@ -100,7 +102,10 @@ class ThemedFormInlineField extends HookWidget {
filled: true, filled: true,
fillColor: backgroundColor ?? Colors.white, fillColor: backgroundColor ?? Colors.white,
// contentPadding: const EdgeInsets.symmetric(vertical: 14, horizontal: 2), // contentPadding: const EdgeInsets.symmetric(vertical: 14, horizontal: 2),
contentPadding: const EdgeInsets.symmetric(vertical: 10, horizontal: 10), contentPadding: EdgeInsets.symmetric(
vertical: padVertical ?? 10,
horizontal: 10,
),
border: OutlineInputBorder( border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5), borderRadius: BorderRadius.circular(5),