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