|
@ -5,6 +5,8 @@ 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/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/bloc/intro_bloc.dart'; |
|
|
import 'package:hadi_hoda_flutter/features/intro/presentation/ui/intro_page.dart'; |
|
|
import 'package:hadi_hoda_flutter/features/intro/presentation/ui/intro_page.dart'; |
|
|
|
|
|
import 'package:hadi_hoda_flutter/features/language/presentation/bloc/language_bloc.dart'; |
|
|
|
|
|
import 'package:hadi_hoda_flutter/features/language/presentation/ui/language_page.dart'; |
|
|
import 'package:hadi_hoda_flutter/features/level/presentation/bloc/level_bloc.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/bloc/level_event.dart'; |
|
|
import 'package:hadi_hoda_flutter/features/level/presentation/ui/level_page.dart'; |
|
|
import 'package:hadi_hoda_flutter/features/level/presentation/ui/level_page.dart'; |
|
@ -19,13 +21,14 @@ class Routes { |
|
|
factory Routes() => _i; |
|
|
factory Routes() => _i; |
|
|
|
|
|
|
|
|
static const String introPage = '/intro_page'; |
|
|
static const String introPage = '/intro_page'; |
|
|
|
|
|
static const String languagePage = '/language_page'; |
|
|
static const String homePage = '/home_page'; |
|
|
static const String homePage = '/home_page'; |
|
|
static const String questionPage = '/question_page'; |
|
|
static const String questionPage = '/question_page'; |
|
|
static const String levelPage = '/level_page'; |
|
|
static const String levelPage = '/level_page'; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
GoRouter get appPages => GoRouter( |
|
|
GoRouter get appPages => GoRouter( |
|
|
initialLocation: Routes.introPage, |
|
|
|
|
|
|
|
|
initialLocation: Routes.languagePage, |
|
|
navigatorKey: ContextProvider.navigatorKey, |
|
|
navigatorKey: ContextProvider.navigatorKey, |
|
|
routes: [ |
|
|
routes: [ |
|
|
GoRoute( |
|
|
GoRoute( |
|
@ -36,6 +39,14 @@ GoRouter get appPages => GoRouter( |
|
|
child: const IntroPage(), |
|
|
child: const IntroPage(), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
|
|
|
GoRoute( |
|
|
|
|
|
name: Routes.languagePage, |
|
|
|
|
|
path: Routes.languagePage, |
|
|
|
|
|
builder: (context, state) => BlocProvider( |
|
|
|
|
|
create: (context) => LanguageBloc(locator()), |
|
|
|
|
|
child: const LanguagePage(), |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
GoRoute( |
|
|
GoRoute( |
|
|
name: Routes.homePage, |
|
|
name: Routes.homePage, |
|
|
path: Routes.homePage, |
|
|
path: Routes.homePage, |
|
|