-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listcustomer: googleVarious Google teamsVarious Google teamsf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.19Found to occur in 3.19Found to occur in 3.19found in release: 3.21Found to occur in 3.21Found to occur in 3.21frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Steps to reproduce
- Create a
MenuItemButtonwhoseshortcutis aCharacterActivatorwith at least one modifier set (control,meta,alt, etc). - Render your
MenuItemButton.
Expected results
The MenuItemButton shortcut should include the modifier keys needed to activate the shortcut.
Actual results
the MenuItemButton's shortcut is rendered as the character you selected for your CharacterActivator, without any of the modifiers you specified. Typing that character alone will not activate the menu item (the CharacterActivator itself is correct), so the shortcut shown in the menu button is wrong.
Code sample
Code sample
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
final examples = [
(
SingleActivator(LogicalKeyboardKey.keyS, control: true),
Text('SingleActivator'),
),
(
CharacterActivator('S', control: true),
Text('CharacterActivator'),
),
];
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
for (final (shortcut, child) in examples)
SizedBox(
width: 200,
child: MenuItemButton(shortcut: shortcut, child: child),
),
],
),
),
),
);
}
}Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
[Paste your output here]Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listcustomer: googleVarious Google teamsVarious Google teamsf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.19Found to occur in 3.19Found to occur in 3.19found in release: 3.21Found to occur in 3.21Found to occur in 3.21frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Type
Projects
Status
Done (PR merged)