getBoolWithDefaultValue method
Reads a key
value of bool type from Map.
If value is NULL or not bool type return default value defaultBool
Implementation
bool getBoolWithDefaultValue(String key, {bool defaultValue = defaultBool}) {
if (containsKey(key)) {
if (this[key] is bool) {
return this[key] ?? defaultValue;
}
}
return defaultValue;
}