boolValue static method

bool? boolValue(
  1. Map<String, dynamic>? info,
  2. String key, [
  3. bool strictType = true
])

Implementation

static bool? boolValue(Map<String,dynamic>? info, String key, [bool strictType = true]) {
  if (info == null) { return null; }
  final value = info[key];
  if (value != null && value is bool) {
    return value;
  }
  if (strictType == false) {
    if (value != null && value is String) {
      return bool.parse(value);
    }
  }
  return null;
}