updateMember method

void updateMember(
  1. User? user
)

Implementation

void updateMember(User? user) {
  if (user == null) return;

  final index = members.indexWhere((e) => e.userId == user.userId);
  if (index != -1) {
    final member = members[index];
    member.copyWith(user);
  }
}