feat: Implement centralized error handling with ErrorService; replace print statements with logging in services and blocs
feat: Add ErrorContent widget for displaying error messages in dialogs and bottom sheets refactor: Update GroupBloc and GroupRepository to utilize ErrorService for error logging refactor: Enhance user and trip services to log errors using ErrorService refactor: Clean up debug print statements in GroupContent and related components
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:travel_mate/data/models/trip.dart';
|
||||
import 'package:travel_mate/services/error_service.dart';
|
||||
import '../../blocs/user/user_bloc.dart';
|
||||
import '../../blocs/user/user_state.dart' as user_state;
|
||||
import '../../blocs/trip/trip_bloc.dart';
|
||||
@@ -19,6 +20,7 @@ class CreateTripContent extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _CreateTripContentState extends State<CreateTripContent> {
|
||||
final _errorService = ErrorService();
|
||||
final _formKey = GlobalKey<FormState>();
|
||||
final _titleController = TextEditingController();
|
||||
final _descriptionController = TextEditingController();
|
||||
@@ -528,7 +530,7 @@ class _CreateTripContentState extends State<CreateTripContent> {
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
print('Erreur lors de la récupération de l\'utilisateur: $e');
|
||||
_errorService.logError('Erreur lors de la récupération de l\'utilisateur $email: $e', StackTrace.current);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user