1. 28 Nov, 2023 1 commit
    • Nate's avatar
      Implement `switch` expressions in `dev/` (#139048) · 3267fbc0
      Nate authored
      I previously made a PR (#136140) that used `switch` expressions to make some parts of the Flutter codebase easier to understand. It was assigned to the framework team, and @christopherfujino let me know that it was too large to effectively review and recommended breaking it up into smaller pull requests.
      
      Here's a PR that only targets files in the `dev/` directory. Hopefully this will be easier to work with!
      
      (solves issue https://github.com/flutter/flutter/issues/136139)
      3267fbc0
  2. 20 Jul, 2023 1 commit
  3. 06 Jul, 2023 1 commit
  4. 22 Mar, 2023 1 commit
  5. 29 Nov, 2022 1 commit
    • Greg Spencer's avatar
      Menu bar accelerators (#114852) · 0cb9f704
      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.
      0cb9f704
  6. 07 Oct, 2022 1 commit
  7. 28 Sep, 2022 1 commit
    • Greg Spencer's avatar
      Implement Material MenuBar and MenuAnchor (#112239) · 8c271e5c
      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.
      8c271e5c