requireNotNull function

void requireNotNull(
  1. Map<String, String> map,
  2. List<String> keys
)

Implementation

void requireNotNull(Map<String, String> map, List<String> keys) {
  for (var key in keys) {
    if (!map.containsKey(key) || map[key] == null) {
      throw '$key should be defined!';
    }
  }
}