optNullableBoolean method
Returns the value mapped by name
if it exists, coercing it if necessary, or null
if no such
mapping exists.
If remove
is true, then the mapping will be removed from the Map.
Implementation
bool? optNullableBoolean(String name, {bool remove = false}) {
if (this?.containsKey(name) == false) {
return null;
}
bool boolean = optBoolean(name);
if (remove) {
this?.remove(name);
}
return boolean;
}