feat: Implement BalanceRepository for group balance calculations feat: Create ExpenseRepository for managing expenses feat: Add services for handling expenses and storage operations fix: Update import paths for models in repositories and services refactor: Rename CountContent to AccountContent in HomePage chore: Add StorageService for image upload and management
54 lines
1.0 KiB
Dart
54 lines
1.0 KiB
Dart
import 'package:equatable/equatable.dart';
|
|
import '../../models/trip.dart';
|
|
|
|
abstract class TripState extends Equatable {
|
|
const TripState();
|
|
|
|
@override
|
|
List<Object?> get props => [];
|
|
}
|
|
|
|
class TripInitial extends TripState {}
|
|
|
|
class TripLoading extends TripState {}
|
|
|
|
class TripLoaded extends TripState {
|
|
final List<Trip> trips;
|
|
|
|
const TripLoaded(this.trips);
|
|
|
|
@override
|
|
List<Object?> get props => [trips];
|
|
}
|
|
|
|
// NOUVEAU : État pour indiquer qu'un voyage a été créé avec succès
|
|
class TripCreated extends TripState {
|
|
final String tripId;
|
|
final String message;
|
|
|
|
const TripCreated({
|
|
required this.tripId,
|
|
this.message = 'Voyage créé avec succès',
|
|
});
|
|
|
|
@override
|
|
List<Object?> get props => [tripId, message];
|
|
}
|
|
|
|
class TripOperationSuccess extends TripState {
|
|
final String message;
|
|
|
|
const TripOperationSuccess(this.message);
|
|
|
|
@override
|
|
List<Object?> get props => [message];
|
|
}
|
|
|
|
class TripError extends TripState {
|
|
final String message;
|
|
|
|
const TripError(this.message);
|
|
|
|
@override
|
|
List<Object?> get props => [message];
|
|
} |