decodeBool method
Decodes the data for the given key or id as a boolean value.
Implementation
@override
bool decodeBool(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"]',
);
}
}