locale property

  1. @override
Locale? locale
override

The locale used to select region-specific glyphs.

This property is rarely set. Typically the locale used to select region-specific glyphs is defined by the text widget's BuildContext using Localizations.localeOf(context). For example RichText defines its locale this way. However, a rich text widget's TextSpans could specify text styles with different explicit locales in order to select different region-specific glyphs for each text span.

Implementation

@override
Locale? get locale => textStyle.locale;