UI_SEMATICS
This commit is contained in:
parent
07cc47d8bb
commit
a7310238c0
@ -137,7 +137,7 @@ class _AccomodationScreenState extends State<AccomodationScreen> {
|
||||
_hotelNameFocusNode,
|
||||
(focus) => _isHotelNameFocused = focus,
|
||||
);
|
||||
_addFocusListener( _CategoryFocusNode, (focus) => _CategoryFocused = focus);
|
||||
_addFocusListener(_CategoryFocusNode, (focus) => _CategoryFocused = focus);
|
||||
_addFocusListener(_checkInFocusNode, (focus) => _checkInFocus = focus);
|
||||
_addFocusListener(
|
||||
_checkInTimeFocusNode,
|
||||
@ -201,7 +201,7 @@ class _AccomodationScreenState extends State<AccomodationScreen> {
|
||||
// flightLastTripDateNotifier.value = checkoutDate;
|
||||
// }
|
||||
|
||||
final tripType = result['tripType'] ;
|
||||
final tripType = result['tripType'];
|
||||
|
||||
if (checkinDate != null) {
|
||||
flightFirstTripDateNotifier.value = checkinDate;
|
||||
@ -230,7 +230,9 @@ class _AccomodationScreenState extends State<AccomodationScreen> {
|
||||
final checkInDateInput = flightFirstTripDateNotifier.value;
|
||||
if (checkInDateInput != null && checkInDateInput.isNotEmpty) {
|
||||
try {
|
||||
final parsedDate = DateFormat("dd-MM-yyyy").parseStrict(checkInDateInput);
|
||||
final parsedDate = DateFormat(
|
||||
"dd-MM-yyyy",
|
||||
).parseStrict(checkInDateInput);
|
||||
_checkInController.text = DateFormat("dd-MM-yyyy").format(parsedDate);
|
||||
} catch (e) {
|
||||
_checkInController.text = '';
|
||||
@ -241,8 +243,12 @@ class _AccomodationScreenState extends State<AccomodationScreen> {
|
||||
final checkOutDateInput = flightLastTripDateNotifier.value;
|
||||
if (checkOutDateInput != null && checkOutDateInput.isNotEmpty) {
|
||||
try {
|
||||
final parsedDate = DateFormat("dd-MM-yyyy").parseStrict(checkOutDateInput);
|
||||
_checkOutController.text = DateFormat("dd-MM-yyyy").format(parsedDate);
|
||||
final parsedDate = DateFormat(
|
||||
"dd-MM-yyyy",
|
||||
).parseStrict(checkOutDateInput);
|
||||
_checkOutController.text = DateFormat(
|
||||
"dd-MM-yyyy",
|
||||
).format(parsedDate);
|
||||
} catch (e) {
|
||||
_checkOutController.text = '';
|
||||
}
|
||||
@ -280,9 +286,9 @@ class _AccomodationScreenState extends State<AccomodationScreen> {
|
||||
|
||||
setState(() {
|
||||
layoutColor =
|
||||
layoutString != null
|
||||
? Color(int.parse(layoutString))
|
||||
: Colors.redAccent;
|
||||
layoutString != null
|
||||
? Color(int.parse(layoutString))
|
||||
: Colors.redAccent;
|
||||
});
|
||||
}
|
||||
|
||||
@ -581,7 +587,7 @@ class _AccomodationScreenState extends State<AccomodationScreen> {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
final List<String> items = ['Apple', 'Banana', 'Orange', 'Mango'];
|
||||
// Default selected value
|
||||
// selectedClass ??=
|
||||
// dropdownItems.isNotEmpty ? dropdownItems.first.value : null;
|
||||
@ -619,7 +625,7 @@ class _AccomodationScreenState extends State<AccomodationScreen> {
|
||||
width:
|
||||
isDesktop
|
||||
? MediaQuery.of(context).size.width * 0.34
|
||||
: null,//MediaQuery.of(context).size.width * 0.66,
|
||||
: null, //MediaQuery.of(context).size.width * 0.66,
|
||||
child: SizedBox(
|
||||
height: 40,
|
||||
child: TextField(
|
||||
@ -660,6 +666,7 @@ class _AccomodationScreenState extends State<AccomodationScreen> {
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldItnerarySubWrapper(
|
||||
isFocused: _isHotelNameFocused,
|
||||
|
||||
isDesktop: isDesktop,
|
||||
// width:
|
||||
// isDesktop
|
||||
@ -725,140 +732,144 @@ class _AccomodationScreenState extends State<AccomodationScreen> {
|
||||
// Request focus when user taps
|
||||
_CategoryFocusNode?.requestFocus();
|
||||
},
|
||||
child: DropdownSearch<Map<String, dynamic>>(
|
||||
key:
|
||||
selectedClass == null
|
||||
? UniqueKey()
|
||||
: ValueKey(selectedClass),
|
||||
child: DropdownSearch<Map<String, dynamic>>(
|
||||
// key:
|
||||
// selectedClass == null
|
||||
// ? UniqueKey()
|
||||
// : ValueKey(selectedClass),
|
||||
items: purposeList.cast<Map<String, dynamic>>(),
|
||||
// selectedItem: purposeList.firstWhere(
|
||||
// (item) => item['dropdown_key'] == selectedClass,
|
||||
// orElse: () => {},
|
||||
// ),
|
||||
selectedItem:
|
||||
selectedClass != null
|
||||
? purposeList.firstWhere(
|
||||
(item) => item['dropdown_key'] == selectedClass,
|
||||
orElse: () => {},
|
||||
)
|
||||
: null,
|
||||
|
||||
items: purposeList.cast<Map<String, dynamic>>(),
|
||||
// selectedItem: purposeList.firstWhere(
|
||||
// (item) => item['dropdown_key'] == selectedClass,
|
||||
// orElse: () => {},
|
||||
// ),
|
||||
selectedItem:
|
||||
selectedClass != null
|
||||
? purposeList.firstWhere(
|
||||
(item) => item['dropdown_key'] == selectedClass,
|
||||
orElse: () => {},
|
||||
)
|
||||
: null,
|
||||
|
||||
itemAsString: (item) => item['dropdown_value'] ?? '',
|
||||
popupProps: PopupProps.menu(
|
||||
showSearchBox: false,
|
||||
fit: FlexFit.loose,
|
||||
menuProps: const MenuProps(backgroundColor: Colors.white),
|
||||
itemBuilder: (context, item, isSelected) {
|
||||
print("categotey - $item ");
|
||||
final bool isNotAllowed = item['is_allowed'] == 'No';
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 5,
|
||||
),
|
||||
child: Text(
|
||||
item['dropdown_value'] ?? '',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: isNotAllowed ? Colors.redAccent : Colors.black,
|
||||
itemAsString: (item) => item['dropdown_value'] ?? '',
|
||||
popupProps: PopupProps.menu(
|
||||
showSearchBox: false,
|
||||
fit: FlexFit.loose,
|
||||
menuProps: const MenuProps(backgroundColor: Colors.white),
|
||||
itemBuilder: (context, item, isSelected) {
|
||||
print("categotey - $item ");
|
||||
final bool isNotAllowed = item['is_allowed'] == 'No';
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 5,
|
||||
),
|
||||
child: Text(
|
||||
item['dropdown_value'] ?? '',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color:
|
||||
isNotAllowed
|
||||
? Colors.redAccent
|
||||
: Colors.black,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
dropdownDecoratorProps: DropDownDecoratorProps(
|
||||
dropdownSearchDecoration: InputDecoration(
|
||||
// border: InputBorder.none,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(_CategoryFocused ?? false)
|
||||
? layoutColor!
|
||||
: Colors.white,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(_CategoryFocused ?? false)
|
||||
? layoutColor
|
||||
: Colors.white,
|
||||
// : const Color(0xFFD6D5E6),
|
||||
width: 1,
|
||||
// const Color(0xFFD6D5E6),
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: layoutColor, width: 1),
|
||||
),
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 10,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
dropdownDecoratorProps: DropDownDecoratorProps(
|
||||
dropdownSearchDecoration: InputDecoration(
|
||||
// border: InputBorder.none,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(_CategoryFocused ?? false)
|
||||
? layoutColor!
|
||||
: Colors.white,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(_CategoryFocused ?? false)
|
||||
? layoutColor
|
||||
: Colors.white,
|
||||
// : const Color(0xFFD6D5E6),
|
||||
width: 1,
|
||||
// const Color(0xFFD6D5E6),
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: layoutColor, width: 1),
|
||||
),
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 10,
|
||||
),
|
||||
dropdownBuilder: (context, selectedItem) {
|
||||
if (selectedItem == null || selectedItem.isEmpty) {
|
||||
return Text(
|
||||
"Select ",
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.grey,
|
||||
fontSize: 13,
|
||||
),
|
||||
);
|
||||
}
|
||||
return Text(
|
||||
selectedItem['dropdown_value'] ?? '',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
// color: Colors.red,
|
||||
color: Colors.black,
|
||||
),
|
||||
);
|
||||
},
|
||||
onChanged:
|
||||
purposeList.isNotEmpty
|
||||
? (Map<String, dynamic>? newValue) async {
|
||||
if (newValue != null &&
|
||||
newValue['is_allowed'] == 'No') {
|
||||
final confirm = await showNotAllowedDialog(
|
||||
context,
|
||||
message:
|
||||
"You are not entitled for this service. If you wish to continue with this service, you may require another approval.",
|
||||
);
|
||||
|
||||
if (confirm) {
|
||||
setState(() {
|
||||
exceptionalClass = "1";
|
||||
selectedClass = newValue['dropdown_key'];
|
||||
});
|
||||
print("Selected Purpose: ${selectedClass}");
|
||||
} else {
|
||||
setState(() {
|
||||
exceptionalClass = "0";
|
||||
selectedClass =
|
||||
null; // ❌ Clear selection if user cancels
|
||||
});
|
||||
print(
|
||||
"selectedItem resolved to: ${selectedClass}",
|
||||
);
|
||||
}
|
||||
|
||||
return;
|
||||
} else if (newValue != null &&
|
||||
newValue['is_allowed'] == 'yes') {
|
||||
setState(() {
|
||||
exceptionalClass = "0";
|
||||
selectedClass = newValue?['dropdown_key'];
|
||||
print("Selected Purpose: ${selectedClass}");
|
||||
});
|
||||
}
|
||||
}
|
||||
: null,
|
||||
),
|
||||
),
|
||||
dropdownBuilder: (context, selectedItem) {
|
||||
if (selectedItem == null || selectedItem.isEmpty) {
|
||||
return Text(
|
||||
"Select ",
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.grey,
|
||||
fontSize: 13,
|
||||
),
|
||||
);
|
||||
}
|
||||
return Text(
|
||||
selectedItem['dropdown_value'] ?? '',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
// color: Colors.red,
|
||||
color: Colors.black,
|
||||
),
|
||||
);
|
||||
},
|
||||
onChanged:
|
||||
purposeList.isNotEmpty
|
||||
? (Map<String, dynamic>? newValue) async {
|
||||
if (newValue != null &&
|
||||
newValue['is_allowed'] == 'No') {
|
||||
final confirm = await showNotAllowedDialog(
|
||||
context,
|
||||
message:
|
||||
"You are not entitled for this service. If you wish to continue with this service, you may require another approval.",
|
||||
);
|
||||
|
||||
if (confirm) {
|
||||
setState(() {
|
||||
exceptionalClass = "1";
|
||||
selectedClass = newValue['dropdown_key'];
|
||||
});
|
||||
print("Selected Purpose: ${selectedClass}");
|
||||
} else {
|
||||
setState(() {
|
||||
exceptionalClass = "0";
|
||||
selectedClass =
|
||||
null; // ❌ Clear selection if user cancels
|
||||
});
|
||||
print(
|
||||
"selectedItem resolved to: ${selectedClass}",
|
||||
);
|
||||
}
|
||||
|
||||
return;
|
||||
} else if (newValue != null &&
|
||||
newValue['is_allowed'] == 'yes') {
|
||||
setState(() {
|
||||
exceptionalClass = "0";
|
||||
selectedClass = newValue?['dropdown_key'];
|
||||
print("Selected Purpose: ${selectedClass}");
|
||||
});
|
||||
}
|
||||
}
|
||||
: null,
|
||||
),),),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (errorMessages["class"] != null) ...[
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -239,9 +239,9 @@ class _TrainScreenState extends State<TrainScreen> {
|
||||
|
||||
setState(() {
|
||||
layoutColor =
|
||||
layoutString != null
|
||||
? Color(int.parse(layoutString))
|
||||
: Colors.redAccent;
|
||||
layoutString != null
|
||||
? Color(int.parse(layoutString))
|
||||
: Colors.redAccent;
|
||||
});
|
||||
}
|
||||
|
||||
@ -662,163 +662,168 @@ class _TrainScreenState extends State<TrainScreen> {
|
||||
child: SizedBox(
|
||||
height: 40,
|
||||
width: double.infinity,
|
||||
child: Focus(
|
||||
focusNode: _typeOfClassFocusNode,
|
||||
onFocusChange: (hasFocus) {
|
||||
setState(() {
|
||||
_typeOfClassFocus = hasFocus;
|
||||
});
|
||||
child: Focus(
|
||||
focusNode: _typeOfClassFocusNode,
|
||||
onFocusChange: (hasFocus) {
|
||||
setState(() {
|
||||
_typeOfClassFocus = hasFocus;
|
||||
});
|
||||
},
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
_typeOfClassFocusNode?.requestFocus();
|
||||
},
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
_typeOfClassFocusNode?.requestFocus();
|
||||
},
|
||||
child: DropdownSearch<Map<String, dynamic>>(
|
||||
key:
|
||||
selectedClass == null
|
||||
? UniqueKey()
|
||||
: ValueKey(selectedClass),
|
||||
items: purposeList.cast<Map<String, dynamic>>(),
|
||||
child: DropdownSearch<Map<String, dynamic>>(
|
||||
// key:
|
||||
// selectedClass == null
|
||||
// ? UniqueKey()
|
||||
// : ValueKey(selectedClass),
|
||||
items: purposeList.cast<Map<String, dynamic>>(),
|
||||
|
||||
// selectedItem: purposeList.firstWhere(
|
||||
// (item) => item['dropdown_key'] == selectedClass,
|
||||
// orElse: () => {},
|
||||
// ),
|
||||
selectedItem:
|
||||
selectedClass != null
|
||||
? purposeList.firstWhere(
|
||||
(item) => item['dropdown_key'] == selectedClass,
|
||||
orElse: () => {},
|
||||
)
|
||||
: null,
|
||||
itemAsString: (item) => item['dropdown_value'] ?? '',
|
||||
popupProps: PopupProps.menu(
|
||||
showSearchBox: false,
|
||||
fit: FlexFit.loose,
|
||||
menuProps: const MenuProps(backgroundColor: Colors.white),
|
||||
itemBuilder: (context, item, isSelected) {
|
||||
final bool isNotAllowed = item['is_allowed'] == 'No';
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 5,
|
||||
),
|
||||
child: Text(
|
||||
item['dropdown_value'] ?? '',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: isNotAllowed ? Colors.redAccent : Colors.black,
|
||||
// selectedItem: purposeList.firstWhere(
|
||||
// (item) => item['dropdown_key'] == selectedClass,
|
||||
// orElse: () => {},
|
||||
// ),
|
||||
selectedItem:
|
||||
selectedClass != null
|
||||
? purposeList.firstWhere(
|
||||
(item) => item['dropdown_key'] == selectedClass,
|
||||
orElse: () => {},
|
||||
)
|
||||
: null,
|
||||
itemAsString: (item) => item['dropdown_value'] ?? '',
|
||||
popupProps: PopupProps.menu(
|
||||
showSearchBox: false,
|
||||
fit: FlexFit.loose,
|
||||
menuProps: const MenuProps(backgroundColor: Colors.white),
|
||||
itemBuilder: (context, item, isSelected) {
|
||||
final bool isNotAllowed = item['is_allowed'] == 'No';
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 5,
|
||||
),
|
||||
child: Text(
|
||||
item['dropdown_value'] ?? '',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color:
|
||||
isNotAllowed
|
||||
? Colors.redAccent
|
||||
: Colors.black,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
dropdownDecoratorProps: DropDownDecoratorProps(
|
||||
dropdownSearchDecoration: InputDecoration(
|
||||
// border: InputBorder.none,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(_typeOfClassFocus ?? false)
|
||||
? layoutColor!
|
||||
: Colors.white,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(_typeOfClassFocus ?? false)
|
||||
? layoutColor
|
||||
: Colors.white,
|
||||
// : const Color(0xFFD6D5E6),
|
||||
width: 1,
|
||||
// const Color(0xFFD6D5E6),
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: layoutColor, width: 1),
|
||||
),
|
||||
contentPadding: EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 10,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
dropdownDecoratorProps: DropDownDecoratorProps(
|
||||
dropdownSearchDecoration: InputDecoration(
|
||||
// border: InputBorder.none,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(_typeOfClassFocus ?? false)
|
||||
? layoutColor!
|
||||
: Colors.white,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(_typeOfClassFocus ?? false)
|
||||
? layoutColor
|
||||
: Colors.white,
|
||||
// : const Color(0xFFD6D5E6),
|
||||
width: 1,
|
||||
// const Color(0xFFD6D5E6),
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: layoutColor, width: 1),
|
||||
),
|
||||
contentPadding: EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 10,
|
||||
),
|
||||
dropdownBuilder: (context, selectedItem) {
|
||||
if (selectedItem == null || selectedItem.isEmpty) {
|
||||
return Text(
|
||||
"Select ",
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.grey,
|
||||
fontSize: 13,
|
||||
),
|
||||
);
|
||||
}
|
||||
return Text(
|
||||
selectedItem['dropdown_value'] ?? '',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Colors.black,
|
||||
),
|
||||
);
|
||||
},
|
||||
onChanged:
|
||||
purposeList.isNotEmpty
|
||||
? (Map<String, dynamic>? newValue) async {
|
||||
if (newValue != null &&
|
||||
newValue['is_allowed'] == 'No') {
|
||||
final confirm = await showNotAllowedDialog(
|
||||
context,
|
||||
message:
|
||||
"You are not entitled for this service. If you wish to continue with this service, you may require another approval.",
|
||||
);
|
||||
|
||||
if (confirm) {
|
||||
setState(() {
|
||||
exceptionalClass = "1";
|
||||
selectedClass = newValue['dropdown_key'];
|
||||
});
|
||||
print("Selected Purpose: ${selectedClass}");
|
||||
} else {
|
||||
setState(() {
|
||||
exceptionalClass = "0";
|
||||
selectedClass =
|
||||
null; // ❌ Clear selection if user cancels
|
||||
});
|
||||
print(
|
||||
"selectedItem resolved to: ${selectedClass}",
|
||||
);
|
||||
}
|
||||
|
||||
return;
|
||||
} else if (newValue != null &&
|
||||
newValue['is_allowed'] == 'yes') {
|
||||
setState(() {
|
||||
exceptionalClass = "0";
|
||||
selectedClass = newValue?['dropdown_key'];
|
||||
print("Selected Purpose: ${selectedClass}");
|
||||
});
|
||||
}
|
||||
|
||||
// if (newValue != null &&
|
||||
// newValue['is_allowed'] == 'No') {
|
||||
// print('not allowed');
|
||||
//
|
||||
// setState(() {
|
||||
// exceptionalClass = "1";
|
||||
// // hasExceptionalClass = true;
|
||||
// });
|
||||
// }
|
||||
|
||||
setState(() {
|
||||
selectedClass = newValue?['dropdown_key'];
|
||||
print("Selected Purpose: ${selectedClass}");
|
||||
});
|
||||
}
|
||||
: null,
|
||||
),
|
||||
),
|
||||
dropdownBuilder: (context, selectedItem) {
|
||||
if (selectedItem == null || selectedItem.isEmpty) {
|
||||
return Text(
|
||||
"Select ",
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.grey,
|
||||
fontSize: 13,
|
||||
),
|
||||
);
|
||||
}
|
||||
return Text(
|
||||
selectedItem['dropdown_value'] ?? '',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Colors.black,
|
||||
),
|
||||
);
|
||||
},
|
||||
onChanged:
|
||||
purposeList.isNotEmpty
|
||||
? (Map<String, dynamic>? newValue) async {
|
||||
if (newValue != null &&
|
||||
newValue['is_allowed'] == 'No') {
|
||||
final confirm = await showNotAllowedDialog(
|
||||
context,
|
||||
message:
|
||||
"You are not entitled for this service. If you wish to continue with this service, you may require another approval.",
|
||||
);
|
||||
|
||||
if (confirm) {
|
||||
setState(() {
|
||||
exceptionalClass = "1";
|
||||
selectedClass = newValue['dropdown_key'];
|
||||
});
|
||||
print("Selected Purpose: ${selectedClass}");
|
||||
} else {
|
||||
setState(() {
|
||||
exceptionalClass = "0";
|
||||
selectedClass =
|
||||
null; // ❌ Clear selection if user cancels
|
||||
});
|
||||
print(
|
||||
"selectedItem resolved to: ${selectedClass}",
|
||||
);
|
||||
}
|
||||
|
||||
return;
|
||||
} else if (newValue != null &&
|
||||
newValue['is_allowed'] == 'yes') {
|
||||
setState(() {
|
||||
exceptionalClass = "0";
|
||||
selectedClass = newValue?['dropdown_key'];
|
||||
print("Selected Purpose: ${selectedClass}");
|
||||
});
|
||||
}
|
||||
|
||||
// if (newValue != null &&
|
||||
// newValue['is_allowed'] == 'No') {
|
||||
// print('not allowed');
|
||||
//
|
||||
// setState(() {
|
||||
// exceptionalClass = "1";
|
||||
// // hasExceptionalClass = true;
|
||||
// });
|
||||
// }
|
||||
|
||||
setState(() {
|
||||
selectedClass = newValue?['dropdown_key'];
|
||||
print("Selected Purpose: ${selectedClass}");
|
||||
});
|
||||
}
|
||||
: null,
|
||||
),),)
|
||||
),
|
||||
),
|
||||
),
|
||||
if (errorMessages["class"] != null) ...[
|
||||
@ -937,94 +942,98 @@ class _TrainScreenState extends State<TrainScreen> {
|
||||
isDesktop: isDesktop,
|
||||
child: SizedBox(
|
||||
height: 40,
|
||||
child: Focus(
|
||||
focusNode: _fromFocusNode,
|
||||
onFocusChange: (hasFocus) {
|
||||
setState(() {
|
||||
_fromFocus = hasFocus;
|
||||
});
|
||||
},
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
_fromFocusNode?.requestFocus();
|
||||
},
|
||||
child: DropdownSearch<String>(
|
||||
selectedItem: countryMap[selectedFrom],
|
||||
popupProps: PopupProps.menu(
|
||||
showSearchBox: true,
|
||||
fit: FlexFit.loose,
|
||||
constraints: BoxConstraints(maxHeight: 150),// maxHeight: 250
|
||||
menuProps: const MenuProps(backgroundColor: Colors.white),
|
||||
itemBuilder:
|
||||
(context, item, isSelected) => Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 6,
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
style: GoogleFonts.poppins(fontSize: 11.5),
|
||||
),
|
||||
),
|
||||
searchFieldProps: TextFieldProps(
|
||||
decoration: InputDecoration(
|
||||
hintText: "Search ...",
|
||||
contentPadding: EdgeInsets.symmetric(horizontal: 10),
|
||||
),
|
||||
),
|
||||
),
|
||||
items: countryMap.values.toList(),
|
||||
dropdownDecoratorProps: DropDownDecoratorProps(
|
||||
dropdownSearchDecoration: InputDecoration(
|
||||
// border: InputBorder.none,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(_fromFocus ?? false)
|
||||
? layoutColor!
|
||||
: Colors.white,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(_fromFocus ?? false)
|
||||
? layoutColor
|
||||
: Colors.white,
|
||||
// : const Color(0xFFD6D5E6),
|
||||
width: 1,
|
||||
// const Color(0xFFD6D5E6),
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: layoutColor, width: 1),
|
||||
),
|
||||
contentPadding: EdgeInsets.symmetric(horizontal: 10),
|
||||
),
|
||||
),
|
||||
dropdownBuilder:
|
||||
(context, selectedItem) => Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
selectedItem ?? "Select ",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
),
|
||||
onChanged: (String? newValue) {
|
||||
child: Focus(
|
||||
focusNode: _fromFocusNode,
|
||||
onFocusChange: (hasFocus) {
|
||||
setState(() {
|
||||
selectedFrom =
|
||||
countryMap.entries
|
||||
.firstWhere((entry) => entry.value == newValue)
|
||||
.key;
|
||||
_fromFocus = hasFocus;
|
||||
});
|
||||
},
|
||||
),),)
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
_fromFocusNode?.requestFocus();
|
||||
},
|
||||
child: DropdownSearch<String>(
|
||||
selectedItem: countryMap[selectedFrom],
|
||||
popupProps: PopupProps.menu(
|
||||
showSearchBox: true,
|
||||
fit: FlexFit.loose,
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: 150,
|
||||
), // maxHeight: 250
|
||||
menuProps: const MenuProps(backgroundColor: Colors.white),
|
||||
itemBuilder:
|
||||
(context, item, isSelected) => Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 6,
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
style: GoogleFonts.poppins(fontSize: 11.5),
|
||||
),
|
||||
),
|
||||
searchFieldProps: TextFieldProps(
|
||||
decoration: InputDecoration(
|
||||
hintText: "Search ...",
|
||||
contentPadding: EdgeInsets.symmetric(horizontal: 10),
|
||||
),
|
||||
),
|
||||
),
|
||||
items: countryMap.values.toList(),
|
||||
dropdownDecoratorProps: DropDownDecoratorProps(
|
||||
dropdownSearchDecoration: InputDecoration(
|
||||
// border: InputBorder.none,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(_fromFocus ?? false)
|
||||
? layoutColor!
|
||||
: Colors.white,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(_fromFocus ?? false)
|
||||
? layoutColor
|
||||
: Colors.white,
|
||||
// : const Color(0xFFD6D5E6),
|
||||
width: 1,
|
||||
// const Color(0xFFD6D5E6),
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: layoutColor, width: 1),
|
||||
),
|
||||
contentPadding: EdgeInsets.symmetric(horizontal: 10),
|
||||
),
|
||||
),
|
||||
dropdownBuilder:
|
||||
(context, selectedItem) => Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
selectedItem ?? "Select ",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
),
|
||||
onChanged: (String? newValue) {
|
||||
setState(() {
|
||||
selectedFrom =
|
||||
countryMap.entries
|
||||
.firstWhere((entry) => entry.value == newValue)
|
||||
.key;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (errorMessages["from_station"] != null) ...[
|
||||
@ -1106,94 +1115,96 @@ class _TrainScreenState extends State<TrainScreen> {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 0),
|
||||
child: SizedBox(
|
||||
height: 40,
|
||||
child: Focus(
|
||||
focusNode: _toFocusNode,
|
||||
onFocusChange: (hasFocus) {
|
||||
setState(() {
|
||||
_toFocus = hasFocus;
|
||||
});
|
||||
},
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
_toFocusNode?.requestFocus();
|
||||
},
|
||||
child: DropdownSearch<String>(
|
||||
selectedItem: countryMap[selectedTo],
|
||||
popupProps: PopupProps.menu(
|
||||
showSearchBox: true,
|
||||
fit: FlexFit.loose,
|
||||
constraints: BoxConstraints(maxHeight: 150),
|
||||
menuProps: const MenuProps(backgroundColor: Colors.white),
|
||||
itemBuilder:
|
||||
(context, item, isSelected) => Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 6,
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
style: GoogleFonts.poppins(fontSize: 11.5),
|
||||
),
|
||||
),
|
||||
searchFieldProps: TextFieldProps(
|
||||
decoration: InputDecoration(
|
||||
hintText: "Search ...",
|
||||
contentPadding: EdgeInsets.symmetric(horizontal: 10),
|
||||
),
|
||||
),
|
||||
),
|
||||
items: countryMap.values.toList(),
|
||||
dropdownDecoratorProps: DropDownDecoratorProps(
|
||||
dropdownSearchDecoration: InputDecoration(
|
||||
// border: InputBorder.none,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(_toFocus ?? false)
|
||||
? layoutColor!
|
||||
: Colors.white,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(_toFocus ?? false)
|
||||
? layoutColor
|
||||
: Colors.white,
|
||||
// : const Color(0xFFD6D5E6),
|
||||
width: 1,
|
||||
// const Color(0xFFD6D5E6),
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: layoutColor, width: 1),
|
||||
),
|
||||
contentPadding: EdgeInsets.symmetric(horizontal: 10),
|
||||
),
|
||||
),
|
||||
dropdownBuilder:
|
||||
(context, selectedItem) => Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
selectedItem ?? "Select ",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
),
|
||||
onChanged: (String? newValue) {
|
||||
child: Focus(
|
||||
focusNode: _toFocusNode,
|
||||
onFocusChange: (hasFocus) {
|
||||
setState(() {
|
||||
selectedTo =
|
||||
countryMap.entries
|
||||
.firstWhere((entry) => entry.value == newValue)
|
||||
.key;
|
||||
_toFocus = hasFocus;
|
||||
});
|
||||
},
|
||||
),),),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
_toFocusNode?.requestFocus();
|
||||
},
|
||||
child: DropdownSearch<String>(
|
||||
selectedItem: countryMap[selectedTo],
|
||||
popupProps: PopupProps.menu(
|
||||
showSearchBox: true,
|
||||
fit: FlexFit.loose,
|
||||
constraints: BoxConstraints(maxHeight: 150),
|
||||
menuProps: const MenuProps(backgroundColor: Colors.white),
|
||||
itemBuilder:
|
||||
(context, item, isSelected) => Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 6,
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
style: GoogleFonts.poppins(fontSize: 11.5),
|
||||
),
|
||||
),
|
||||
searchFieldProps: TextFieldProps(
|
||||
decoration: InputDecoration(
|
||||
hintText: "Search ...",
|
||||
contentPadding: EdgeInsets.symmetric(horizontal: 10),
|
||||
),
|
||||
),
|
||||
),
|
||||
items: countryMap.values.toList(),
|
||||
dropdownDecoratorProps: DropDownDecoratorProps(
|
||||
dropdownSearchDecoration: InputDecoration(
|
||||
// border: InputBorder.none,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(_toFocus ?? false)
|
||||
? layoutColor!
|
||||
: Colors.white,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(_toFocus ?? false)
|
||||
? layoutColor
|
||||
: Colors.white,
|
||||
// : const Color(0xFFD6D5E6),
|
||||
width: 1,
|
||||
// const Color(0xFFD6D5E6),
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: layoutColor, width: 1),
|
||||
),
|
||||
contentPadding: EdgeInsets.symmetric(horizontal: 10),
|
||||
),
|
||||
),
|
||||
dropdownBuilder:
|
||||
(context, selectedItem) => Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
selectedItem ?? "Select ",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
),
|
||||
onChanged: (String? newValue) {
|
||||
setState(() {
|
||||
selectedTo =
|
||||
countryMap.entries
|
||||
.firstWhere((entry) => entry.value == newValue)
|
||||
.key;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (errorMessages["to_station"] != null) ...[
|
||||
|
||||
@ -768,9 +768,11 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
semanticsLabel: "NA1",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize:
|
||||
12, // 👈 Smaller text size here
|
||||
|
||||
color:
|
||||
Colors
|
||||
.black, // You can customize this
|
||||
@ -802,6 +804,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
selectedItem,
|
||||
) => Text(
|
||||
selectedItem ?? "Select",
|
||||
semanticsLabel: "NA1",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Color(0xFF114D8B),
|
||||
@ -845,6 +848,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
width: 25,
|
||||
child: Icon(
|
||||
Icons.circle,
|
||||
semanticLabel: "NPP1",
|
||||
size: 15,
|
||||
color:
|
||||
(SelectedParallelProcess[ServiceId] ==
|
||||
@ -945,6 +949,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
semanticsLabel: "NA2",
|
||||
style: TextStyle(
|
||||
fontSize:
|
||||
12, // 👈 Smaller text size here
|
||||
@ -978,6 +983,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
context,
|
||||
selectedItem,
|
||||
) => Text(
|
||||
semanticsLabel: "NA2",
|
||||
selectedItem ?? "Select",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
@ -1023,6 +1029,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
child: Icon(
|
||||
Icons.circle,
|
||||
size: 15,
|
||||
semanticLabel: "NPP2",
|
||||
color:
|
||||
((SelectedParallelProcess[ServiceId] ==
|
||||
"1") ||
|
||||
@ -1128,6 +1135,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
semanticsLabel: "NA3",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize:
|
||||
12, // 👈 Smaller text size here
|
||||
@ -1161,6 +1169,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
// Center-align selected item
|
||||
Text(
|
||||
selectedItem ?? "Select",
|
||||
semanticsLabel: "NA3",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Color(0xFF114D8B),
|
||||
@ -1204,6 +1213,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
width: 25,
|
||||
child: Icon(
|
||||
Icons.circle,
|
||||
semanticLabel: "NPP3",
|
||||
size: 15,
|
||||
color:
|
||||
((SelectedParallelProcess[ServiceId] ==
|
||||
@ -1409,6 +1419,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
semanticsLabel: "EA1",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize:
|
||||
12, // 👈 Smaller text size here
|
||||
@ -1486,6 +1497,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
width: 25,
|
||||
child: Icon(
|
||||
Icons.circle,
|
||||
semanticLabel: "EPP1",
|
||||
size: 15,
|
||||
color:
|
||||
(SelectedParallelExceptionalProcess[ServiceId] ==
|
||||
@ -1588,6 +1600,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
semanticsLabel: "EA2",
|
||||
style: TextStyle(
|
||||
fontSize:
|
||||
12, // 👈 Smaller text size here
|
||||
@ -1622,6 +1635,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
selectedItem,
|
||||
) => Text(
|
||||
selectedItem ?? "Select",
|
||||
semanticsLabel: "EA2",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Color(0xFF114D8B),
|
||||
@ -1665,6 +1679,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
width: 25,
|
||||
child: Icon(
|
||||
Icons.circle,
|
||||
semanticLabel: "EPP2",
|
||||
size: 15,
|
||||
color:
|
||||
((SelectedParallelExceptionalProcess[ServiceId] ==
|
||||
@ -1774,6 +1789,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
semanticsLabel: "EA3",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize:
|
||||
12, // 👈 Smaller text size here
|
||||
@ -1807,6 +1823,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
// Center-align selected item
|
||||
Text(
|
||||
selectedItem ?? "Select",
|
||||
semanticsLabel: "EA3",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Color(0xFF114D8B),
|
||||
@ -1849,6 +1866,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
width: 25,
|
||||
child: Icon(
|
||||
Icons.circle,
|
||||
semanticLabel: "EPP3",
|
||||
size: 15,
|
||||
color:
|
||||
((SelectedParallelExceptionalProcess[ServiceId] ==
|
||||
@ -1966,6 +1984,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
semanticsLabel: "EA4",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize:
|
||||
12, // 👈 Smaller text size here
|
||||
@ -1999,6 +2018,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
// Center-align selected item
|
||||
Text(
|
||||
selectedItem ?? "Select",
|
||||
semanticsLabel: "EA4",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Color(0xFF114D8B),
|
||||
@ -2055,7 +2075,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
child: Icon(
|
||||
Icons.circle,
|
||||
size: 15,
|
||||
|
||||
semanticLabel: "EPP4",
|
||||
color:
|
||||
((SelectedParallelExceptionalProcess[ServiceId] ==
|
||||
"1") ||
|
||||
@ -2216,6 +2236,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
semanticsLabel: "AA1",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize:
|
||||
12, // 👈 Smaller text size here
|
||||
@ -2250,6 +2271,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
selectedItem,
|
||||
) => Text(
|
||||
selectedItem ?? "Select",
|
||||
semanticsLabel: "AA1",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Color(0xFF114D8B),
|
||||
@ -2293,6 +2315,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
width: 25,
|
||||
child: Icon(
|
||||
Icons.circle,
|
||||
semanticLabel: "AAPP1",
|
||||
size: 15,
|
||||
color:
|
||||
(SelectedParallelAmendProcess[ServiceId] ==
|
||||
@ -2395,6 +2418,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
semanticsLabel: "AA2",
|
||||
style: TextStyle(
|
||||
fontSize:
|
||||
12, // 👈 Smaller text size here
|
||||
@ -2429,6 +2453,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
selectedItem,
|
||||
) => Text(
|
||||
selectedItem ?? "Select",
|
||||
semanticsLabel: "AA2",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Color(0xFF114D8B),
|
||||
@ -2472,6 +2497,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
width: 25,
|
||||
child: Icon(
|
||||
Icons.circle,
|
||||
semanticLabel: "AAPP2",
|
||||
size: 15,
|
||||
color:
|
||||
((SelectedParallelAmendProcess[ServiceId] ==
|
||||
@ -2582,6 +2608,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
semanticsLabel: "AA3",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize:
|
||||
12, // 👈 Smaller text size here
|
||||
@ -2615,6 +2642,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
// Center-align selected item
|
||||
Text(
|
||||
selectedItem ?? "Select",
|
||||
semanticsLabel: "AA3",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Color(0xFF114D8B),
|
||||
@ -2657,6 +2685,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
width: 25,
|
||||
child: Icon(
|
||||
Icons.circle,
|
||||
semanticLabel: "AAPP3",
|
||||
size: 15,
|
||||
color:
|
||||
((SelectedParallelAmendProcess[ServiceId] ==
|
||||
@ -2774,6 +2803,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
semanticsLabel: "AA4",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize:
|
||||
12, // 👈 Smaller text size here
|
||||
@ -2807,6 +2837,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
// Center-align selected item
|
||||
Text(
|
||||
selectedItem ?? "Select",
|
||||
semanticsLabel: "AA4",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Color(0xFF114D8B),
|
||||
@ -2862,6 +2893,7 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
// ),
|
||||
child: Icon(
|
||||
Icons.circle,
|
||||
semanticLabel: "AAPP4",
|
||||
size: 15,
|
||||
color:
|
||||
((SelectedParallelAmendProcess[ServiceId] ==
|
||||
@ -3048,10 +3080,10 @@ class PolicyCriteriaState extends State<PolicyCriteria> {
|
||||
(ServiceId!) != null && (isLoading || dropdownItems.isEmpty)
|
||||
? const Center(child: CircularProgressIndicator())
|
||||
: DropdownSearch<Map<String, dynamic>>(
|
||||
key:
|
||||
classAction[(ServiceId!)] == null
|
||||
? UniqueKey()
|
||||
: ValueKey(classAction[(ServiceId!)]),
|
||||
// key:
|
||||
// classAction[(ServiceId!)] == null
|
||||
// ? UniqueKey()
|
||||
// : ValueKey(classAction[(ServiceId!)]),
|
||||
items: purposeList.cast<Map<String, dynamic>>(),
|
||||
|
||||
// selectedItem: purposeList.firstWhere(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user