asBool function

bool asBool(
  1. Map<String, dynamic>? json,
  2. String key, {
  3. bool defaultValue = false,
})

Implementation

bool asBool(Map<String, dynamic>? json, String key,
    {bool defaultValue = false}) {
  if (json == null || !json.containsKey(key)) return defaultValue;
  return toBool(json[key]);
}