Menu bar accelerators (#114852)

* 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.
This commit is contained in:
Greg Spencer
2022-11-28 16:27:20 -08:00
committed by GitHub
parent db631f1496
commit 0cb9f70460
9 changed files with 1598 additions and 675 deletions

View File

@@ -49,9 +49,9 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
@override
Widget build(BuildContext context) {
return Shortcuts(
shortcuts: <ShortcutActivator, Intent>{
LogicalKeySet(LogicalKeyboardKey.arrowUp): const IncrementIntent(),
LogicalKeySet(LogicalKeyboardKey.arrowDown): const DecrementIntent(),
shortcuts: const <ShortcutActivator, Intent>{
SingleActivator(LogicalKeyboardKey.arrowUp): IncrementIntent(),
SingleActivator(LogicalKeyboardKey.arrowDown): DecrementIntent(),
},
child: Actions(
actions: <Type, Action<Intent>>{