1. 11 Dec, 2023 1 commit
  2. 19 Oct, 2023 2 commits
  3. 18 Oct, 2023 1 commit
  4. 10 Oct, 2023 1 commit
    • Greg Spencer's avatar
      Add key event handlers that happen before or after the focus traversal (#136280) · 7e1d366a
      Greg Spencer authored
      ## Description
      
      This adds a mechanism for listening to key events before or after focus traversal occurs.
      
      It adds four methods to the public `FocusManager` API:
      
      - `addEarlyKeyEventHandler` - Adds a handler that can handle events before they are given to the focus tree for handling.
      - `removeEarlyKeyEventHandler` - Removes an early event handler.
      - `addLateKeyEventHandler` - Adds a handler that can handle events if they have not been handled by anything in the focus tree.
      - `removeLateKeyEventHandler` - Removes a late event handler.
      
      This allows an app to get notified for a key anywhere, and prevent the focus tree from seeing that event if it handles it.
      
      For the menu system, this allows it to eat an escape key press and close all the open menus.
      
      ## Related Issues
       - https://github.com/flutter/flutter/issues/135334
      
      ## Tests
       - Added tests for new functionality.
      7e1d366a
  5. 20 Sep, 2023 1 commit
    • Greg Spencer's avatar
      Remove 'must be non-null' and 'must not be null' comments in widgets library (#134992) · 6e5134b0
      Greg Spencer authored
      ## Description
      
      This removes all of the comments that are of the form "so-and-so (must not be null|can ?not be null|must be non-null)" from the cases where those values are defines as non-nullable values.
      
      This PR removes them from the widgets library.
      
      This was done by hand, since it really didn't lend itself to scripting, so it needs to be more than just spot-checked, I think. I was careful to leave any comment that referred to parameters that were nullable, but I may have missed some.
      
      In addition to being no longer relevant after null safety has been made the default, these comments were largely fragile, in that it was easy for them to get out of date, and not be accurate anymore anyhow.
      
      This did create a number of constructor comments which basically say "Creates a [Foo].", but I don't really know how to avoid that in a large scale change, since there's not much you can really say in a lot of cases.  I think we might consider some leniency for constructors to the "Comment must be meaningful" style guidance (which we de facto have already, since there are a bunch of these).
      
      ## Related PRs
      - https://github.com/flutter/flutter/pull/134984
      - https://github.com/flutter/flutter/pull/134991
      - https://github.com/flutter/flutter/pull/134993
      - https://github.com/flutter/flutter/pull/134994
      
      ## Tests
       - Documentation only change.
      6e5134b0
  6. 19 Sep, 2023 1 commit
  7. 18 Sep, 2023 2 commits
  8. 28 Aug, 2023 3 commits
  9. 17 Aug, 2023 1 commit
  10. 20 Jul, 2023 1 commit
  11. 09 May, 2023 1 commit
  12. 22 Mar, 2023 1 commit
  13. 17 Feb, 2023 1 commit
  14. 03 Feb, 2023 1 commit
  15. 24 Jan, 2023 2 commits
  16. 18 Jan, 2023 1 commit
  17. 10 Jan, 2023 1 commit
    • Yegor's avatar
      add closed/open focus traversal; use open on web (#115961) · 42053575
      Yegor authored
      * allow focus to leave FlutterView
      
      * fix tests and docs
      
      * small doc update
      
      * fix analysis lint
      
      * use closed loop for dialogs
      
      * add tests for new API
      
      * address comments
      
      * test FocusScopeNode.traversalEdgeBehavior setter; reverse wrap-around
      
      * rename actionResult to invokeResult
      
      * address comments
      42053575
  18. 12 Sep, 2022 1 commit
  19. 02 Sep, 2022 1 commit
  20. 26 Jul, 2022 1 commit
  21. 26 May, 2022 1 commit
  22. 25 May, 2022 1 commit
    • Greg Spencer's avatar
      A bunch of cleanups and a missing `ShortcutRegistar` in `WidgetsApp` (#104560) · 0a417c3b
      Greg Spencer authored
      A bunch of random cleanup things I found while doing MenuBar development.
      
      Changes an if test to an assert in binding.dart, since the if should always be true.
      Adds the default ShortcutRegistrar that should have been in the ShortcutRegistry PR.
      Moves a debug message in the FocusManager to print the result after the focus change instead of before.
      Reorders the test parameters in theme_data_test.dart to match the order of the theme data fields everywhere else.
      0a417c3b
  23. 14 Apr, 2022 1 commit
  24. 13 Apr, 2022 1 commit
    • Callum Moffat's avatar
      Support trackpad gestures in framework (#89944) · 30a50180
      Callum Moffat authored
      * Implement trackpad gestures in framework
      
      * Touch and Pan/Zoom pointers have separate IDs now
      
      * Handle trackpad pointer device type
      
      * Respect supportedDevices for pan/zoom events
      
      * Update after rebase
      
      * Fix check failures
      
      * Avoid error with very short drags
      
      * Address feedback
      
      * Refactor drag event handler
      
      * Address more feedback
      
      * Add some missing punctuation
      30a50180
  25. 12 Apr, 2022 1 commit
  26. 06 Apr, 2022 1 commit
  27. 24 Mar, 2022 1 commit
  28. 03 Feb, 2022 1 commit
  29. 01 Feb, 2022 1 commit
  30. 20 Jan, 2022 1 commit
  31. 10 Jan, 2022 1 commit
  32. 08 Jan, 2022 1 commit
  33. 12 Dec, 2021 1 commit
  34. 07 Dec, 2021 1 commit
  35. 11 Oct, 2021 1 commit