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('SubscriptionSchedule(');
  if (application != null) {
    $buf
      ..writeln()
      ..write('  application: ')
      ..write(application)
      ..write(',');
  }
  if (canceledAt != null) {
    $buf
      ..writeln()
      ..write('  canceled_at: ')
      ..write(canceledAt)
      ..write(',');
  }
  if (completedAt != null) {
    $buf
      ..writeln()
      ..write('  completed_at: ')
      ..write(completedAt)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  created: ')
    ..write(created)
    ..write(',');
  if (currentPhase != null) {
    $buf
      ..writeln()
      ..write('  current_phase: ')
      ..write(currentPhase)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  customer: ')
    ..write(customer)
    ..write(',');
  $buf
    ..writeln()
    ..write('  default_settings: ')
    ..write(defaultSettings)
    ..write(',');
  $buf
    ..writeln()
    ..write('  end_behavior: ')
    ..write(endBehavior)
    ..write(',');
  $buf
    ..writeln()
    ..write('  id: ')
    ..write(id)
    ..write(',');
  $buf
    ..writeln()
    ..write('  livemode: ')
    ..write(livemode)
    ..write(',');
  if (metadata != null) {
    $buf
      ..writeln()
      ..write('  metadata: ')
      ..write(metadata)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  object: ')
    ..write(object)
    ..write(',');
  $buf
    ..writeln()
    ..write('  phases: ')
    ..write(phases)
    ..write(',');
  if (releasedAt != null) {
    $buf
      ..writeln()
      ..write('  released_at: ')
      ..write(releasedAt)
      ..write(',');
  }
  if (releasedSubscription != null) {
    $buf
      ..writeln()
      ..write('  released_subscription: ')
      ..write(releasedSubscription)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  status: ')
    ..write(status)
    ..write(',');
  if (subscription != null) {
    $buf
      ..writeln()
      ..write('  subscription: ')
      ..write(subscription)
      ..write(',');
  }
  if (testClock != null) {
    $buf
      ..writeln()
      ..write('  test_clock: ')
      ..write(testClock)
      ..write(',');
  }
  $buf.write(')');
  return $buf.toString();
}