-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: mouseIssues related to using a mouse or mouse supportIssues related to using a mouse or mouse supportcustomer: quake (g3)f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.24Found to occur in 3.24Found to occur in 3.24found in release: 3.25Found to occur in 3.25Found to occur in 3.25frameworkflutter/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 onplatform-androidAndroid applications specificallyAndroid applications specificallyteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
Steps to reproduce
Create a SubmenuButton with a children menu items
SubmenuButton(
leadingIcon: Icon(Symbols.design_services),
menuChildren: [
MenuItemButton(
onPressed: () => print('Pressed'),
child: Text('My submenu item'),
),
],
child: Text('My submenu'),
),
Tap on the Submenu button, and the My submenu item will flash open and close immediately. The submenu appears on tap down, and disappears on tap release. This only happens the first time. Any subsequent activations work fine.
Expected results
Tapping on the submenu will show the children and not disappear.
Actual results
Tapping on the submenu shows and hides the submenu on tap release.
Code sample
Code sample
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
child: MenuAnchor(
builder: (context, controller, child) => TextButton(
onPressed: () {
controller.isOpen ? controller.close() : controller.open();
},
child: Text('Press here'),
),
menuChildren: [
SubmenuButton(menuChildren: [
MenuItemButton(
onPressed: () {},
child: Text('Menu item'),
),
], child: Text('Submenu')),
],
),
),
),
);
}
}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 lista: mouseIssues related to using a mouse or mouse supportIssues related to using a mouse or mouse supportcustomer: quake (g3)f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.24Found to occur in 3.24Found to occur in 3.24found in release: 3.25Found to occur in 3.25Found to occur in 3.25frameworkflutter/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 onplatform-androidAndroid applications specificallyAndroid applications specificallyteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team