textScaler property

TextScaler textScaler

The font scaling strategy to use when laying out and rendering the text.

The value usually comes from MediaQuery.textScalerOf, which typically reflects the user-specified text scaling value in the platform's accessibility settings. The TextStyle.fontSize of the text will be adjusted by the TextScaler before the text is laid out and rendered.

The layout method must be called after textScaler changes as it affects the text layout.


TextScaler get textScaler => _textScaler;
void textScaler=(TextScaler value)


set textScaler(TextScaler value) {
  if (value == _textScaler) {
  _textScaler = value;
  _layoutTemplate = null;