list method

Stream<List<Student>> list()

Implementation

Stream<List<Student>> list() async* {
  var meta = await student.meta.get();
  var groups = meta?.groups
      .where((element) => _groupNames.contains(element.name))
      .toList();
  for (var group in groups ?? []) {
    var context = await student.context.get(group.id);
    if (context != null) {
      var groupFetched = await student.classes
          .get(ClassRef(name: '', id: context.id), group: true);
      yield groupFetched.students;
    }
  }
}