encode method
Implementation
@override
Object? encode(T value, EncodingContext context) {
return InterfaceMapperBase.encodeFields(
value,
fields.values,
ignoreNull,
context.change(args: () => apply(context)),
context.options?.shallow ?? false,
);
}