feat:mai page done
This commit is contained in:
@@ -19,7 +19,7 @@ class SplashBloc extends Bloc<SplashEvent, SplashState> {
|
||||
final token = _storageService.getString(key: AppLocaleKeys.token);
|
||||
log("Token:$token");
|
||||
if (token != null) {
|
||||
emit(state.copyWith(status: RequestStatus.error));
|
||||
emit(state.copyWith(status: RequestStatus.loaded));
|
||||
} else {
|
||||
emit(state.copyWith(status: RequestStatus.error));
|
||||
}
|
||||
|
||||
@@ -14,6 +14,10 @@ class SplashPage extends StatelessWidget {
|
||||
if (state.status.isError()) {
|
||||
context.go(Routes.onBoarding);
|
||||
}
|
||||
|
||||
if (state.status.isLoaded()) {
|
||||
context.go(Routes.main);
|
||||
}
|
||||
},
|
||||
child: WLayout(
|
||||
bottom: false,
|
||||
|
||||
Reference in New Issue
Block a user