Translations class abstract

The base abstract class used for providing localized translations to the app.

Extend this class to define the key-value dictionary of strings per language. Then pass the subclass instance to translations in GetMaterialApp or GetCupertinoApp.

Example:

class MyTranslations extends Translations {
  @override
  Map<String, Map<String, String>> get keys => {
    'en_US': {'hello': 'Hello World'},
    'pt_BR': {'hello': 'Olá Mundo'}
  };
}

Constructors

Translations()

Properties

hashCode int
The hash code for this object.
no setterinherited
keys Map<String, Map<String, String>>
Defines the localization dictionary.
no setter
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.
inherited

Operators

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