internet connection handling

This commit is contained in:
Username1548
2025-02-03 15:32:12 +07:00
parent 4242265830
commit 589122581b
30 changed files with 1384 additions and 666 deletions

View File

@@ -1,3 +1,5 @@
import 'dart:developer';
import 'package:eatvio_app/features/plans/repositories/plans_repository.dart';
import 'package:eatvio_app/features/profile/presentation/bloc/plans_cubit/plans_state.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
@@ -14,7 +16,7 @@ class PlansCubit extends Cubit<PlansState> {
try {
emit(PlansState.loaded(plansList: await plansRepository.getPlansBySlug(slug)));
} catch (e) {
print(e);
log(e.toString());
emit(PlansState.error(errorMessage: e.toString()));
}
}