decodeObjectOrNull<T> method
Decodes the data for the given key or id as a nullable object of type T
.
When the data is not null, this behaves like decodeObject.
Implementation
@override
T? decodeObjectOrNull<T>(String key, {int? id, Decodable<T>? using}) {
final v = _value[key];
if (v == null) return null;
try {
return _decode(v, using);
} catch (e, st) {
Error.throwWithStackTrace(CodableException.wrap(e, method: 'decode', hint: '["$key"]'), st);
}
}