|
|
@ -3,6 +3,8 @@ import 'package:go_router/go_router.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/core/utils/context_provider.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/features/home/presentation/bloc/home_bloc.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/features/home/presentation/ui/home_page.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/features/intro/presentation/bloc/intro_bloc.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/features/intro/presentation/ui/intro_page.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/features/level/presentation/bloc/level_bloc.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/features/level/presentation/bloc/level_event.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/features/level/presentation/ui/level_page.dart'; |
|
|
@ -15,15 +17,24 @@ class Routes { |
|
|
|
const Routes._internal(); |
|
|
|
factory Routes() => _i; |
|
|
|
|
|
|
|
static const String introPage = '/intro_page'; |
|
|
|
static const String homePage = '/home_page'; |
|
|
|
static const String questionPage = '/question_page'; |
|
|
|
static const String levelPage = '/level_page'; |
|
|
|
} |
|
|
|
|
|
|
|
GoRouter get appPages => GoRouter( |
|
|
|
initialLocation: Routes.homePage, |
|
|
|
initialLocation: Routes.introPage, |
|
|
|
navigatorKey: ContextProvider.navigatorKey, |
|
|
|
routes: [ |
|
|
|
GoRoute( |
|
|
|
name: Routes.introPage, |
|
|
|
path: Routes.introPage, |
|
|
|
builder: (context, state) => BlocProvider( |
|
|
|
create: (context) => IntroBloc(locator()), |
|
|
|
child: const IntroPage(), |
|
|
|
), |
|
|
|
), |
|
|
|
GoRoute( |
|
|
|
name: Routes.homePage, |
|
|
|
path: Routes.homePage, |
|
|
|