optBool method
returns the value corresponding with key
as nullable bool
if null returns defaultValue
Implementation
bool? optBool(String key, [bool? defaultValue]) {
switch (_params[key]?.toLowerCase()) {
case 'true':
return true;
case 'false':
return false;
default:
return defaultValue;
}
}