feat: add id field to professional models and enable navigation to agent detail pages

This commit is contained in:
pradeepkumar
2026-04-20 10:32:12 +05:30
parent eafa595438
commit d3f23f9c53
3 changed files with 33 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:go_router/go_router.dart';
import 'package:shimmer/shimmer.dart';
import 'package:real_estate_mobile/core/constants/app_colors.dart';
import 'package:real_estate_mobile/core/widgets/s3_image.dart';
@@ -141,7 +142,7 @@ class _FeaturedProfessionalsSectionState
}
Widget _buildFeaturedCard(FeaturedAgentItem item, int index) {
return Container(
final card = Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
@@ -306,6 +307,18 @@ class _FeaturedProfessionalsSectionState
],
),
);
if (item.id != null && item.id!.isNotEmpty) {
return Material(
color: Colors.transparent,
child: InkWell(
borderRadius: BorderRadius.circular(15),
onTap: () => context.push('/agents/detail/${item.id}'),
child: card,
),
);
}
return card;
}
Widget _buildImagePlaceholder(int index) {