getBool method

bool getBool(
  1. String key, [
  2. bool? defaultValue
])

returns the value corresponding with key as bool if null returns defaultValue

Implementation

bool getBool(String key, [bool? defaultValue]) {
  var val = optBool(key, defaultValue);
  if (val == null) {
    throw MissingRequiredParameterError(
        'Failed to parse [bool] $key value from ${_params[key]}');
  }
  return val;
}