encode<V> static method

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

Implementation

static V encode<V>(
  PackageDimensions instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeDouble(
    'height',
    instance.height,
  );
  container.encodeDouble(
    'length',
    instance.length,
  );
  container.encodeDouble(
    'weight',
    instance.weight,
  );
  container.encodeDouble(
    'width',
    instance.width,
  );
  return container.value;
}