Merge branch 'main' of bitbucket.org:venbainformationtechnology/ts-tat

This commit is contained in:
venbaittech 2025-06-23 16:44:36 +05:30
commit 6c12c4ca35
2 changed files with 44 additions and 18 deletions

View File

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

View File

@ -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(
// 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: Text( child: Padding(
item, padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
countryName,
style: GoogleFonts.poppins(fontSize: 11.5), 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