GlobalWidgetsLocalizations constructor Null safety

GlobalWidgetsLocalizations(
  1. Locale locale
)

Construct an object that defines the localized values for the widgets library for the given locale.

LocalizationsDelegate implementations typically call the static load function, rather than constructing this class directly.

Implementation

GlobalWidgetsLocalizations(this.locale) {
  final String language = locale.languageCode.toLowerCase();
  _textDirection = _rtlLanguages.contains(language) ? TextDirection.rtl : TextDirection.ltr;
}