encode<V> static method

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

Implementation

static V encode<V>(
  Error instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  ApiErrors.encode(
    instance.error,
    container.nestedSingleValueContainer('error').encoder,
  );
  return container.value;
}