TranslatedName class

A class representing a translated name of an ISO object.

This class implements the Named interface and the JsonEncodable interface. The language property represents the natural language of the translation. The name property represents the short/common translation. The fullName property represents the full/official translation. The countryCode property represents the regional code, that might be used for regional differences in the language translation.

Inheritance
Implemented types
Available extensions

Constructors

TranslatedName(NaturalLanguage language, {required String name, String? fullName, String? countryCode, Script? script})
Creates a new TranslatedName instance with the given language, name and optional full name and country code.
const

Properties

asBasicLocale BasicLocale

Available on TranslatedName, provided by the TranslatedNameExtension extension

Returns a BasicLocale object from this TranslatedName that represent locale of translation.
no setter
common String

Available on TranslatedName, provided by the TranslatedNameExtension extension

Just an alias for the name property.
no setter
countryCode String?
The region subtag for the locale.
no setterinherited
fullName String?
Represents the full/official translation.
final
hashCode int
The hash code for this object.
no setteroverride
hasNoCountry bool

Available on BasicLocale, provided by the BasicLocaleExtension extension

Returns true if the locale has no country code specified.
no setter
hasNoScript bool

Available on BasicLocale, provided by the BasicLocaleExtension extension

Returns true if the locale has no script specified.
no setter
hasOnlyLanguage bool

Available on BasicLocale, provided by the BasicLocaleExtension extension

Returns true if the locale has only language specified.
no setter
language NaturalLanguage
The NaturalLanguage representing the language of the locale.
finalinherited
name String
Represents the short/common translation.
final
regionalCode String?

Available on BasicLocale, provided by the BasicLocaleExtension extension

An alias for the countryCode. Returns regional/country code of the locale.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
script Script?
The optional script information of type Script.
finalinherited

Methods

copyWith({String? countryCode, NaturalLanguage? language, Script? script}) BasicLocale

Available on BasicLocale, provided by the BasicLocaleExtension extension

Creates a copy of this object with the given fields replaced with the new values. If the new values are null, the field is left unchanged. Otherwise, the field is replaced with the new value.
copyWith({String? countryCode, String? fullName, NaturalLanguage? language, String? name, Script? script}) TranslatedName

Available on TranslatedName, provided by the TranslatedNameExtension extension

Creates a copy of this object with the given fields replaced with the new values. If the new values are null, the field is left unchanged. Otherwise, the field is replaced with the new value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson({JsonCodec codec = const JsonCodec()}) String
Returns a JSON-encoded string representation of the object.
override
toMap() Map<String, String?>

Available on BasicLocale, provided by the BasicLocaleExtension extension

Converts this object object to a JSON like map.
toMap() Map<String, String?>

Available on TranslatedName, provided by the TranslatedNameExtension extension

Converts this object object to a JSON like map.
toString({bool short = true}) String
A string representation of this object.
override
toTranslatedName(String name, {String? fullName}) TranslatedName

Available on BasicLocale, provided by the BasicLocaleExtension extension

Creates a TranslatedName instance from this locale with the provided name.
toUnicodeLocaleId({String separator = "_"}) String

Available on BasicLocale, provided by the BasicLocaleExtension extension

Returns a string representing the locale.

Operators

operator ==(Object other) bool
The equality operator.
override