encode<V> static method

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

Implementation

static V encode<V>(
  SessionRecovery instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.allowPromotionCodes != null) {
    container.encodeBool(
      'allow_promotion_codes',
      instance.allowPromotionCodes!,
    );
  }
  container.encodeBool(
    'enabled',
    instance.enabled,
  );
  return container.value;
}