encode<V> static method

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

Implementation

static V encode<V>(
  RadarReviewResourceSession instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.browser != null) {
    container.encodeString(
      'browser',
      instance.browser!,
    );
  }
  if (instance.device != null) {
    container.encodeString(
      'device',
      instance.device!,
    );
  }
  if (instance.platform != null) {
    container.encodeString(
      'platform',
      instance.platform!,
    );
  }
  if (instance.version != null) {
    container.encodeString(
      'version',
      instance.version!,
    );
  }
  return container.value;
}