feat: Implement the onboarding flow with new screens, assets, and updated splash screen navigation logic.

This commit is contained in:
pradeepkumar
2026-03-10 23:10:23 +05:30
parent 792965f717
commit d1318d25b9
11 changed files with 439 additions and 7 deletions

View File

@@ -21,6 +21,7 @@ import 'package:real_estate_mobile/features/notifications/presentation/screens/n
import 'package:real_estate_mobile/features/agents/presentation/screens/agent_edit_profile_screen.dart';
import 'package:real_estate_mobile/features/profile/presentation/screens/payment_success_screen.dart';
import 'package:real_estate_mobile/features/splash/presentation/screens/splash_screen.dart';
import 'package:real_estate_mobile/features/onboarding/presentation/screens/onboarding_screen.dart';
final routerProvider = Provider<GoRouter>((ref) {
final authRefreshNotifier = _AuthRefreshNotifier();
@@ -51,8 +52,8 @@ final routerProvider = Provider<GoRouter>((ref) {
(route) => location == route || location.startsWith('$route/'),
);
// Never redirect away from splash — it handles its own navigation
if (location == '/splash') return null;
// Never redirect away from splash or onboarding — they handle their own navigation
if (location == '/splash' || location == '/onboarding') return null;
// While checking auth status, don't redirect
if (isLoading) return null;
@@ -75,6 +76,12 @@ final routerProvider = Provider<GoRouter>((ref) {
builder: (context, state) => const SplashScreen(),
),
// Onboarding (shown only once on first install)
GoRoute(
path: '/onboarding',
builder: (context, state) => const OnboardingScreen(),
),
// Auth routes (no shell — full screen)
GoRoute(
path: '/login',