Skip to content
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

onTap doesn't work when using onSwipe #63

Open
xOldeVx opened this issue Nov 14, 2023 · 1 comment
Open

onTap doesn't work when using onSwipe #63

xOldeVx opened this issue Nov 14, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@xOldeVx
Copy link

xOldeVx commented Nov 14, 2023

I want to let the user to select to tap on the snackBar to go to the main screen, or just dismiss it by swipe, but it doesn't work, the onTap function is working only if i'm not using DismissType.onSwipe

showTopSnackBar(
Overlay.of(context),
Container(child: Text('Text')),
curve: Curves.fastLinearToSlowEaseIn,
dismissDirection: [DismissDirection.up, DismissDirection.horizontal],
dismissType: DismissType.onSwipe, <----------------- when comment it, the goToMainScreen() is working
onTap: () => goToMainScreen(context),
);

@jvitoramorim
Copy link

Had a similar error, for me the onTap only works when the DismissType is DismissType.onTap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants