diff --git a/lib/features/coming_soon/presentation/screens/coming_soon_screen.dart b/lib/features/coming_soon/presentation/screens/coming_soon_screen.dart new file mode 100644 index 0000000..00619b2 --- /dev/null +++ b/lib/features/coming_soon/presentation/screens/coming_soon_screen.dart @@ -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, + ), + ), + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/features/home/presentation/widgets/home_header.dart b/lib/features/home/presentation/widgets/home_header.dart index 258cc2d..9a30d57 100644 --- a/lib/features/home/presentation/widgets/home_header.dart +++ b/lib/features/home/presentation/widgets/home_header.dart @@ -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( diff --git a/lib/features/messaging/presentation/screens/chat_screen.dart b/lib/features/messaging/presentation/screens/chat_screen.dart index fab19f5..c4240aa 100644 --- a/lib/features/messaging/presentation/screens/chat_screen.dart +++ b/lib/features/messaging/presentation/screens/chat_screen.dart @@ -1397,8 +1397,12 @@ class _ChatScreenState extends ConsumerState ), ), 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, + ), ], ); } diff --git a/lib/routing/app_router.dart b/lib/routing/app_router.dart index 891124a..45a9d6f 100644 --- a/lib/routing/app_router.dart +++ b/lib/routing/app_router.dart @@ -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((ref) { final authRefreshNotifier = _AuthRefreshNotifier(); @@ -201,6 +202,18 @@ final routerProvider = Provider((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(