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:
@@ -69,6 +69,7 @@ class ProfessionalItem {
|
||||
final String experience;
|
||||
final List<String> expertise;
|
||||
final String imageUrl;
|
||||
final double rating;
|
||||
|
||||
const ProfessionalItem({
|
||||
required this.name,
|
||||
@@ -77,6 +78,7 @@ class ProfessionalItem {
|
||||
this.experience = '',
|
||||
this.expertise = const [],
|
||||
this.imageUrl = '',
|
||||
this.rating = 5.0,
|
||||
});
|
||||
|
||||
factory ProfessionalItem.fromJson(Map<String, dynamic> json) {
|
||||
@@ -90,6 +92,9 @@ class ProfessionalItem {
|
||||
.toList() ??
|
||||
[],
|
||||
imageUrl: json['imageUrl'] as String? ?? '',
|
||||
rating: (json['rating'] as num?)?.toDouble() ??
|
||||
(json['averageRating'] as num?)?.toDouble() ??
|
||||
5.0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user