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.

Implementation

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

Implementation

set textScaler(TextScaler value) {
  if (value == _textScaler) {
    return;
  }
  _textScaler = value;
  markNeedsLayout();
  _layoutTemplate?.dispose();
  _layoutTemplate = null;
}