GlobalWidgetsLocalizations class Null safety

Localized values for widgets.

Currently this class just maps locale to textDirection. All locales are TextDirection.ltr except for locales with the following Locale.languageCode values, which are TextDirection.rtl:

  • ar - Arabic
  • fa - Farsi
  • he - Hebrew
  • ps - Pashto
  • sd - Sindhi
  • ur - Urdu
Implemented types


GlobalWidgetsLocalizations(Locale locale)
Construct an object that defines the localized values for the widgets library for the given locale.


hashCode int
The hash code for this object.
read-only, inherited
locale Locale
The locale for which the values of this class's localized resources have been translated.
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
textDirection TextDirection
The reading direction for text in this locale.
read-only, override


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
toString() String
A string representation of this object.


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

Static Methods

load(Locale locale) Future<WidgetsLocalizations>
Creates an object that provides localized resource values for the lowest levels of the Flutter framework.


delegate → const LocalizationsDelegate<WidgetsLocalizations>
A LocalizationsDelegate that uses GlobalWidgetsLocalizations.load to create an instance of this class.