NyLocalization class Null safety

Properties

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

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 non-existent 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