toString method

  1. @override
String toString()
override

Returns a human-readable string for this instance.

The returned string is constructed for the time zone of this instance. The toString() method provides a simply formatted string. It does not support internationalized strings. Use the intl package at the pub shared packages repo.

The resulting string can be parsed back using parse.

Implementation

@override
String toString() =>
    "${_fourDigits(year)}-${_twoDigits(month)}-${_twoDigits(day)}";