toString method

  1. @override
String toString({
  1. bool short = true,
})
override

Returns a string representation of this NaturalLanguage object.

The optional short parameter specifies whether to use a short format (defaults to true). If short is true, this method returns the same string as the Language.toString method. If short is false, this method returns a string that includes additional information about the language, such as its ISO codes, native names, and family.

Implementation

@override
String toString({bool short = true}) => short
    ? super.toString()
    : 'NaturalLanguage(name: "$name", code: "$code", '
          'codeShort: "$codeShort", namesNative: ${jsonEncode(namesNative)}, '
          '''${bibliographicCode == null ? '' : 'bibliographicCode: "$bibliographicCode", '}'''
          "family: const ${family.runtimeType}(), "
          "isRightToLeft: $isRightToLeft, "
          "scripts: const ${scripts.toUniqueInstancesString()},)";