TranslationService class

Translation Service

This service provides translation text.

Properties

defaultLocale String
getter/setter pair
fallbackLocale String
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
locale String?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useKeyAsDefaultText bool
getter/setter pair

Methods

getLocale() String
Get the current locale
init({bool deviceLocale = true, String defaultLocale = 'en', String fallbackLocale = 'en', bool useKeyAsDefaultText = false}) → dynamic
initialize the translation service
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set({required String key, required String locale, required dynamic value}) → dynamic
Set translation text
setDeviceLocale() Future
setLocale(String locale) → dynamic
toString() String
A string representation of this object.
inherited
tr(String key, {Map<String, dynamic>? args, int? form}) → dynamic

Operators

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

Static Properties

instance TranslationService
no setter