NyLocalization class

Properties

delegates Iterable<LocalizationsDelegate>
Returns app delegates. used in app entry point e.g. MaterialApp()
no setter
hashCode int
The hash code for this object.
no setterinherited
languageCode String
Returns language code as string
no setter
locale Locale
Returns locale code as Locale
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

init({LocaleType? localeType = LocaleType.asDefined, String? languageCode, List<String> languagesList = const ['en'], String? assetsDirectory = 'lang/', Map<String, String>? valuesAsMap}) Future<void>
init NyLocalization
isDirectionRTL(BuildContext context) bool
isDirectionRTL(BuildContext context) returns true if active language direction is TRL
locals() Iterable<Locale>
Returns app locales. used in app entry point e.g. MaterialApp()
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
restart(BuildContext context) → dynamic
reloads the app
setLanguage(BuildContext context, {required String language, bool restart = true}) Future<void>
changes active language
setLocale({required Locale locale}) Future<void>
changes locale
toString() String
A string representation of this object.
inherited
translate(String key, [Map<String, String>? arguments]) String
translates a word

Operators

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

Static Properties

instance NyLocalization
final