didChangeTextScaleFactor method

void didChangeTextScaleFactor()

Called when the platform's text scale factor changes.

Implementation

// To override WidgetsBindingObserver.didChangeTextScaleFactor()
void didChangeTextScaleFactor() {
  /// Called when the platform's text scale factor changes.
  ///
  /// This typically happens as the result of the user changing system
  /// preferences, and it should affect all of the text sizes in the
  /// application.
  ///
  /// This method exposes notifications from [Window.onTextScaleFactorChanged].
  /// See sample code below. No need to call super if you override.
  ///   @override
  ///   void didChangeTextScaleFactor() {
  ///     setState(() { _lastTextScaleFactor = ui.window.textScaleFactor; });
  ///   }
  // Record the triggered event
  assert(() {
    if (_debugPrintEvents) {
      debugPrint(
          '$_consoleLeadingLine didChangeTextScaleFactor() in $_consoleClassName');
    }
    return true;
  }());
}