systemFontsDidChange method

  1. @protected
  2. @mustCallSuper
void systemFontsDidChange()

A callback that is called when system fonts have changed.

The framework defers the invocation of the callback to the SchedulerPhase.transientCallbacks phase to ensure that the RenderObject's text layout is still valid when user interactions are in progress (which usually take place during the SchedulerPhase.idle phase).

By default, markNeedsLayout is called on the RenderObject implementing this mixin.

Subclass should override this method to clear any extra cache that depend on font-related metrics.

Implementation

@protected
@mustCallSuper
void systemFontsDidChange() {
  markNeedsLayout();
}