diff --git a/lib/presentation/profile/my_profile_screen/bloc/my_profile_bloc.dart b/lib/presentation/profile/my_profile_screen/bloc/my_profile_bloc.dart index 9865e381..a9118446 100644 --- a/lib/presentation/profile/my_profile_screen/bloc/my_profile_bloc.dart +++ b/lib/presentation/profile/my_profile_screen/bloc/my_profile_bloc.dart @@ -38,12 +38,18 @@ class MyProfileBloc extends Bloc { data.containsKey('user') && data.containsKey('userDetails') && data.containsKey('chartPoints') && - data.containsKey('plans') && data.containsKey('circumferences')) { // Все ключевые поля присутствуют, продолжаем обработку if (state is MyProfileLoadedState) { // Если текущее состояние уже загружено, обновляем его var currentState = state as MyProfileLoadedState; + var plans = [] + ..addAll(data["finishedPlans"]) + ..addAll(data["rejectedPlans"]) + ..addAll(data["startedPlan"]) + ..addAll(data["paidPlan"]) + ..addAll(data["requestedPlan"]) + ..addAll(data["initedPlan"]); // Обновляем значения контроллеров только если они уже были созданы emit((currentState).copyWith( @@ -51,7 +57,7 @@ class MyProfileBloc extends Bloc { circumferences: data['circumferences'], user: data['user'], userDetails: data['userDetails'], - plans: data['plans'], + plans: plans, token: token, chestCircumferenceController: TextEditingController(), waistCircumferenceController: TextEditingController(),