feat: Add professional ratings to cards, implement scroll-to-top on home tab re-tap, and improve agent type fetching in the hero section.
This commit is contained in:
@@ -55,14 +55,18 @@ class _HeroSectionState extends ConsumerState<HeroSection> {
|
||||
context.push('/agents/search${queryString.isNotEmpty ? '?$queryString' : ''}');
|
||||
}
|
||||
|
||||
void _showTypePicker() {
|
||||
final topProState = ref.read(topProfessionalsProvider);
|
||||
final agentTypes = topProState.agentTypes;
|
||||
Future<void> _showTypePicker() async {
|
||||
var agentTypes = ref.read(topProfessionalsProvider).agentTypes;
|
||||
|
||||
// If types haven't loaded yet, fetch them directly
|
||||
if (agentTypes.isEmpty) {
|
||||
// If types not loaded yet, just navigate to search
|
||||
context.push('/agents/search');
|
||||
return;
|
||||
try {
|
||||
final repo = ref.read(agentsRepositoryProvider);
|
||||
agentTypes = await repo.getAgentTypes();
|
||||
} catch (_) {
|
||||
return;
|
||||
}
|
||||
if (!mounted || agentTypes.isEmpty) return;
|
||||
}
|
||||
|
||||
showModalBottomSheet(
|
||||
|
||||
Reference in New Issue
Block a user