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('IssuingCardCreateOptions(');
  if (cardholder != null) {
    $buf
      ..writeln()
      ..write('  cardholder: ')
      ..write(cardholder)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  currency: ')
    ..write(currency)
    ..write(',');
  if (expand != null) {
    $buf
      ..writeln()
      ..write('  expand: ')
      ..write(expand)
      ..write(',');
  }
  if (financialAccount != null) {
    $buf
      ..writeln()
      ..write('  financial_account: ')
      ..write(financialAccount)
      ..write(',');
  }
  if (metadata != null) {
    $buf
      ..writeln()
      ..write('  metadata: ')
      ..write(metadata)
      ..write(',');
  }
  if (personalizationDesign != null) {
    $buf
      ..writeln()
      ..write('  personalization_design: ')
      ..write(personalizationDesign)
      ..write(',');
  }
  if (pin != null) {
    $buf
      ..writeln()
      ..write('  pin: ')
      ..write(pin)
      ..write(',');
  }
  if (replacementFor != null) {
    $buf
      ..writeln()
      ..write('  replacement_for: ')
      ..write(replacementFor)
      ..write(',');
  }
  if (replacementReason != null) {
    $buf
      ..writeln()
      ..write('  replacement_reason: ')
      ..write(replacementReason)
      ..write(',');
  }
  if (secondLine != null) {
    $buf
      ..writeln()
      ..write('  second_line: ')
      ..write(secondLine)
      ..write(',');
  }
  if (shipping != null) {
    $buf
      ..writeln()
      ..write('  shipping: ')
      ..write(shipping)
      ..write(',');
  }
  if (spendingControls != null) {
    $buf
      ..writeln()
      ..write('  spending_controls: ')
      ..write(spendingControls)
      ..write(',');
  }
  if (status != null) {
    $buf
      ..writeln()
      ..write('  status: ')
      ..write(status)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  type: ')
    ..write(type)
    ..write(',');
  $buf.write(')');
  return $buf.toString();
}