encode<V> static method
Implementation
static V encode<V>(
CustomUnitAmount instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.maximum != null) {
container.encodeInt(
'maximum',
instance.maximum!,
);
}
if (instance.minimum != null) {
container.encodeInt(
'minimum',
instance.minimum!,
);
}
if (instance.preset != null) {
container.encodeInt(
'preset',
instance.preset!,
);
}
return container.value;
}