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.
* Added support for surfaceTintColor and shadowColor to the Dialog widgets.
* Updated the defaults for Material.shadowColor and Material.surfaceTint to allow turning off the features with a transparent color.
* Added support for shadowColor and surfaceTintColor for Drawer widget.
* Added an example for IndexedStack
* Added tests for the IndexedStack example
* Fixed type issue for onSubmitted callback functions
* Fixed documentation and moved files to their appropriate places
* Fixed documentation and moved files to their appropriate places
* Moved test files to their appropriate places
* Moved test files to their appropriate places
* Fixed file path in documentation
* Remove trailing space
* Formatting changes
* Remove extra line
* Further formatting changes
* Further formatting changes
* fix comma and inline
Co-authored-by: Greg Spencer <gspencergoog@users.noreply.github.com>
* Formatting
* indentation and formatting
* Formatting
* Formatting
* Formatting
* Removed duplicate chevron
* better wording on documentation
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
* Added testing for state preservation
Co-authored-by: Greg Spencer <gspencergoog@users.noreply.github.com>
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>