feat:some changes done in login

This commit is contained in:
jahongireshonqulov
2025-11-01 11:31:37 +05:00
parent 689cf29eab
commit 4acc409de0
6 changed files with 182 additions and 113 deletions

View File

@@ -17,8 +17,9 @@ class SplashBloc extends Bloc<SplashEvent, SplashState> {
_onStarted(_Started event, Emitter<SplashState> emit) async {
await Future.delayed(TimeDelayConst.duration2);
final token = _storageService.getString(key: AppLocaleKeys.token);
log("Token:$token");
if (token != null) {
emit(state.copyWith(status: RequestStatus.loaded));
emit(state.copyWith(status: RequestStatus.error));
} else {
emit(state.copyWith(status: RequestStatus.error));
}