minor issues fixes 2
This commit is contained in:
parent
045b256551
commit
fae41a2f7e
@ -314,13 +314,6 @@ class _MISforexState extends State<MISforex>
|
|||||||
fontSize: 18.0,
|
fontSize: 18.0,
|
||||||
webBgColor: "linear-gradient(to right, $displayBackgroundColor, $displayBackgroundColor)",
|
webBgColor: "linear-gradient(to right, $displayBackgroundColor, $displayBackgroundColor)",
|
||||||
);
|
);
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
|
||||||
SnackBar(
|
|
||||||
backgroundColor: result['status'] ? Colors.green : Colors.red,
|
|
||||||
content: Text(result['message']),
|
|
||||||
behavior: SnackBarBehavior.floating,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void handleInternationalFilter(String query) {
|
void handleInternationalFilter(String query) {
|
||||||
|
|||||||
@ -990,17 +990,45 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
|||||||
fit: FlexFit.loose,
|
fit: FlexFit.loose,
|
||||||
constraints: BoxConstraints(maxHeight: 200),
|
constraints: BoxConstraints(maxHeight: 200),
|
||||||
itemBuilder:
|
itemBuilder:
|
||||||
(context, item, isSelected) => Container(
|
// (context, item, isSelected) => Container(
|
||||||
color: Colors.white,
|
// color: Colors.white,
|
||||||
padding: EdgeInsets.symmetric(
|
// padding: EdgeInsets.symmetric(
|
||||||
horizontal: 10,
|
// horizontal: 10,
|
||||||
vertical: 6,
|
// vertical: 6,
|
||||||
),
|
// ),
|
||||||
child: Text(
|
// child: Text(
|
||||||
item,
|
// item,
|
||||||
style: GoogleFonts.poppins(fontSize: 11.5),
|
// style: GoogleFonts.poppins(fontSize: 11.5),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
(context, item, isSelected) {
|
||||||
|
print("contryItem - $item");
|
||||||
|
final match = RegExp(r'^(.*)\s\((.*)\)$',).firstMatch(item);
|
||||||
|
final countryName = match?.group(1) ?? '';
|
||||||
|
final countryCode = match?.group(2) ?? '';
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 8.0,
|
||||||
|
vertical: 6.0,
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
countryName,
|
||||||
|
style: GoogleFonts.poppins(fontSize: 11.5),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
countryCode,
|
||||||
|
style: GoogleFonts.poppins(fontSize: 11.5,color:Colors.grey),
|
||||||
|
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
);},
|
||||||
),
|
),
|
||||||
items: genderOptions,
|
items: genderOptions,
|
||||||
dropdownDecoratorProps: DropDownDecoratorProps(
|
dropdownDecoratorProps: DropDownDecoratorProps(
|
||||||
@ -1300,9 +1328,14 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
|||||||
countryList = apiCountryData ?? [];
|
countryList = apiCountryData ?? [];
|
||||||
|
|
||||||
// Map country codes to country names
|
// Map country codes to country names
|
||||||
|
// countryMap = {
|
||||||
|
// for (var item in countryList)
|
||||||
|
// item['country_code'] as String: item['country_name'] as String,
|
||||||
|
// };
|
||||||
countryMap = {
|
countryMap = {
|
||||||
for (var item in countryList)
|
for (var country in countryList)
|
||||||
item['country_code'] as String: item['country_name'] as String,
|
(country['country_code'] ?? ''):
|
||||||
|
'${country['country_name'] ?? ''} (${country['country_code'] ?? ''})',
|
||||||
};
|
};
|
||||||
|
|
||||||
// Extract only country codes for processing
|
// Extract only country codes for processing
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user