isReadByAll method

bool isReadByAll(
  1. List<String> participantIds
)

Check if message has been read by all participants (except sender)

Implementation

bool isReadByAll(List<String> participantIds) {
  final otherParticipants = participantIds.where((id) => id != senderId).toList();
  return otherParticipants.every((id) => readBy.containsKey(id));
}