filterErrors<K> function

Iterable<String> filterErrors<K>(
  1. Iterable<K> fields,
  2. Map<K, String> errors
)

Implementation

Iterable<String> filterErrors<K>(Iterable<K> fields, Map<K, String> errors) =>
    errors.entries
        .where((entry) => fields.contains(entry.key))
        .map((entry) => entry.value);