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:
@@ -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];
|
||||
}
|
||||
Reference in New Issue
Block a user