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('Card(');
  if (account != null) {
    $buf
      ..writeln()
      ..write('  account: ')
      ..write(account)
      ..write(',');
  }
  if (addressCity != null) {
    $buf
      ..writeln()
      ..write('  address_city: ')
      ..write(addressCity)
      ..write(',');
  }
  if (addressCountry != null) {
    $buf
      ..writeln()
      ..write('  address_country: ')
      ..write(addressCountry)
      ..write(',');
  }
  if (addressLine1 != null) {
    $buf
      ..writeln()
      ..write('  address_line1: ')
      ..write(addressLine1)
      ..write(',');
  }
  if (addressLine1Check != null) {
    $buf
      ..writeln()
      ..write('  address_line1_check: ')
      ..write(addressLine1Check)
      ..write(',');
  }
  if (addressLine2 != null) {
    $buf
      ..writeln()
      ..write('  address_line2: ')
      ..write(addressLine2)
      ..write(',');
  }
  if (addressState != null) {
    $buf
      ..writeln()
      ..write('  address_state: ')
      ..write(addressState)
      ..write(',');
  }
  if (addressZip != null) {
    $buf
      ..writeln()
      ..write('  address_zip: ')
      ..write(addressZip)
      ..write(',');
  }
  if (addressZipCheck != null) {
    $buf
      ..writeln()
      ..write('  address_zip_check: ')
      ..write(addressZipCheck)
      ..write(',');
  }
  if (availablePayoutMethods != null) {
    $buf
      ..writeln()
      ..write('  available_payout_methods: ')
      ..write(availablePayoutMethods)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  brand: ')
    ..write(brand)
    ..write(',');
  if (country != null) {
    $buf
      ..writeln()
      ..write('  country: ')
      ..write(country)
      ..write(',');
  }
  if (currency != null) {
    $buf
      ..writeln()
      ..write('  currency: ')
      ..write(currency)
      ..write(',');
  }
  if (customer != null) {
    $buf
      ..writeln()
      ..write('  customer: ')
      ..write(customer)
      ..write(',');
  }
  if (cvcCheck != null) {
    $buf
      ..writeln()
      ..write('  cvc_check: ')
      ..write(cvcCheck)
      ..write(',');
  }
  if (defaultForCurrency != null) {
    $buf
      ..writeln()
      ..write('  default_for_currency: ')
      ..write(defaultForCurrency)
      ..write(',');
  }
  if (description != null) {
    $buf
      ..writeln()
      ..write('  description: ')
      ..write(description)
      ..write(',');
  }
  if (dynamicLast4 != null) {
    $buf
      ..writeln()
      ..write('  dynamic_last4: ')
      ..write(dynamicLast4)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  exp_month: ')
    ..write(expMonth)
    ..write(',');
  $buf
    ..writeln()
    ..write('  exp_year: ')
    ..write(expYear)
    ..write(',');
  if (fingerprint != null) {
    $buf
      ..writeln()
      ..write('  fingerprint: ')
      ..write(fingerprint)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  funding: ')
    ..write(funding)
    ..write(',');
  $buf
    ..writeln()
    ..write('  id: ')
    ..write(id)
    ..write(',');
  if (iin != null) {
    $buf
      ..writeln()
      ..write('  iin: ')
      ..write(iin)
      ..write(',');
  }
  if (issuer != null) {
    $buf
      ..writeln()
      ..write('  issuer: ')
      ..write(issuer)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  last4: ')
    ..write(last4)
    ..write(',');
  if (metadata != null) {
    $buf
      ..writeln()
      ..write('  metadata: ')
      ..write(metadata)
      ..write(',');
  }
  if (name != null) {
    $buf
      ..writeln()
      ..write('  name: ')
      ..write(name)
      ..write(',');
  }
  if (networks != null) {
    $buf
      ..writeln()
      ..write('  networks: ')
      ..write(networks)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  object: ')
    ..write(object)
    ..write(',');
  if (status != null) {
    $buf
      ..writeln()
      ..write('  status: ')
      ..write(status)
      ..write(',');
  }
  if (tokenizationMethod != null) {
    $buf
      ..writeln()
      ..write('  tokenization_method: ')
      ..write(tokenizationMethod)
      ..write(',');
  }
  $buf.write(')');
  return $buf.toString();
}