added splash screen

This commit is contained in:
amirrezaghabeli
2025-09-22 16:04:49 +03:30
parent 197ad18618
commit f1214d8a28
14 changed files with 253 additions and 12 deletions
+13 -1
View File
@@ -12,6 +12,7 @@ import '../../views/final_completion_of_documents/pages/final_completion_of_docu
import '../../views/forgot_password/pages/forgot_password_screen.dart';
import '../../views/notification/pages/notification_screen.dart';
import '../../views/profile/pages/profile_screen.dart';
import '../../views/splash/pages/splash_screen.dart';
import '../../views/tenders/pages/tenders_screen.dart';
import '../../views/your_tenders/pages/your_tenders_screen.dart';
import 'app_shell/app_shell_screen.dart';
@@ -31,7 +32,7 @@ final GlobalKey<NavigatorState> notificationNavigatorKey =
// Main app router
final GoRouter appRouter = GoRouter(
routes: $appRoutes,
initialLocation: '/login',
initialLocation: '/splash',
navigatorKey: rootNavigatorKey,
);
@@ -46,6 +47,17 @@ class LoginScreenRoute extends GoRouteData with _$LoginScreenRoute {
}
}
// splash route - outside the shell
@TypedGoRoute<SplashScreenRoute>(path: '/splash')
class SplashScreenRoute extends GoRouteData with _$SplashScreenRoute {
const SplashScreenRoute();
@override
Widget build(BuildContext context, GoRouterState state) {
return const SplashScreen();
}
}
// Shell route with bottom navigation using StatefulShellRoute.indexedStack
@TypedStatefulShellRoute<AppShellRouteData>(
branches: <TypedStatefulShellBranch<StatefulShellBranchData>>[