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('PlanCreateOptions(');
  if (active != null) {
    $buf
      ..writeln()
      ..write('  active: ')
      ..write(active)
      ..write(',');
  }
  if (aggregateUsage != null) {
    $buf
      ..writeln()
      ..write('  aggregate_usage: ')
      ..write(aggregateUsage)
      ..write(',');
  }
  if (amount != null) {
    $buf
      ..writeln()
      ..write('  amount: ')
      ..write(amount)
      ..write(',');
  }
  if (amountDecimal != null) {
    $buf
      ..writeln()
      ..write('  amount_decimal: ')
      ..write(amountDecimal)
      ..write(',');
  }
  if (billingScheme != null) {
    $buf
      ..writeln()
      ..write('  billing_scheme: ')
      ..write(billingScheme)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  currency: ')
    ..write(currency)
    ..write(',');
  if (expand != null) {
    $buf
      ..writeln()
      ..write('  expand: ')
      ..write(expand)
      ..write(',');
  }
  if (id != null) {
    $buf
      ..writeln()
      ..write('  id: ')
      ..write(id)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  interval: ')
    ..write(interval)
    ..write(',');
  if (intervalCount != null) {
    $buf
      ..writeln()
      ..write('  interval_count: ')
      ..write(intervalCount)
      ..write(',');
  }
  if (metadata != null) {
    $buf
      ..writeln()
      ..write('  metadata: ')
      ..write(metadata)
      ..write(',');
  }
  if (meter != null) {
    $buf
      ..writeln()
      ..write('  meter: ')
      ..write(meter)
      ..write(',');
  }
  if (nickname != null) {
    $buf
      ..writeln()
      ..write('  nickname: ')
      ..write(nickname)
      ..write(',');
  }
  if (product != null) {
    $buf
      ..writeln()
      ..write('  product: ')
      ..write(product)
      ..write(',');
  }
  if (tiers != null) {
    $buf
      ..writeln()
      ..write('  tiers: ')
      ..write(tiers)
      ..write(',');
  }
  if (tiersMode != null) {
    $buf
      ..writeln()
      ..write('  tiers_mode: ')
      ..write(tiersMode)
      ..write(',');
  }
  if (transformUsage != null) {
    $buf
      ..writeln()
      ..write('  transform_usage: ')
      ..write(transformUsage)
      ..write(',');
  }
  if (trialPeriodDays != null) {
    $buf
      ..writeln()
      ..write('  trial_period_days: ')
      ..write(trialPeriodDays)
      ..write(',');
  }
  if (usageType != null) {
    $buf
      ..writeln()
      ..write('  usage_type: ')
      ..write(usageType)
      ..write(',');
  }
  $buf.write(')');
  return $buf.toString();
}