updated error handling, consultant rating layout and complaining logic

This commit is contained in:
Username1548
2025-02-28 19:18:01 +07:00
parent e5b293db79
commit 0cdd40102f
86 changed files with 3853 additions and 279 deletions

View File

@@ -110,7 +110,7 @@ class DietsCubit extends Cubit<DietsState> {
} catch (e, st) {
log(e.toString(), stackTrace: st);
emit(
state.copyWith(isLoading: false),
state.copyWith(isLoading: false, errorMessage: e.toString()),
);
}
}
@@ -144,13 +144,15 @@ class DietsCubit extends Cubit<DietsState> {
);
}
} catch (e) {
emit(state.copyWith(isLoading: false));
emit(
state.copyWith(isLoading: false, errorMessage: e.toString()),
);
}
}
}
Future<void> likeDiet(int id, int index) async {
final currentDiets = state.dietsList;
final currentDiets = state.dietsList;
final dietsForModification = [...currentDiets];
final currentDiet = currentDiets[index];
if (currentDiet.wasLikedByMe) {