New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If PullDownMenuItem
's onTap
is a showDialog
function, nothing happens when clicking it.
#1
Comments
PullDownMenuItem
's onTap
is showDialog function, nothing happens when clicking it.PullDownMenuItem
's onTap
is a showDialog
function, nothing happens when clicking it.
Hi @LathDevers, thanks for submitting issue I am able to reproduce this issue with Both of menu buttons first call a As a working solution, while not perfect, consider this: PullDownButton(
itemBuilder: (ctx) => [
PullDownMenuItem(
title: 'Compress',
icon: CupertinoIcons.archivebox,
onTap: () async {
await Future<void>.delayed(const Duration(milliseconds: 1));
await showDialog<void>(
context: context,
builder: (context) => AlertDialog(content: Container()),
);
},
),
],
position: PullDownMenuPosition.under,
buttonBuilder: (context, showMenu) => CupertinoButton(
onPressed: showMenu,
padding: EdgeInsets.zero,
child: const Icon(CupertinoIcons.ellipsis_circle),
),
) Although I will try to come up with a better solution in a couple of weeks when I have more time (or at least update examples/documentation with example that i provided). |
Thanks, that's a perfectly fine workaround for now. 😉 |
The above workaround works for me with a |
I have just published an update which should have fixed this issue (at least from my testing it did). Now its pretty straightforward, just remove PullDownButton(
itemBuilder: (ctx) => [
PullDownMenuItem(
title: 'Compress',
icon: CupertinoIcons.archivebox,
onTap: () => showDialog<void>(
context: context,
builder: (context) => AlertDialog(content: Container()),
),
),
],
position: PullDownMenuPosition.under,
buttonBuilder: (context, showMenu) => CupertinoButton(
onPressed: showMenu,
padding: EdgeInsets.zero,
child: const Icon(CupertinoIcons.ellipsis_circle),
),
) |
@notDmDrl thanks! It works for me now 👍🏻 |
The text was updated successfully, but these errors were encountered: