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

@@ -63,6 +63,7 @@ class TopProfessionalsContent {
}
class ProfessionalItem {
final String? id;
final String name;
final String subtitle;
final String location;
@@ -72,6 +73,7 @@ class ProfessionalItem {
final double rating;
const ProfessionalItem({
this.id,
required this.name,
this.subtitle = '',
this.location = '',
@@ -83,6 +85,7 @@ class ProfessionalItem {
factory ProfessionalItem.fromJson(Map<String, dynamic> json) {
return ProfessionalItem(
id: json['id'] as String?,
name: json['name'] as String? ?? '',
subtitle: json['subtitle'] as String? ?? '',
location: json['location'] as String? ?? '',
@@ -127,6 +130,7 @@ class HeroContent {
// --- Features Section ---
class FeaturedAgentItem {
final String? id;
final String name;
final String role;
final String rating;
@@ -135,6 +139,7 @@ class FeaturedAgentItem {
final String imageUrl;
const FeaturedAgentItem({
this.id,
this.name = '',
this.role = '',
this.rating = '',
@@ -145,6 +150,7 @@ class FeaturedAgentItem {
factory FeaturedAgentItem.fromJson(Map<String, dynamic> json) {
return FeaturedAgentItem(
id: json['id'] as String?,
name: json['name'] as String? ?? '',
role: json['role'] as String? ?? '',
rating: json['rating'] as String? ?? '',