streamValidation property

Stream<Map<T, String?>> get streamValidation

Implementation

Stream<Map<T, String?>> get streamValidation async* {
  if (superValidationMap.isEmpty) yield {};
  var result = List<Stream<Map<T, String?>>>.empty(growable: true);
  superValidationMap.forEach((key, value) {
    result.add(value.streamValidation.map((e) => {key: e}));
  });
  await for (var state in StreamGroup.merge<Map<T, String?>>(result)) {
    state.forEach((key, value) {
      if (value == null) {
        if (store.containsKey(key)) {
          store.remove(key);
        }
      } else {
        store[key] = value;
      }
    });
    yield store;
  }
}