Language class

A language with its ISO 639-1 code, English name and native name.

The built-in languages are available as static const fields of Languages, and all of them as Languages.defaultLanguages.

Constructors

Language(String isoCode, String name, [String? nativeName])
Creates a language.
const
Language.fromIsoCode(String isoCode)
Finds a language in Languages.defaultLanguages by its code.
factory
Language.fromMap(Map<String, String> map)
Creates a Language from a map.

Properties

hashCode int
The hash code for this object.
no setteroverride
isoCode String
ISO 639-1 code. e.g. 'ko'
final
name String
English name. e.g. 'Korean'
final
nativeName String
Name written in the language itself. e.g. '한국어'
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
Whether other is a language with the same isoCode, ignoring case.
override