feat: add unlink confirmation dialog, enable agent navigation, update notification read status UI, and increment app version
This commit is contained in:
@@ -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:real_estate_mobile/core/constants/app_colors.dart';
|
||||
import 'package:real_estate_mobile/core/network/api_client.dart';
|
||||
import 'package:real_estate_mobile/core/utils/image_url_resolver.dart';
|
||||
@@ -84,6 +85,7 @@ const _staticAgents = [
|
||||
];
|
||||
|
||||
class _StaticAgent {
|
||||
final String id;
|
||||
final String name;
|
||||
final String role;
|
||||
final String rating;
|
||||
@@ -93,6 +95,7 @@ class _StaticAgent {
|
||||
final bool isVerified;
|
||||
|
||||
const _StaticAgent({
|
||||
this.id = '',
|
||||
required this.name,
|
||||
required this.role,
|
||||
required this.rating,
|
||||
@@ -154,6 +157,7 @@ class _FeaturesSectionState extends ConsumerState<FeaturesSection> {
|
||||
}
|
||||
|
||||
fetched.add(_StaticAgent(
|
||||
id: agent['id'] as String? ?? '',
|
||||
name: agent['name'] as String? ?? '',
|
||||
role: agent['role'] as String? ?? '',
|
||||
rating: agent['rating'] as String? ?? '',
|
||||
@@ -335,7 +339,7 @@ class _FeaturesSectionState extends ConsumerState<FeaturesSection> {
|
||||
}
|
||||
|
||||
Widget _buildStaticAgentCard(_StaticAgent agent) {
|
||||
return Container(
|
||||
final card = Container(
|
||||
width: 254,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
@@ -530,5 +534,17 @@ class _FeaturesSectionState extends ConsumerState<FeaturesSection> {
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
if (agent.id.isNotEmpty) {
|
||||
return Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
onTap: () => context.push('/agents/detail/${agent.id}'),
|
||||
child: card,
|
||||
),
|
||||
);
|
||||
}
|
||||
return card;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user