- 18 Oct, 2023 1 commit
-
-
Greg Spencer authored
## Description This converts the `MenuAnchor` class to use `OverlayPortal` instead of directly using the overlay. ## Related Issues - Fixes https://github.com/flutter/flutter/issues/124830 ## Tests - No tests yet (hence it is a draft)
-
- 12 Oct, 2023 1 commit
-
-
Greg Spencer authored
## Description In order for `MenuAnchor` menus to be able to not pass on the taps that close their menus, `TapRegion` needed a way to consume them. This change adds a flag to the `TapRegion`, `consumeOutsideTap` that will consume taps that occur outside of the region if the flag is set (it is false by default). The same flag is added to `MenuAnchor` to allow selecting the behavior for menus. `TapRegion` consumes the tap event by registering with the gesture arena and immediately resolving the tap as accepted if any regions in a group have `consumeOutsideTap` set to true. This PR also deprecates `MenuAnchor.anchorTapClosesMenu`, since it is a much more limited version of the same feature that only applied to the anchor itself, and even then only applied to closing the menu, not passing along the tap. The same functionality can now be implemented by handling a tap on the anchor widget and checking to see if the menu is open before closing it. ## Related Issues - https://github.com/flutter/flutter/issues/135327 ## Tests - Added tests for `TapRegion` to make sure taps are consumed properly.
-
- 14 Aug, 2023 1 commit
-
-
Taha Tesser authored
fixes [Some of the menu examples don't contain `SafeArea`](https://github.com/flutter/flutter/issues/132388) ### Description This fixes the menu examples for running on mobile with a safe area. ![Group 2](https://github.com/flutter/flutter/assets/48603081/0d460c00-60f5-45e0-87ee-c010ede9ee42)
-
- 07 Jun, 2023 2 commits
-
-
Greg Spencer authored
## Description Changes the context menu example for `MenuAnchor` so that it uses right-click, or (on macOS and iOS only) ctrl-left-click, for the context menu. Also disables the browser context menu on web platforms. ## Tests - Updated test to reflect new triggers.
-
Leigha Jarett authored
Fixes: https://github.com/flutter/flutter/issues/127215
-
- 01 Jun, 2023 1 commit
-
-
Hans Muller authored
-
- 04 Apr, 2023 1 commit
-
-
Greg Spencer authored
Rename Sample classes
-
- 22 Mar, 2023 1 commit
-
-
Michael Goderbauer authored
Remove 1745 decorative breaks
-
- 21 Dec, 2022 1 commit
-
-
Michael Goderbauer authored
-
- 29 Nov, 2022 1 commit
-
-
Greg Spencer authored
* Add MenuMenuAcceleratorLabel to support accelerators. * Review Changes * Review Changed * Fix default label builder to use characters * Remove golden test that shouldn't have been there.
-
- 07 Oct, 2022 1 commit
-
-
Greg Spencer authored
-
- 28 Sep, 2022 1 commit
-
-
Greg Spencer authored
This implements a MenuBar widget that can render a Material menu bar, and a MenuAnchor widget used to create a cascading menu in a region. The menus are drawn in the overlay, while the menu bar itself is in the regular widget tree. Keyboard traversal works between the two. This implementation of the MenuBar uses MenuAnchor to create a cascading menu that contains widgets representing the menu items. These menu items can be any kind of widget, but are typically SubmenuButtons that host submenus, or MenuItemButtons that have shortcut hints (but don't actually activate the shortcuts) and don't host submenus. Cascading menus can be created outside of a MenuBar by using a MenuAnchor. They can be either given a specific location to appear (a coordinate), or they can be located by the MenuAnchor region that wraps the control that opens them. The developer may also create a MenuController to pass to the various menu primitives (MenuBar or MenuAnchor) to associate menus so that they can be traversed together and closed together. Creating a controller is not required.
-