feat: add ComingSoonScreen, integrate it into routing, and update chat avatar and home menu navigation

This commit is contained in:
pradeepkumar
2026-04-15 15:52:41 +05:30
parent df32a83692
commit fcb8f77004
4 changed files with 141 additions and 3 deletions

View File

@@ -0,0 +1,118 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:real_estate_mobile/core/constants/app_colors.dart';
class ComingSoonScreen extends StatelessWidget {
final String title;
const ComingSoonScreen({super.key, this.title = 'Coming Soon'});
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
backgroundColor: AppColors.primaryDark,
foregroundColor: Colors.white,
elevation: 0,
leading: IconButton(
icon: const Icon(Icons.arrow_back, color: Colors.white),
onPressed: () {
if (context.canPop()) {
context.pop();
} else {
context.go('/home');
}
},
),
title: Text(
title,
style: const TextStyle(
fontFamily: 'Fractul',
fontSize: 18,
fontWeight: FontWeight.w600,
color: Colors.white,
),
),
),
body: SafeArea(
child: Center(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 32),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: 120,
height: 120,
decoration: BoxDecoration(
color: AppColors.accentOrange.withValues(alpha: 0.12),
shape: BoxShape.circle,
),
child: const Icon(
Icons.rocket_launch_rounded,
size: 64,
color: AppColors.accentOrange,
),
),
const SizedBox(height: 32),
const Text(
'Coming Soon',
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: 'Fractul',
fontSize: 28,
fontWeight: FontWeight.w700,
color: AppColors.primaryDark,
),
),
const SizedBox(height: 12),
const Text(
"We're working hard to bring this feature to you. Stay tuned!",
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: 'SourceSerif4',
fontSize: 15,
fontWeight: FontWeight.w400,
color: AppColors.primaryDark,
height: 1.5,
),
),
const SizedBox(height: 40),
SizedBox(
width: double.infinity,
height: 52,
child: ElevatedButton(
onPressed: () {
if (context.canPop()) {
context.pop();
} else {
context.go('/home');
}
},
style: ElevatedButton.styleFrom(
backgroundColor: AppColors.accentOrange,
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
child: const Text(
'Go Back Home',
style: TextStyle(
fontFamily: 'Fractul',
fontSize: 16,
fontWeight: FontWeight.w700,
color: Colors.white,
),
),
),
),
],
),
),
),
),
);
}
}

View File

@@ -268,7 +268,10 @@ class _MenuDrawer extends ConsumerWidget {
context,
icon: Icons.school_rounded,
label: 'Education',
onTap: () => Navigator.pop(context),
onTap: () {
Navigator.pop(context);
context.push('/coming-soon?title=Education');
},
),
const Divider(color: AppColors.divider, height: 1),
_buildMenuItem(

View File

@@ -1397,8 +1397,12 @@ class _ChatScreenState extends ConsumerState<ChatScreen>
),
),
const SizedBox(width: 10),
// Avatar
_buildMessageAvatar(null, senderName, 45),
// Avatar — use current user's avatar for sent messages
_buildMessageAvatar(
ref.read(authProvider).user?.avatar,
senderName,
45,
),
],
);
}

View File

@@ -24,6 +24,7 @@ import 'package:real_estate_mobile/features/splash/presentation/screens/splash_s
import 'package:real_estate_mobile/features/onboarding/presentation/screens/onboarding_screen.dart';
import 'package:real_estate_mobile/features/auth/presentation/screens/verify_2fa_screen.dart';
import 'package:real_estate_mobile/features/support_chat/presentation/screens/support_chat_screen.dart';
import 'package:real_estate_mobile/features/coming_soon/presentation/screens/coming_soon_screen.dart';
final routerProvider = Provider<GoRouter>((ref) {
final authRefreshNotifier = _AuthRefreshNotifier();
@@ -201,6 +202,18 @@ final routerProvider = Provider<GoRouter>((ref) {
);
},
),
GoRoute(
path: '/coming-soon',
pageBuilder: (context, state) => CustomTransitionPage(
key: state.pageKey,
child: ComingSoonScreen(
title: state.uri.queryParameters['title'] ?? 'Coming Soon',
),
transitionDuration: const Duration(milliseconds: 250),
reverseTransitionDuration: const Duration(milliseconds: 200),
transitionsBuilder: _slideTransition,
),
),
GoRoute(
path: '/faq',
pageBuilder: (context, state) => CustomTransitionPage(