minor issues fixes 2

This commit is contained in:
venba-Inspriron-3558 2025-06-23 16:27:27 +05:30
parent 045b256551
commit fae41a2f7e
2 changed files with 44 additions and 18 deletions

View File

@ -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) {

View File

@ -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