encoder method
The mapping method to encode value
to a serializable value.
Implementation
@override
Object? encoder(T value, EncodingContext context) {
if (superHook != null) {
var result = superHook!.beforeEncode(value);
if (result is! T) {
return superHook!.afterEncode(result);
}
value = result;
}
var result = super.encoder(value, context);
if (superHook != null) {
result = superHook!.afterEncode(result);
}
return result;
}