diff --git a/lib/features/home/presentation/widgets/top_professionals_section.dart b/lib/features/home/presentation/widgets/top_professionals_section.dart index 4e21269..c41d56b 100644 --- a/lib/features/home/presentation/widgets/top_professionals_section.dart +++ b/lib/features/home/presentation/widgets/top_professionals_section.dart @@ -290,7 +290,8 @@ class _TopProfessionalsSectionState final experience = agent.experienceText; final locationText = agent.location; final subtitle = agent.agentType != null ? '(${agent.agentType!.name})' : ''; - final rating = agent.averageRating ?? 5.0; + final rawRating = agent.averageRating ?? 0.0; + final rating = rawRating > 0 ? rawRating : 5.0; return Container( decoration: BoxDecoration( diff --git a/lib/features/profile/presentation/widgets/profile_settings_tab.dart b/lib/features/profile/presentation/widgets/profile_settings_tab.dart index 99c8fb4..7138981 100644 --- a/lib/features/profile/presentation/widgets/profile_settings_tab.dart +++ b/lib/features/profile/presentation/widgets/profile_settings_tab.dart @@ -278,8 +278,8 @@ class _ProfileSettingsTabState extends ConsumerState { if (picked == null) return; final ext = picked.path.split('.').last.toLowerCase(); - if (!['jpg', 'jpeg', 'png', 'gif'].contains(ext)) { - if (mounted) _showSnackBar('Please select a JPEG, PNG, or GIF image', isError: true); + if (!['jpg', 'jpeg', 'png', 'webp'].contains(ext)) { + if (mounted) _showSnackBar('Please select a JPEG, PNG, or WebP image', isError: true); return; } @@ -297,7 +297,8 @@ class _ProfileSettingsTabState extends ConsumerState { try { final profileState = ref.read(profileProvider); final role = profileState.isAgent ? 'AGENT' : 'USER'; - final contentType = 'image/$ext'; + final mimeExt = ext == 'jpg' ? 'jpeg' : ext; + final contentType = 'image/$mimeExt'; final fileName = picked.name; final repo = ProfileRepository();