asBool method
returns the value at path
as an bool.
If the value isn't an bool then an exception will be thrown.
If the key isn't a valid bool then defaultValue
is returned
Use validBool to determine if the key exists and is
a valid bool.
Implementation
bool asBool(String path, {bool defaultValue = true}) =>
validBool(path) ? valueMap[path] as bool : defaultValue;