flutter/examples/api/test/material
Greg Spencer 8c271e5cb8
Implement Material MenuBar and MenuAnchor (#112239)
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.
2022-09-28 14:10:18 -07:00
..
action_chip Update Chips examples and rename files (#108538) 2022-07-29 07:17:06 +00:00
appbar Fixing elevation issues with Material 3 (#110624) 2022-09-06 16:16:45 -07:00
bottom_navigation_bar Normalize examples (#111223) 2022-09-09 21:17:11 +00:00
card Add clipBehavior to Card+InkWell example (#109872) 2022-08-22 11:24:23 -04:00
choice_chip Update Chips examples and rename files (#108538) 2022-07-29 07:17:06 +00:00
dialog Add Material 3 Dialog examples and update existing Dialog examples (#101508) 2022-04-18 04:14:05 -07:00
dropdown DropdownButton: Update selectedItemBuilder example to show case item alignment and update DropdownButton examples (#102748) 2022-05-06 00:14:08 -07:00
filter_chip Update Chips examples and rename files (#108538) 2022-07-29 07:17:06 +00:00
floating_action_button Add Material 3 FloatingActionButton and FloatingActionButton variants examples (#101105) 2022-04-18 10:09:07 -07:00
ink Move examples from dart:ui ui/lib/text.dart to examples/api (#96557) 2022-01-14 15:42:54 -08:00
input_chip Update Chips examples and rename files (#108538) 2022-07-29 07:17:06 +00:00
input_decorator Deprecate ThemeData errorColor and backgroundColor (#110162) 2022-09-02 04:02:55 +00:00
list_tile Update ListTile docs for color animation issues and add example (#106955) 2022-07-13 08:09:07 +00:00
menu_anchor Implement Material MenuBar and MenuAnchor (#112239) 2022-09-28 14:10:18 -07:00
navigation_bar Normalize examples (#111223) 2022-09-09 21:17:11 +00:00
navigation_rail Add Material 3 NavigationRail example and improve Material 2 example (#101345) 2022-04-18 06:54:07 -07:00
popupmenu Normalize examples (#111223) 2022-09-09 21:17:11 +00:00
progress_indicator Replace references to LinearProgressIndicator in CircularProgressIndicator example (#103349) 2022-05-09 16:04:02 -04:00
refresh_indicator RefreshIndicator: Add notificationPredicate example (#103894) 2022-05-24 04:58:06 -07:00
scaffold Reland: "Add example and troubleshooting comment for showSnackBar" (#105195) 2022-08-09 22:06:05 +00:00
slider add material slider secondary value (#109808) 2022-08-28 23:26:32 +00:00
switch Switch: Add an interactive example (#103045) 2022-05-25 10:40:31 +02:00
text_button Reland Added MaterialStatesController, updated InkWell et al. #103167 (#105656) 2022-06-10 08:12:49 -07:00
toggle_buttons ToggleButtons: Add interactive example (#100124) 2022-04-29 12:29:07 -07:00
tooltip Use curly_braces_in_flow_control_structures for sample code (#104617) 2022-05-26 08:59:37 +02:00