feat: Implement account management features

- Added ExpenseDetailDialog for displaying expense details and actions.
- Created ExpensesTab to list expenses for a group.
- Developed GroupExpensesPage to manage group expenses with tabs for expenses, balances, and settlements.
- Introduced SettlementsTab to show optimized repayment plans.
- Refactored create_trip_content.dart to remove CountBloc and related logic.
- Added Account model to manage user accounts and group members.
- Replaced CountRepository with AccountRepository for account-related operations.
- Removed CountService and CountRepository as part of the refactor.
- Updated main.dart and home.dart to integrate new account management components.
This commit is contained in:
Dayron
2025-10-21 00:42:36 +02:00
parent a3ced0e812
commit c69618cbd9
21 changed files with 182 additions and 747 deletions

View File

@@ -0,0 +1,48 @@
import 'group_member.dart';
class Account {
final String id;
final String tripId;
final String groupId;
final List<GroupMember> members;
Account({
required this.id,
required this.tripId,
required this.groupId,
List<GroupMember>? members,
}) : members = members ?? [];
factory Account.fromMap(Map<String, dynamic> map) {
return Account(
id: map['id'] as String,
tripId: map['tripId'] as String,
groupId: map['groupId'] as String,
members: [],
);
}
Map<String, dynamic> toMap() {
return {
'id': id,
'tripId': tripId,
'groupId': groupId,
'members': members.map((member) => member.toMap()).toList(),
};
}
Account copyWith({
String? id,
String? tripId,
String? groupId,
List<GroupMember>? members,
}) {
return Account(
id: id ?? this.id,
tripId: tripId ?? this.tripId,
groupId: groupId ?? this.groupId,
members: members ?? this.members,
);
}
}