forked from eatvio/eatvio_app
go router full
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
import 'package:eatvio_app/app_router.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/registration/splash_screen/models/splash_model.dart';
|
||||
|
||||
part 'splash_event.dart';
|
||||
|
||||
part 'splash_state.dart';
|
||||
|
||||
/// A bloc that manages the state of a Splash according to the event that is dispatched to it.
|
||||
@@ -16,9 +20,7 @@ class SplashBloc extends Bloc<SplashEvent, SplashState> {
|
||||
Emitter<SplashState> emit,
|
||||
) async {
|
||||
Future.delayed(const Duration(milliseconds: 3000), () {
|
||||
NavigatorService.popAndPushNamed(
|
||||
AppRoutes.myProfile,
|
||||
);
|
||||
AppRouter.navigatorKey.currentContext?.goNamed('myProfileScreen');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user