forked from eatvio/eatvio_app
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:
@@ -3,6 +3,7 @@ import 'package:eatvio_app/core/const.dart';
|
||||
import 'package:eatvio_app/features/my_plans/presentation/cubit/my_plans_state.dart';
|
||||
import 'package:eatvio_app/features/my_plans/repositories/my_diets_repository.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:eatvio_app/core/error_reporting/report_from.dart';
|
||||
|
||||
class MyPlansCubit extends Cubit<MyPlansState> {
|
||||
final MyPlansRepository myPlansRepository;
|
||||
@@ -145,7 +146,8 @@ class MyPlansCubit extends Cubit<MyPlansState> {
|
||||
maxActivePlanPrice: maxPlanPrice,
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
} catch (e, st) {
|
||||
await reportFrom(e, st, this);
|
||||
emit(
|
||||
state.copyWith(error: e.toString()),
|
||||
);
|
||||
@@ -185,7 +187,8 @@ class MyPlansCubit extends Cubit<MyPlansState> {
|
||||
maxDraftPlanPrice: maxPlanPrice,
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
} catch (e, st) {
|
||||
await reportFrom(e, st, this);
|
||||
emit(
|
||||
state.copyWith(error: e.toString()),
|
||||
);
|
||||
@@ -197,7 +200,8 @@ class MyPlansCubit extends Cubit<MyPlansState> {
|
||||
await myPlansRepository.deletePlan(slug);
|
||||
await loadAllPlans();
|
||||
return true;
|
||||
} catch (e) {
|
||||
} catch (e, st) {
|
||||
await reportFrom(e, st, this);
|
||||
emit(
|
||||
state.copyWith(error: e.toString()),
|
||||
);
|
||||
@@ -209,7 +213,8 @@ class MyPlansCubit extends Cubit<MyPlansState> {
|
||||
try {
|
||||
await myPlansRepository.unpublish(slug);
|
||||
return true;
|
||||
} catch (e) {
|
||||
} catch (e, st) {
|
||||
await reportFrom(e, st, this);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user