encode<V> static method

V encode<V>(
  1. InvoiceId instance,
  2. Encoder<V> encoder
)
override

Implementation

static V encode<V>(
  InvoiceId instance,
  Encoder<V> encoder,
) {
  final container = encoder.singleValueContainer();
  instance.id == null
      ? container.encodeNull()
      : container.encodeString(instance.id!);
  return container.value;
}