- Implemented ExpensesTab to display a list of expenses with details. - Created GroupExpensesPage to manage group expenses with a tabbed interface. - Added SettlementsTab to show optimized settlements between users. - Developed data models for Expense and Balance, including necessary methods for serialization. - Introduced CountRepository for Firestore interactions related to expenses. - Added CountService to handle business logic for expenses and settlements. - Integrated image picker for receipt uploads. - Updated main.dart to include CountBloc and CountRepository. - Enhanced pubspec.yaml with new dependencies for image picking and Firebase storage. Not Tested yet
51 lines
963 B
Dart
51 lines
963 B
Dart
import 'package:equatable/equatable.dart';
|
|
import '../../data/models/group.dart';
|
|
|
|
abstract class GroupState extends Equatable {
|
|
const GroupState();
|
|
|
|
@override
|
|
List<Object?> get props => [];
|
|
}
|
|
|
|
// État initial
|
|
class GroupInitial extends GroupState {}
|
|
|
|
// Chargement
|
|
class GroupLoading extends GroupState {}
|
|
|
|
// Groupes chargés
|
|
class GroupsLoaded extends GroupState {
|
|
final List<Group> groups;
|
|
|
|
const GroupsLoaded(this.groups);
|
|
|
|
@override
|
|
List<Object?> get props => [groups];
|
|
}
|
|
|
|
class GroupLoaded extends GroupState {
|
|
final List<Group> groups;
|
|
|
|
const GroupLoaded(this.groups);
|
|
}
|
|
|
|
// Succès d'une opération
|
|
class GroupOperationSuccess extends GroupState {
|
|
final String message;
|
|
|
|
const GroupOperationSuccess(this.message);
|
|
|
|
@override
|
|
List<Object?> get props => [message];
|
|
}
|
|
|
|
// Erreur
|
|
class GroupError extends GroupState {
|
|
final String message;
|
|
|
|
const GroupError(this.message);
|
|
|
|
@override
|
|
List<Object?> get props => [message];
|
|
} |