I10n class

Main I10n class to incorporate text translations into a mobile app.

Constructors

I10n()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
message Object
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

Static Properties

appLocale Locale?
Return the preferred Locale
no setter
csvFile String?
no setter
kDefaultCSV String
final
locale Locale?
The current Locale object.
no setter
supportedLocales List<Locale>?
no setter

Static Methods

dispose() Future<bool>
getError() Exception?
getLocale(int index) Locale?
inError() bool
init({String? csv, Map<String, Map<String, String>>? map}) Future<bool?>
initAsync({String? csv, Map<String, Map<String, String>>? map}) Future<bool?>
load(Locale locale) Future<I10n>
Load the static Map object with the appropriate translations.
localeResolutionCallback(Locale? locale, Iterable<Locale>? supportedLocales) Locale?
of(Text? text, {Key? key, TextStyle? style, StrutStyle? strutStyle, TextAlign? textAlign, TextDirection? textDirection, Locale? locale, bool? softWrap, TextOverflow? overflow, double? textScaleFactor, int? maxLines, String? semanticsLabel, TextWidthBasis? textWidthBasis}) Text
Convert a Text object to one with a translation.
onSelectedItemChanged(int index) Future<void>
s(String? key) String
Translate the String
t(String? data, {Key? key, TextStyle? style, StrutStyle? strutStyle, TextAlign? textAlign, TextDirection? textDirection, Locale? locale, bool? softWrap, TextOverflow? overflow, double? textScaleFactor, int? maxLines, String? semanticsLabel, TextWidthBasis? textWidthBasis, TextHeightBehavior? textHeightBehavior}) Text
Supply a Text object for the translation.
toLocale(String? _locale) Locale?