feat: Implement the onboarding flow with new screens, assets, and updated splash screen navigation logic.
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user