|
|
|
@ -3,8 +3,10 @@ import 'dart:async'; |
|
|
|
import 'package:bloc/bloc.dart'; |
|
|
|
import 'package:flutter/cupertino.dart'; |
|
|
|
import 'package:go_router/go_router.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/core/constants/my_constants.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/core/routers/my_routes.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/core/utils/context_provider.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/core/utils/local_storage.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/features/intro/presentation/bloc/intro_event.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/features/intro/presentation/bloc/intro_state.dart'; |
|
|
|
import 'package:hadi_hoda_flutter/features/intro/presentation/ui/screens/intro_1_screen.dart'; |
|
|
|
@ -33,8 +35,11 @@ class IntroBloc extends Bloc<IntroEvent, IntroState> { |
|
|
|
/// ------------Controllers------------ |
|
|
|
|
|
|
|
/// ------------Functions------------ |
|
|
|
void goToLevelPage(){ |
|
|
|
ContextProvider.context.go(Routes.levelPage); |
|
|
|
Future<void> goToLevelPage() async { |
|
|
|
await LocalStorage.saveData(key: MyConstants.firstIntro, value: 'true'); |
|
|
|
if (ContextProvider.context.mounted) { |
|
|
|
ContextProvider.context.replaceNamed(Routes.levelPage); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// ------------Api Calls------------ |
|
|
|
|