decodeBoolOrNull method
Decodes the data for the given key or id as a nullable boolean value.
Implementation
@override
bool? decodeBoolOrNull(String key, {int? id}) {
try {
return _value[key] as bool?;
} on TypeError {
throw CodableException.wrap(
CodableException.unexpectedType(expected: 'bool?', actual: '${_value[key].runtimeType}', data: _value[key]),
method: 'decode',
hint: '["$key"]',
);
}
}