CountryName class final

A class that represents the name of a country in a particular language.

The CountryName class is a simple value object that represents the name of a country in a particular language. It consists of a NaturalLanguage object that represents the language, and two String values that represent the official and common names of the country. The official and common fields must not be empty.

Example usage:

final countryName = CountryName(
  language: LangSlk(),
  official: "Slovenská republika",
  common: "Slovensko",
);
print(countryName.official); // Prints: "Slovenská republika"
print(countryName.common); // Prints: "Slovensko"
Inheritance
Available extensions

Constructors

CountryName({required NaturalLanguage language, required String official, required String common})
Creates a new CountryName object with the given language and name values.
const

Properties

countryCode String?
The region subtag for the locale.
finalinherited
fullName String?
Represents the full/official translation.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
language NaturalLanguage
The NaturalLanguage representing the language of the locale.
finalinherited
name String
Represents the short/common translation.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
script Script?
The optional script information of type Script.
finalinherited

Methods

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
toString({bool short = true}) String
A string representation of this object.
override

Operators

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