feat: Enhance trip management features and improve UI responsiveness
- Implemented AutomaticKeepAliveClientMixin in HomeContent to maintain state during navigation. - Modified trip loading logic to trigger after the first frame for better performance. - Updated trip loading events to use LoadTripsByUserId for consistency. - Added temporary success messages for trip creation and operations. - Improved UI elements for better user experience, including updated text styles and spacing. - Refactored trip model to support Firestore timestamps and improved error handling during parsing. - Streamlined trip repository methods for better clarity and performance. - Enhanced trip service methods to ensure correct mapping from Firestore documents. - Removed unnecessary trip reset logic on logout.
This commit is contained in:
@@ -8,10 +8,10 @@ abstract class TripEvent extends Equatable {
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
|
||||
class TripLoadRequested extends TripEvent {
|
||||
class LoadTripsByUserId extends TripEvent {
|
||||
final String userId;
|
||||
|
||||
const TripLoadRequested({required this.userId});
|
||||
const LoadTripsByUserId({required this.userId});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [userId];
|
||||
@@ -42,38 +42,4 @@ class TripDeleteRequested extends TripEvent {
|
||||
|
||||
@override
|
||||
List<Object?> get props => [tripId];
|
||||
}
|
||||
|
||||
class TripParticipantAddRequested extends TripEvent {
|
||||
final String tripId;
|
||||
final String participantEmail;
|
||||
|
||||
const TripParticipantAddRequested({
|
||||
required this.tripId,
|
||||
required this.participantEmail,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [tripId, participantEmail];
|
||||
}
|
||||
|
||||
class TripParticipantRemoveRequested extends TripEvent {
|
||||
final String tripId;
|
||||
final String participantEmail;
|
||||
|
||||
const TripParticipantRemoveRequested({
|
||||
required this.tripId,
|
||||
required this.participantEmail,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [tripId, participantEmail];
|
||||
}
|
||||
|
||||
// NOUVEAU : Événement pour réinitialiser les trips
|
||||
class ResetTrips extends TripEvent {
|
||||
const ResetTrips();
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
Reference in New Issue
Block a user