didChangeAccessibilityFeatures method

  1. @protected
  2. @override
  3. @mustCallSuper
void didChangeAccessibilityFeatures()
inherited

Called when the system changes the set of currently active accessibility features.

Implementation

@protected
@override
@mustCallSuper
void didChangeAccessibilityFeatures() {
  // A triggered system event
  _hadSystemEvent = true;

  // Don't if the State object is defunct.
  if (!mounted) {
    return;
  }

  ///
  /// This method exposes notifications from [Window.onAccessibilityFeaturesChanged].

  /// No 'setState()' functions are allowed to fully function at this point.
  _setStateAllowed = false;

  for (final con in controllerList) {
    con.didChangeAccessibilityFeatures();
  }

  _setStateAllowed = true;

  if (_setStateRequested) {
    _setStateRequested = false;
    // Only the latest State is rebuilt
    if (isEndState) {
      /// Perform a 'rebuild' if requested.
      setState(() {});
    }
  }
}