getParticipantNames method

Iterable<String> getParticipantNames(
  1. MeshDocument document
)

Implementation

Iterable<String> getParticipantNames(MeshDocument document) sync* {
  final seenParticipantNames = <String>{};
  for (final child in document.root.getChildren().whereType<MeshElement>()) {
    if (child.tagName == "members") {
      for (final member in child.getChildren().whereType<MeshElement>()) {
        final participantName = member.getAttribute("name");
        if (participantName is String && participantName.isNotEmpty && seenParticipantNames.add(participantName)) {
          yield participantName;
        }
      }
    }
  }
}