Merge branch 'main' of bitbucket.org:venbainformationtechnology/ts-tat
This commit is contained in:
commit
6c12c4ca35
@ -314,13 +314,6 @@ class _MISforexState extends State<MISforex>
|
||||
fontSize: 18.0,
|
||||
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) {
|
||||
|
||||
@ -990,17 +990,45 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
fit: FlexFit.loose,
|
||||
constraints: BoxConstraints(maxHeight: 200),
|
||||
itemBuilder:
|
||||
(context, item, isSelected) => Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 6,
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
style: GoogleFonts.poppins(fontSize: 11.5),
|
||||
// (context, item, isSelected) => Container(
|
||||
// color: Colors.white,
|
||||
// padding: EdgeInsets.symmetric(
|
||||
// horizontal: 10,
|
||||
// vertical: 6,
|
||||
// ),
|
||||
// child: Text(
|
||||
// item,
|
||||
// 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,
|
||||
dropdownDecoratorProps: DropDownDecoratorProps(
|
||||
@ -1300,9 +1328,14 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
countryList = apiCountryData ?? [];
|
||||
|
||||
// Map country codes to country names
|
||||
// countryMap = {
|
||||
// for (var item in countryList)
|
||||
// item['country_code'] as String: item['country_name'] as String,
|
||||
// };
|
||||
countryMap = {
|
||||
for (var item in countryList)
|
||||
item['country_code'] as String: item['country_name'] as String,
|
||||
for (var country in countryList)
|
||||
(country['country_code'] ?? ''):
|
||||
'${country['country_name'] ?? ''} (${country['country_code'] ?? ''})',
|
||||
};
|
||||
|
||||
// Extract only country codes for processing
|
||||
|
||||
Loading…
Reference in New Issue
Block a user