getOtherMembersRoomInfo static method
Implementation
static Future<List<OtherMemberRoomInfo>> getOtherMembersRoomInfo(
String thisMemberId, String appId, List<String> memberIds) async {
List<OtherMemberRoomInfo> otherMembersRoomInfo = [];
for (var memberId in memberIds) {
if (memberId != thisMemberId) {
var member =
await memberPublicInfoRepository(appId: appId)!.get(memberId);
if (member != null) {
var otherMemberRoomInfo = OtherMemberRoomInfo(
memberId: member.documentID,
name: (member.name != null && member.name!.isNotEmpty)
? member.name!
: 'No name',
avatar: member.photoURL);
otherMembersRoomInfo.add(otherMemberRoomInfo);
}
}
}
return otherMembersRoomInfo;
}