encode<V> static method

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

Implementation

static V encode<V>(
  SessionNumeric instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.maximumLength != null) {
    container.encodeInt(
      'maximum_length',
      instance.maximumLength!,
    );
  }
  if (instance.minimumLength != null) {
    container.encodeInt(
      'minimum_length',
      instance.minimumLength!,
    );
  }
  return container.value;
}