highlightStrategy property

FocusHighlightStrategy highlightStrategy

Sets the strategy by which highlightMode is determined.

If set to FocusHighlightStrategy.automatic, then the highlight mode will change depending upon the interaction mode used last. For instance, if the last interaction was a touch interaction, then highlightMode will return FocusHighlightMode.touch, and focus highlights will only appear on widgets that bring up a soft keyboard. If the last interaction was a non-touch interaction (hardware keyboard press, mouse click, etc.), then highlightMode will return FocusHighlightMode.traditional, and focus highlights will appear on all widgets.

If set to FocusHighlightStrategy.alwaysTouch or FocusHighlightStrategy.alwaysTraditional, then highlightMode will always return FocusHighlightMode.touch or FocusHighlightMode.traditional, respectively, regardless of the last UI interaction type.

The initial value of highlightMode depends upon the value of defaultTargetPlatform and MouseTracker.mouseIsConnected of RendererBinding.mouseTracker, making a guess about which interaction is most appropriate for the initial interaction mode.

Defaults to FocusHighlightStrategy.automatic.

Implementation

FocusHighlightStrategy get highlightStrategy => _highlightManager.strategy;
void highlightStrategy=(FocusHighlightStrategy value)

Implementation

set highlightStrategy(FocusHighlightStrategy value) {
  if (_highlightManager.strategy == value) {
    return;
  }
  _highlightManager.strategy = value;
}