encode method
Implementation
dynamic encode(T value, EncodingContext context) {
var options = context.options;
if (data != null) {
options = options?.copyWith(data: data) ?? EncodingOptions(data: data);
}
if (arg == null) {
return context.$enc<V>(get(value), name, options, hook);
} else {
return context.callWith(
arg!,
<U>() => context.$enc<U>(get(value), name, options, hook),
);
}
}