toString method

  1. @override
String toString ()

Returns a string representing the locale.

This identifier happens to be a valid Unicode Locale Identifier using underscores as separator, however it is intended to be used for debugging purposes only. For parseable results, use toLanguageTag instead.

Implementation

@override
String toString() {
  if (!identical(_cachedLocale, this)) {
    _cachedLocale = this;
    _cachedLocaleString = _rawToString('_');
  }
  return _cachedLocaleString;
}