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('SetupAttempt(');
  if (application != null) {
    $buf
      ..writeln()
      ..write('  application: ')
      ..write(application)
      ..write(',');
  }
  if (attachToSelf != null) {
    $buf
      ..writeln()
      ..write('  attach_to_self: ')
      ..write(attachToSelf)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  created: ')
    ..write(created)
    ..write(',');
  if (customer != null) {
    $buf
      ..writeln()
      ..write('  customer: ')
      ..write(customer)
      ..write(',');
  }
  if (flowDirections != null) {
    $buf
      ..writeln()
      ..write('  flow_directions: ')
      ..write(flowDirections)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  id: ')
    ..write(id)
    ..write(',');
  $buf
    ..writeln()
    ..write('  livemode: ')
    ..write(livemode)
    ..write(',');
  $buf
    ..writeln()
    ..write('  object: ')
    ..write(object)
    ..write(',');
  if (onBehalfOf != null) {
    $buf
      ..writeln()
      ..write('  on_behalf_of: ')
      ..write(onBehalfOf)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  payment_method: ')
    ..write(paymentMethod)
    ..write(',');
  $buf
    ..writeln()
    ..write('  payment_method_details: ')
    ..write(paymentMethodDetails)
    ..write(',');
  if (setupError != null) {
    $buf
      ..writeln()
      ..write('  setup_error: ')
      ..write(setupError)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  setup_intent: ')
    ..write(setupIntent)
    ..write(',');
  $buf
    ..writeln()
    ..write('  status: ')
    ..write(status)
    ..write(',');
  $buf
    ..writeln()
    ..write('  usage: ')
    ..write(usage)
    ..write(',');
  $buf.write(')');
  return $buf.toString();
}