handleTextScaleFactorChanged method

  1. @override
void handleTextScaleFactorChanged()
override

Called when the platform text scale factor changes.

See dart:ui.PlatformDispatcher.onTextScaleFactorChanged.

Implementation

@override
void handleTextScaleFactorChanged() {
  super.handleTextScaleFactorChanged();
  for (final observer in List<WidgetsBindingObserver>.of(_observers)) {
    try {
      observer.didChangeTextScaleFactor();
    } catch (exception, stack) {
      FlutterError.reportError(
        FlutterErrorDetails(
          exception: exception,
          stack: stack,
          library: 'widgets library',
          context: ErrorDescription(
            'while dispatching notifications for WidgetsBindingObserver.didChangeTextScaleFactor',
          ),
        ),
      );
    }
  }
}