UI_HOTEL_NAME_ALIGN
This commit is contained in:
parent
bf9a2b1277
commit
005f526798
@ -653,7 +653,7 @@ class _AccomodationScreenState extends State<AccomodationScreen> {
|
|||||||
isDesktop: isDesktop,
|
isDesktop: isDesktop,
|
||||||
width:
|
width:
|
||||||
isDesktop
|
isDesktop
|
||||||
? MediaQuery.of(context).size.width * 0.34
|
? MediaQuery.of(context).size.width * 0.35
|
||||||
: null, //MediaQuery.of(context).size.width * 0.66,
|
: null, //MediaQuery.of(context).size.width * 0.66,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 40,
|
height: 40,
|
||||||
@ -720,6 +720,8 @@ class _AccomodationScreenState extends State<AccomodationScreen> {
|
|||||||
items: allItems,
|
items: allItems,
|
||||||
selectedItem: _hotelNameController.text,
|
selectedItem: _hotelNameController.text,
|
||||||
popupProps: PopupProps.menu(
|
popupProps: PopupProps.menu(
|
||||||
|
fit: FlexFit.loose,
|
||||||
|
constraints: BoxConstraints(maxHeight: 220),
|
||||||
menuProps: const MenuProps(backgroundColor: Colors.white),
|
menuProps: const MenuProps(backgroundColor: Colors.white),
|
||||||
showSearchBox: true,
|
showSearchBox: true,
|
||||||
itemBuilder:
|
itemBuilder:
|
||||||
@ -738,6 +740,7 @@ class _AccomodationScreenState extends State<AccomodationScreen> {
|
|||||||
),
|
),
|
||||||
searchFieldProps: TextFieldProps(
|
searchFieldProps: TextFieldProps(
|
||||||
controller: _hotelNameController,
|
controller: _hotelNameController,
|
||||||
|
style: TextStyle(fontSize: 11),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: "Enter/ Search Hotel Name",
|
labelText: "Enter/ Search Hotel Name",
|
||||||
labelStyle: GoogleFonts.poppins(fontSize: 11),
|
labelStyle: GoogleFonts.poppins(fontSize: 11),
|
||||||
@ -751,8 +754,28 @@ class _AccomodationScreenState extends State<AccomodationScreen> {
|
|||||||
border: OutlineInputBorder(),
|
border: OutlineInputBorder(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
fit: FlexFit.loose,
|
|
||||||
),
|
),
|
||||||
|
dropdownBuilder: (context, selectedItem) {
|
||||||
|
if (selectedItem == null || selectedItem.isEmpty) {
|
||||||
|
return Text(
|
||||||
|
"Select ",
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
color: Colors.grey,
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return Text(
|
||||||
|
selectedItem ?? '',
|
||||||
|
semanticsLabel: "hotelName",
|
||||||
|
style: GoogleFonts.roboto(
|
||||||
|
fontSize: 11,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
dropdownDecoratorProps: DropDownDecoratorProps(
|
dropdownDecoratorProps: DropDownDecoratorProps(
|
||||||
dropdownSearchDecoration: InputDecoration(
|
dropdownSearchDecoration: InputDecoration(
|
||||||
@ -778,7 +801,7 @@ class _AccomodationScreenState extends State<AccomodationScreen> {
|
|||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color:
|
||||||
(_CategoryFocused ?? false)
|
(_isHotelNameFocused ?? false)
|
||||||
? layoutColor
|
? layoutColor
|
||||||
: Colors.white,
|
: Colors.white,
|
||||||
// : const Color(0xFFD6D5E6),
|
// : const Color(0xFFD6D5E6),
|
||||||
@ -949,7 +972,7 @@ class _AccomodationScreenState extends State<AccomodationScreen> {
|
|||||||
return Text(
|
return Text(
|
||||||
selectedItem['dropdown_value'] ?? '',
|
selectedItem['dropdown_value'] ?? '',
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 12,
|
fontSize: 11,
|
||||||
// color: Colors.red,
|
// color: Colors.red,
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
),
|
),
|
||||||
@ -1470,7 +1493,7 @@ class _AccomodationScreenState extends State<AccomodationScreen> {
|
|||||||
isDesktop: isDesktop,
|
isDesktop: isDesktop,
|
||||||
width:
|
width:
|
||||||
isDesktop
|
isDesktop
|
||||||
? MediaQuery.of(context).size.width * 0.34
|
? MediaQuery.of(context).size.width * 0.35
|
||||||
: null, // MediaQuery.of(context).size.width * 0.66,
|
: null, // MediaQuery.of(context).size.width * 0.66,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 40,
|
height: 40,
|
||||||
|
|||||||
@ -650,7 +650,7 @@ class _BusScreenState extends State<BusScreen> {
|
|||||||
CustomTextFieldItnerarySubWrapper(
|
CustomTextFieldItnerarySubWrapper(
|
||||||
isFocused: _commentsFocus, // Dropdown doesn't use focus
|
isFocused: _commentsFocus, // Dropdown doesn't use focus
|
||||||
isDesktop: isDesktop,
|
isDesktop: isDesktop,
|
||||||
width: isDesktop ? MediaQuery.of(context).size.width * 0.34 : null,
|
width: isDesktop ? MediaQuery.of(context).size.width * 0.35 : null,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 40,
|
height: 40,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
|||||||
@ -160,9 +160,9 @@ class _TaxiScreenState extends State<TaxiScreen> {
|
|||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
layoutColor =
|
layoutColor =
|
||||||
layoutString != null
|
layoutString != null
|
||||||
? Color(int.parse(layoutString))
|
? Color(int.parse(layoutString))
|
||||||
: Colors.redAccent;
|
: Colors.redAccent;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -434,95 +434,99 @@ class _TaxiScreenState extends State<TaxiScreen> {
|
|||||||
// Request focus when user taps
|
// Request focus when user taps
|
||||||
_carTypeFocusNode?.requestFocus();
|
_carTypeFocusNode?.requestFocus();
|
||||||
},
|
},
|
||||||
child: DropdownSearch<Map<String, dynamic>>(
|
child: DropdownSearch<Map<String, dynamic>>(
|
||||||
// focusNode: _taxiReqFocusNode,
|
// focusNode: _taxiReqFocusNode,
|
||||||
items: purposeList.cast<Map<String, dynamic>>(),
|
items: purposeList.cast<Map<String, dynamic>>(),
|
||||||
selectedItem: purposeList.firstWhere(
|
selectedItem: purposeList.firstWhere(
|
||||||
(item) => item['dropdown_key'] == selectedCarType,
|
(item) => item['dropdown_key'] == selectedCarType,
|
||||||
orElse: () => {},
|
orElse: () => {},
|
||||||
),
|
),
|
||||||
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) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
horizontal: 10,
|
horizontal: 10,
|
||||||
vertical: 5,
|
vertical: 5,
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
item['dropdown_value'] ?? '',
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
fontSize: 12,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
dropdownDecoratorProps: DropDownDecoratorProps(
|
||||||
|
dropdownSearchDecoration: InputDecoration(
|
||||||
|
// border: InputBorder.none,
|
||||||
|
border: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(5),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color:
|
||||||
|
(_carTypeFocused ?? false)
|
||||||
|
? layoutColor!
|
||||||
|
: Colors.white,
|
||||||
|
width: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color:
|
||||||
|
(_carTypeFocused ?? 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,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
child: Text(
|
),
|
||||||
item['dropdown_value'] ?? '',
|
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(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
);
|
},
|
||||||
},
|
onChanged:
|
||||||
),
|
purposeList.isNotEmpty
|
||||||
dropdownDecoratorProps: DropDownDecoratorProps(
|
? (newValue) {
|
||||||
dropdownSearchDecoration: InputDecoration(
|
setState(() {
|
||||||
// border: InputBorder.none,
|
selectedCarType = newValue as String?;
|
||||||
border: OutlineInputBorder(
|
});
|
||||||
borderRadius: BorderRadius.circular(5),
|
print(
|
||||||
borderSide: BorderSide(
|
"Updating form data: -> ${newValue ?? ""}",
|
||||||
color:
|
);
|
||||||
(_carTypeFocused ?? false)
|
}
|
||||||
? layoutColor!
|
: null,
|
||||||
: Colors.white,
|
|
||||||
width: 1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color:
|
|
||||||
(_carTypeFocused ?? 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
|
|
||||||
? (newValue) {
|
|
||||||
setState(() {
|
|
||||||
selectedCarType = newValue as String?;
|
|
||||||
});
|
|
||||||
print("Updating form data: -> ${newValue ?? ""}");
|
|
||||||
}
|
|
||||||
: null,
|
|
||||||
),),),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -602,105 +606,113 @@ class _TaxiScreenState extends State<TaxiScreen> {
|
|||||||
padding: const EdgeInsets.symmetric(horizontal: 0),
|
padding: const EdgeInsets.symmetric(horizontal: 0),
|
||||||
width:
|
width:
|
||||||
isDesktop
|
isDesktop
|
||||||
? MediaQuery.of(context).size.width * 0.34
|
? MediaQuery.of(context).size.width * 0.35
|
||||||
: null,//MediaQuery.of(context).size.width * 0.66,
|
: null, //MediaQuery.of(context).size.width * 0.66,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 40,
|
height: 40,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: Focus(
|
child: Focus(
|
||||||
focusNode: _taxiReqFocusNode,
|
focusNode: _taxiReqFocusNode,
|
||||||
onFocusChange: (hasFocus) {
|
onFocusChange: (hasFocus) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_taxiReqFocused = hasFocus;
|
_taxiReqFocused = hasFocus;
|
||||||
});
|
});
|
||||||
},
|
|
||||||
child: GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
_taxiReqFocusNode?.requestFocus();
|
|
||||||
},
|
},
|
||||||
child: DropdownSearch<Map<String, dynamic>>(
|
child: GestureDetector(
|
||||||
// focusNode: _taxiReqFocusNode,
|
onTap: () {
|
||||||
items: purposeList.cast<Map<String, dynamic>>(),
|
_taxiReqFocusNode?.requestFocus();
|
||||||
selectedItem: purposeList.firstWhere(
|
},
|
||||||
(item) => item['dropdown_key'] == selectedReqTaxi,
|
child: DropdownSearch<Map<String, dynamic>>(
|
||||||
orElse: () => {},
|
// focusNode: _taxiReqFocusNode,
|
||||||
),
|
items: purposeList.cast<Map<String, dynamic>>(),
|
||||||
itemAsString: (item) => item['dropdown_value'] ?? '',
|
selectedItem: purposeList.firstWhere(
|
||||||
popupProps: PopupProps.menu(
|
(item) => item['dropdown_key'] == selectedReqTaxi,
|
||||||
showSearchBox: false,
|
orElse: () => {},
|
||||||
fit: FlexFit.loose,
|
),
|
||||||
menuProps: const MenuProps(backgroundColor: Colors.white),
|
itemAsString: (item) => item['dropdown_value'] ?? '',
|
||||||
itemBuilder: (context, item, isSelected) {
|
popupProps: PopupProps.menu(
|
||||||
return Padding(
|
showSearchBox: false,
|
||||||
padding: const EdgeInsets.symmetric(
|
fit: FlexFit.loose,
|
||||||
horizontal: 10,
|
menuProps: const MenuProps(backgroundColor: Colors.white),
|
||||||
vertical: 5,
|
itemBuilder: (context, item, isSelected) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 10,
|
||||||
|
vertical: 5,
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
item['dropdown_value'] ?? '',
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
fontSize: 12,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
dropdownDecoratorProps: DropDownDecoratorProps(
|
||||||
|
dropdownSearchDecoration: InputDecoration(
|
||||||
|
// border: InputBorder.none,
|
||||||
|
border: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(5),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color:
|
||||||
|
(_taxiReqFocused ?? false)
|
||||||
|
? layoutColor!
|
||||||
|
: Colors.white,
|
||||||
|
width: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color:
|
||||||
|
(_taxiReqFocused ?? 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: 1,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
child: Text(
|
),
|
||||||
item['dropdown_value'] ?? '',
|
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(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
);
|
},
|
||||||
},
|
onChanged:
|
||||||
),
|
purposeList.isNotEmpty
|
||||||
dropdownDecoratorProps: DropDownDecoratorProps(
|
? (newValue) {
|
||||||
dropdownSearchDecoration: InputDecoration(
|
setState(() {
|
||||||
// border: InputBorder.none,
|
selectedReqTaxi = newValue as String?;
|
||||||
border: OutlineInputBorder(
|
});
|
||||||
borderRadius: BorderRadius.circular(5),
|
print("Updating form data: -> ${newValue ?? ""}");
|
||||||
borderSide: BorderSide(
|
}
|
||||||
color:
|
: null,
|
||||||
(_taxiReqFocused ?? false)
|
|
||||||
? layoutColor!
|
|
||||||
: Colors.white,
|
|
||||||
width: 1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color:
|
|
||||||
(_taxiReqFocused ?? 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: 1,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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
|
|
||||||
? (newValue) {
|
|
||||||
setState(() {
|
|
||||||
selectedReqTaxi = newValue as String?;
|
|
||||||
});
|
|
||||||
print("Updating form data: -> ${newValue ?? ""}");
|
|
||||||
}
|
|
||||||
: null,
|
|
||||||
),),),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
@ -1024,8 +1036,8 @@ class _TaxiScreenState extends State<TaxiScreen> {
|
|||||||
isDesktop: isDesktop,
|
isDesktop: isDesktop,
|
||||||
width:
|
width:
|
||||||
isDesktop
|
isDesktop
|
||||||
? MediaQuery.of(context).size.width * 0.34
|
? MediaQuery.of(context).size.width * 0.35
|
||||||
: null,//MediaQuery.of(context).size.width * 0.66,
|
: null, //MediaQuery.of(context).size.width * 0.66,
|
||||||
|
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 40,
|
height: 40,
|
||||||
|
|||||||
@ -315,13 +315,16 @@ class _AccomodationListWidgetState extends State<AccomodationListWidget> {
|
|||||||
Row(
|
Row(
|
||||||
// mainAxisAlignment: MainAxisAlignment.end,
|
// mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Expanded(
|
||||||
item["hotel_name"]!,
|
flex: 1,
|
||||||
style: GoogleFonts.poppins(
|
child: Text(
|
||||||
fontSize: 14,
|
item["hotel_name"]!,
|
||||||
fontWeight:
|
style: GoogleFonts.poppins(
|
||||||
isDesktop ? FontWeight.w800 : FontWeight.w600,
|
fontSize: 14,
|
||||||
color: !isDesktop ? Colors.black : Color(0xFF575A74),
|
fontWeight:
|
||||||
|
isDesktop ? FontWeight.w800 : FontWeight.w600,
|
||||||
|
color: !isDesktop ? Colors.black : Color(0xFF575A74),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Spacer(),
|
Spacer(),
|
||||||
|
|||||||
@ -831,6 +831,12 @@ class _CreateUserFormDetialsState extends State<CreateUserFormDetials> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void closeLoaderIfOpen() {
|
||||||
|
if (mounted) {
|
||||||
|
Navigator.of(context, rootNavigator: true).pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void handleSubmit() async {
|
void handleSubmit() async {
|
||||||
print("USR Detail Submit");
|
print("USR Detail Submit");
|
||||||
// printFormData();
|
// printFormData();
|
||||||
@ -852,6 +858,7 @@ class _CreateUserFormDetialsState extends State<CreateUserFormDetials> {
|
|||||||
if (!await isValidData(data)) {
|
if (!await isValidData(data)) {
|
||||||
print("USERDETAILS : $userDetials");
|
print("USERDETAILS : $userDetials");
|
||||||
print("Validation Failed: Required fields are missing.");
|
print("Validation Failed: Required fields are missing.");
|
||||||
|
closeLoaderIfOpen();
|
||||||
setState(() {});
|
setState(() {});
|
||||||
return; // Stop execution if validation fails
|
return; // Stop execution if validation fails
|
||||||
} else {
|
} else {
|
||||||
@ -864,6 +871,7 @@ class _CreateUserFormDetialsState extends State<CreateUserFormDetials> {
|
|||||||
print("isValid- $isValid");
|
print("isValid- $isValid");
|
||||||
if (!isValid) {
|
if (!isValid) {
|
||||||
print("Validation failed. Please check the inputs.");
|
print("Validation failed. Please check the inputs.");
|
||||||
|
closeLoaderIfOpen();
|
||||||
setState(() {});
|
setState(() {});
|
||||||
return; // ❌ STOP execution here if not valid
|
return; // ❌ STOP execution here if not valid
|
||||||
}
|
}
|
||||||
@ -967,6 +975,7 @@ class _CreateUserFormDetialsState extends State<CreateUserFormDetials> {
|
|||||||
if (!await isValidData(data) && !await isValidDataTwo(data)) {
|
if (!await isValidData(data) && !await isValidDataTwo(data)) {
|
||||||
print("USERDETAILS : $userDetials");
|
print("USERDETAILS : $userDetials");
|
||||||
print("Validation Failed: Required fields are missing.");
|
print("Validation Failed: Required fields are missing.");
|
||||||
|
closeLoaderIfOpen();
|
||||||
setState(() {});
|
setState(() {});
|
||||||
return; // Stop execution if validation fails
|
return; // Stop execution if validation fails
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user