getAdminsList function
Implementation
List<String> getAdminsList(
List<MemberDTO>? members, List<MemberDTO>? pendingMembers) {
final adminsFromMembers = members != null
? convertToWalletAddressList(
members.where((admin) => admin.isAdmin).toList())
: <String>[];
final adminsFromPendingMembers = pendingMembers != null
? convertToWalletAddressList(
pendingMembers.where((admin) => admin.isAdmin).toList())
: <String>[];
final adminList = [...adminsFromMembers, ...adminsFromPendingMembers];
return adminList;
}