Add functionality to manage account members: implement add and remove member events, update account repository methods, and integrate with trip details for participant management.

This commit is contained in:
Van Leemput Dayron
2025-11-14 00:03:38 +01:00
parent 9101a94691
commit c322bc079a
5 changed files with 415 additions and 115 deletions

View File

@@ -85,4 +85,32 @@ class CreateAccountWithMembers extends AccountEvent {
@override
List<Object?> get props => [account, members];
}
/// Event to add a member to an existing account.
///
/// This event is dispatched when a new member needs to be added to
/// an account, typically when editing a trip and adding new participants.
class AddMemberToAccount extends AccountEvent {
final String accountId;
final GroupMember member;
const AddMemberToAccount(this.accountId, this.member);
@override
List<Object?> get props => [accountId, member];
}
/// Event to remove a member from an existing account.
///
/// This event is dispatched when a member needs to be removed from
/// an account, typically when editing a trip and removing participants.
class RemoveMemberFromAccount extends AccountEvent {
final String accountId;
final String memberId;
const RemoveMemberFromAccount(this.accountId, this.memberId);
@override
List<Object?> get props => [accountId, memberId];
}