encode<V> static method

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

Implementation

static V encode<V>(
  SourceRedirectFlow instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.failureReason != null) {
    container.encodeString(
      'failure_reason',
      instance.failureReason!,
    );
  }
  container.encodeString(
    'return_url',
    instance.returnUrl,
  );
  container.encodeString(
    'status',
    instance.status,
  );
  container.encodeString(
    'url',
    instance.url,
  );
  return container.value;
}