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('Person(');
  if (account != null) {
    $buf
      ..writeln()
      ..write('  account: ')
      ..write(account)
      ..write(',');
  }
  if (additionalTosAcceptances != null) {
    $buf
      ..writeln()
      ..write('  additional_tos_acceptances: ')
      ..write(additionalTosAcceptances)
      ..write(',');
  }
  if (address != null) {
    $buf
      ..writeln()
      ..write('  address: ')
      ..write(address)
      ..write(',');
  }
  if (addressKana != null) {
    $buf
      ..writeln()
      ..write('  address_kana: ')
      ..write(addressKana)
      ..write(',');
  }
  if (addressKanji != null) {
    $buf
      ..writeln()
      ..write('  address_kanji: ')
      ..write(addressKanji)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  created: ')
    ..write(created)
    ..write(',');
  if (dob != null) {
    $buf
      ..writeln()
      ..write('  dob: ')
      ..write(dob)
      ..write(',');
  }
  if (email != null) {
    $buf
      ..writeln()
      ..write('  email: ')
      ..write(email)
      ..write(',');
  }
  if (firstName != null) {
    $buf
      ..writeln()
      ..write('  first_name: ')
      ..write(firstName)
      ..write(',');
  }
  if (firstNameKana != null) {
    $buf
      ..writeln()
      ..write('  first_name_kana: ')
      ..write(firstNameKana)
      ..write(',');
  }
  if (firstNameKanji != null) {
    $buf
      ..writeln()
      ..write('  first_name_kanji: ')
      ..write(firstNameKanji)
      ..write(',');
  }
  if (fullNameAliases != null) {
    $buf
      ..writeln()
      ..write('  full_name_aliases: ')
      ..write(fullNameAliases)
      ..write(',');
  }
  if (futureRequirements != null) {
    $buf
      ..writeln()
      ..write('  future_requirements: ')
      ..write(futureRequirements)
      ..write(',');
  }
  if (gender != null) {
    $buf
      ..writeln()
      ..write('  gender: ')
      ..write(gender)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  id: ')
    ..write(id)
    ..write(',');
  if (idNumberProvided != null) {
    $buf
      ..writeln()
      ..write('  id_number_provided: ')
      ..write(idNumberProvided)
      ..write(',');
  }
  if (idNumberSecondaryProvided != null) {
    $buf
      ..writeln()
      ..write('  id_number_secondary_provided: ')
      ..write(idNumberSecondaryProvided)
      ..write(',');
  }
  if (lastName != null) {
    $buf
      ..writeln()
      ..write('  last_name: ')
      ..write(lastName)
      ..write(',');
  }
  if (lastNameKana != null) {
    $buf
      ..writeln()
      ..write('  last_name_kana: ')
      ..write(lastNameKana)
      ..write(',');
  }
  if (lastNameKanji != null) {
    $buf
      ..writeln()
      ..write('  last_name_kanji: ')
      ..write(lastNameKanji)
      ..write(',');
  }
  if (maidenName != null) {
    $buf
      ..writeln()
      ..write('  maiden_name: ')
      ..write(maidenName)
      ..write(',');
  }
  if (metadata != null) {
    $buf
      ..writeln()
      ..write('  metadata: ')
      ..write(metadata)
      ..write(',');
  }
  if (nationality != null) {
    $buf
      ..writeln()
      ..write('  nationality: ')
      ..write(nationality)
      ..write(',');
  }
  $buf
    ..writeln()
    ..write('  object: ')
    ..write(object)
    ..write(',');
  if (phone != null) {
    $buf
      ..writeln()
      ..write('  phone: ')
      ..write(phone)
      ..write(',');
  }
  if (politicalExposure != null) {
    $buf
      ..writeln()
      ..write('  political_exposure: ')
      ..write(politicalExposure)
      ..write(',');
  }
  if (registeredAddress != null) {
    $buf
      ..writeln()
      ..write('  registered_address: ')
      ..write(registeredAddress)
      ..write(',');
  }
  if (relationship != null) {
    $buf
      ..writeln()
      ..write('  relationship: ')
      ..write(relationship)
      ..write(',');
  }
  if (requirements != null) {
    $buf
      ..writeln()
      ..write('  requirements: ')
      ..write(requirements)
      ..write(',');
  }
  if (ssnLast4Provided != null) {
    $buf
      ..writeln()
      ..write('  ssn_last_4_provided: ')
      ..write(ssnLast4Provided)
      ..write(',');
  }
  if (verification != null) {
    $buf
      ..writeln()
      ..write('  verification: ')
      ..write(verification)
      ..write(',');
  }
  $buf.write(')');
  return $buf.toString();
}