encode<V> static method

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

Implementation

static V encode<V>(
  AccountBranding instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.icon != null) {
    container.encodeString(
      'icon',
      instance.icon!,
    );
  }
  if (instance.logo != null) {
    container.encodeString(
      'logo',
      instance.logo!,
    );
  }
  if (instance.primaryColor != null) {
    container.encodeString(
      'primary_color',
      instance.primaryColor!,
    );
  }
  if (instance.secondaryColor != null) {
    container.encodeString(
      'secondary_color',
      instance.secondaryColor!,
    );
  }
  return container.value;
}