feat(order info): added order info screen

This commit is contained in:
Username1548
2025-04-04 20:21:31 +07:00
parent 9715f4cac9
commit 748484cf8f
387 changed files with 16171 additions and 18199 deletions

View File

@@ -1,3 +1,5 @@
import 'dart:developer';
import 'package:eatvio_app/core/app_router.dart';
import 'package:eatvio_app/core/token_storage.dart';
import 'package:eatvio_app/core/utils/toasts.dart';
@@ -11,10 +13,10 @@ class AuthCubit extends Cubit<AuthState> {
AuthCubit({
required this.authRepository,
}) : super(AuthState());
}) : super(const AuthState());
Future<bool> getTokenByCredentials(String email, String password) async {
emit(AuthState.loading());
emit(const AuthState.loading());
try {
final token = (await authRepository.getTokenByCredentials(
email,
@@ -31,7 +33,7 @@ class AuthCubit extends Cubit<AuthState> {
AppRouter.navigatorKey.currentContext?.go('/my-profile-screen');
return true;
} catch (e) {
print(e);
log(e.toString());
showErrorToast('Неверный адрес электронной почты или пароль');
emit(AuthState.error(errorMessage: '$e'));
return false;