encode<V> static method

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

Implementation

static V encode<V>(
  ConfigurationBusinessProfile instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.headline != null) {
    container.encodeString(
      'headline',
      instance.headline!,
    );
  }
  if (instance.privacyPolicyUrl != null) {
    container.encodeString(
      'privacy_policy_url',
      instance.privacyPolicyUrl!,
    );
  }
  if (instance.termsOfServiceUrl != null) {
    container.encodeString(
      'terms_of_service_url',
      instance.termsOfServiceUrl!,
    );
  }
  return container.value;
}