Skip to content

Conversation

@gspencergoog
Copy link
Contributor

DRAFT PR

This is an alternative implementation of MenuBar where the menus can be any Widget instead of being required to have MenuItem widgets as menus.

It allow including generic widgets with menu items, but it makes it almost impossible to implement groups (because they can't learn about their context), and it comes with some weird restrictions, like you can't wrap more than one menu item in a collection (Column/Row/Flex, etc.), it can't do tab traversal for the entire tree (because it only sees a subset at a time), and you can't have menu items automatically define the menu shortcuts (because the widgets only exist when they're visible). The alternative is an implementation that only allows a subset of widgets (MenuItem subclasses, where MenuItem implements Widget). It doesn't have any of the above limitations, but you can't just insert a Text into the menu.

@flutter-dashboard flutter-dashboard bot added a: tests "flutter test", flutter_test, or one of our tests d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos documentation f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. c: contributor-productivity Team-specific productivity, code health, technical debt. labels Jun 24, 2022
@gspencergoog gspencergoog changed the title Menu bar in progress Widget-based MenuBar implementation Jun 24, 2022
@gspencergoog gspencergoog force-pushed the menu_bar_in_progress branch from 79ba79c to 9fab2f6 Compare June 28, 2022 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: tests "flutter test", flutter_test, or one of our tests c: contributor-productivity Team-specific productivity, code health, technical debt. d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant