encoder method
The mapping method to encode value to a serializable value.
Implementation
@override
Object? encoder(T value, EncodingContext context) {
var previous = _container;
_container = context.container;
try {
return _encode(value, context);
} finally {
_container = previous;
}
}