feat(app): refactoring of sentry using, feat(become_consultant): fixed possible infinite loading, feat(push_notifications): fixed push navigation from paid plan push

This commit is contained in:
misha
2026-04-07 10:05:11 +03:00
parent b6b13b1db5
commit aac085def4
133 changed files with 2344 additions and 2456 deletions

View File

@@ -6,6 +6,7 @@ import 'package:eatvio_app/features/my_finance/models/payment_url_model.dart';
import 'package:eatvio_app/features/my_finance/presentation/cubit/user_cards_cubit/user_cards_state.dart';
import 'package:eatvio_app/features/my_finance/repositories/cards_repository.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:eatvio_app/core/error_reporting/report_from.dart';
class UserCardsCubit extends Cubit<UserCardsState> {
final CardsRepository cardsRepository;
@@ -15,6 +16,7 @@ class UserCardsCubit extends Cubit<UserCardsState> {
try {
return await cardsRepository.addCard();
} catch (e, st) {
await reportFrom(e, st, this);
log(e.toString(), stackTrace: st);
}
return null;
@@ -27,6 +29,7 @@ class UserCardsCubit extends Cubit<UserCardsState> {
final cards = await cardsRepository.getCards();
emit(state.copyWith(cards: cards, state: BaseState.success));
} catch (e, st) {
await reportFrom(e, st, this);
log(e.toString(), stackTrace: st);
emit(state.copyWith(state: BaseState.error, error: e.toString()));
}
@@ -47,6 +50,7 @@ class UserCardsCubit extends Cubit<UserCardsState> {
try {
await cardsRepository.markAsDefault(id: id);
} catch (e, st) {
await reportFrom(e, st, this);
emit(state.copyWith(cards: oldCards));
log(e.toString(), stackTrace: st);
}
@@ -61,6 +65,7 @@ class UserCardsCubit extends Cubit<UserCardsState> {
emit(state.copyWith(cards: cards));
await cardsRepository.deleteCard(id: id);
} catch (e, st) {
await reportFrom(e, st, this);
emit(state.copyWith(cards: oldCards, error: e.toString(), state: BaseState.error));
log(e.toString(), stackTrace: st);
}
@@ -71,6 +76,7 @@ class UserCardsCubit extends Cubit<UserCardsState> {
await cardsRepository.collectCharge(chosenPlaId: chosenPlaId);
return true;
} catch (e, st) {
await reportFrom(e, st, this);
log(e.toString(), stackTrace: st);
}
return false;