toString method

  1. @override
  2. @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
@override
String toString() {
  return 'User('
      'username: $username, '
      'name: $name, '
      'birthday: $birthday, '
      'avatar: $avatar, '
      'ranking: $ranking, '
      'reputation: $reputation, '
      'gitHub: $gitHub, '
      'twitter: $twitter, '
      'linkedIN: $linkedIN, '
      'websites: $websites, '
      'country: $country, '
      'company: $company, '
      'school: $school, '
      'skillTags: $skillTags, '
      'about: $about, '
      'starRating: $starRating, '
      'contributionsPoints: $contributionsPoints, '
      'contributionsQuestionCount: $contributionsQuestionCount, '
      'contributionsTestcaseCount: $contributionsTestcaseCount'
      ')';
}