diff --git a/lib/features/profile/presentation/widgets/profile_settings_tab.dart b/lib/features/profile/presentation/widgets/profile_settings_tab.dart index 2c7a09e..c1ba43d 100644 --- a/lib/features/profile/presentation/widgets/profile_settings_tab.dart +++ b/lib/features/profile/presentation/widgets/profile_settings_tab.dart @@ -92,7 +92,7 @@ class _ProfileSettingsTabState extends ConsumerState { final city = profile['city'] as String? ?? ''; final stateName = profile['state'] as String? ?? ''; final country = profile['country'] as String? ?? ''; - final parts = [city, stateName, country].where((s) => s.isNotEmpty); + final parts = [stateName, city, country].where((s) => s.isNotEmpty); _locationController.text = parts.join(', '); } @@ -403,8 +403,9 @@ class _ProfileSettingsTabState extends ConsumerState { .map((s) => s.trim()) .where((s) => s.isNotEmpty) .toList(); - if (locationParts.isNotEmpty) data['city'] = locationParts[0]; - if (locationParts.length > 1) data['state'] = locationParts[1]; + // Display order is state first, then city, then country — parse in the same order + if (locationParts.isNotEmpty) data['state'] = locationParts[0]; + if (locationParts.length > 1) data['city'] = locationParts[1]; if (locationParts.length > 2) data['country'] = locationParts[2]; }