• Greg Spencer's avatar
    Automatic focus highlight mode for FocusManager (#37825) · a11d7314
    Greg Spencer authored
    This adds a FocusHighlightMode to the FocusManager that switches based on the type of input that has recently been received. The initial value is based on the platform, but is updated as soon as user input is received. There is also a FocusHighlightStrategy enum so that the developer can change the strategy to a fixed value if needed.
    
    The default is to automatically detect the mode based on the last type of user input. If they use a mouse or keyboard, it shows the focus highlights. If they use a touch interface, then the highlights disappear. This is consistent with the way that Android and Chrome work. The controls still receive focus, only the display of the highlight changes.
    
    Text fields show the focus highlight regardless of the focus highlight mode.
    a11d7314
focus_manager_test.dart 29.7 KB