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