toString method

  1. @override
String toString()
override

A string representation of this object.

Some classes have a default textual representation, often paired with a static parse function (like int.parse). These classes will provide the textual representation as their string representation.

Other classes have no meaningful textual representation that a program will care about. Such classes will typically override toString to provide useful information when inspecting the object, mainly for debugging or logging.

Implementation

@override
String toString() {
  final $buf = StringBuffer()..writeln('SourceTypeKlarna(');
  if (backgroundImageUrl != null) {
    $buf
      ..writeln()
      ..write('  background_image_url: ')
      ..write(backgroundImageUrl)
      ..write(',');
  }
  if (clientToken != null) {
    $buf
      ..writeln()
      ..write('  client_token: ')
      ..write(clientToken)
      ..write(',');
  }
  if (firstName != null) {
    $buf
      ..writeln()
      ..write('  first_name: ')
      ..write(firstName)
      ..write(',');
  }
  if (lastName != null) {
    $buf
      ..writeln()
      ..write('  last_name: ')
      ..write(lastName)
      ..write(',');
  }
  if (locale != null) {
    $buf
      ..writeln()
      ..write('  locale: ')
      ..write(locale)
      ..write(',');
  }
  if (logoUrl != null) {
    $buf
      ..writeln()
      ..write('  logo_url: ')
      ..write(logoUrl)
      ..write(',');
  }
  if (pageTitle != null) {
    $buf
      ..writeln()
      ..write('  page_title: ')
      ..write(pageTitle)
      ..write(',');
  }
  if (payLaterAssetUrlsDescriptive != null) {
    $buf
      ..writeln()
      ..write('  pay_later_asset_urls_descriptive: ')
      ..write(payLaterAssetUrlsDescriptive)
      ..write(',');
  }
  if (payLaterAssetUrlsStandard != null) {
    $buf
      ..writeln()
      ..write('  pay_later_asset_urls_standard: ')
      ..write(payLaterAssetUrlsStandard)
      ..write(',');
  }
  if (payLaterName != null) {
    $buf
      ..writeln()
      ..write('  pay_later_name: ')
      ..write(payLaterName)
      ..write(',');
  }
  if (payLaterRedirectUrl != null) {
    $buf
      ..writeln()
      ..write('  pay_later_redirect_url: ')
      ..write(payLaterRedirectUrl)
      ..write(',');
  }
  if (payNowAssetUrlsDescriptive != null) {
    $buf
      ..writeln()
      ..write('  pay_now_asset_urls_descriptive: ')
      ..write(payNowAssetUrlsDescriptive)
      ..write(',');
  }
  if (payNowAssetUrlsStandard != null) {
    $buf
      ..writeln()
      ..write('  pay_now_asset_urls_standard: ')
      ..write(payNowAssetUrlsStandard)
      ..write(',');
  }
  if (payNowName != null) {
    $buf
      ..writeln()
      ..write('  pay_now_name: ')
      ..write(payNowName)
      ..write(',');
  }
  if (payNowRedirectUrl != null) {
    $buf
      ..writeln()
      ..write('  pay_now_redirect_url: ')
      ..write(payNowRedirectUrl)
      ..write(',');
  }
  if (payOverTimeAssetUrlsDescriptive != null) {
    $buf
      ..writeln()
      ..write('  pay_over_time_asset_urls_descriptive: ')
      ..write(payOverTimeAssetUrlsDescriptive)
      ..write(',');
  }
  if (payOverTimeAssetUrlsStandard != null) {
    $buf
      ..writeln()
      ..write('  pay_over_time_asset_urls_standard: ')
      ..write(payOverTimeAssetUrlsStandard)
      ..write(',');
  }
  if (payOverTimeName != null) {
    $buf
      ..writeln()
      ..write('  pay_over_time_name: ')
      ..write(payOverTimeName)
      ..write(',');
  }
  if (payOverTimeRedirectUrl != null) {
    $buf
      ..writeln()
      ..write('  pay_over_time_redirect_url: ')
      ..write(payOverTimeRedirectUrl)
      ..write(',');
  }
  if (paymentMethodCategories != null) {
    $buf
      ..writeln()
      ..write('  payment_method_categories: ')
      ..write(paymentMethodCategories)
      ..write(',');
  }
  if (purchaseCountry != null) {
    $buf
      ..writeln()
      ..write('  purchase_country: ')
      ..write(purchaseCountry)
      ..write(',');
  }
  if (purchaseType != null) {
    $buf
      ..writeln()
      ..write('  purchase_type: ')
      ..write(purchaseType)
      ..write(',');
  }
  if (redirectUrl != null) {
    $buf
      ..writeln()
      ..write('  redirect_url: ')
      ..write(redirectUrl)
      ..write(',');
  }
  if (shippingDelay != null) {
    $buf
      ..writeln()
      ..write('  shipping_delay: ')
      ..write(shippingDelay)
      ..write(',');
  }
  if (shippingFirstName != null) {
    $buf
      ..writeln()
      ..write('  shipping_first_name: ')
      ..write(shippingFirstName)
      ..write(',');
  }
  if (shippingLastName != null) {
    $buf
      ..writeln()
      ..write('  shipping_last_name: ')
      ..write(shippingLastName)
      ..write(',');
  }
  $buf.write(')');
  return $buf.toString();
}