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

Close drawer on click - Feature request #78

Closed
YDA93 opened this issue Mar 28, 2022 · 4 comments
Closed

Close drawer on click - Feature request #78

YDA93 opened this issue Mar 28, 2022 · 4 comments

Comments

@YDA93
Copy link
Contributor

YDA93 commented Mar 28, 2022

I kindly would like to raise a feature request where we can close drawer by only clicking on the widget instead of only swiping.

I tested my app and many users didn't figure out how to close the drawer.

My current workaround:

GestureDetector(
    onTap: () {
      if (ZoomDrawer.of(context)?.isOpen() == true) {
        ZoomDrawer.of(context)?.close();
      }
    },
    child: myWidget,
);

Thanks!

@medyas
Copy link
Owner

medyas commented Mar 28, 2022

@YDA93 This is already available in the package. you can set mainScreenTapClose to true in the ZoomDrawer and it will allow you to close the drawer when its open by tapping on the main screen.

@medyas medyas closed this as completed Mar 28, 2022
@YDA93
Copy link
Contributor Author

YDA93 commented Mar 28, 2022

@medyas Yes I miss that!

Would you consider absorbing the pointer too? Clicking on any button from within the screen wouldn't close the drawer.

@medyas
Copy link
Owner

medyas commented Mar 28, 2022

its was implemented like that before, but it caused issues with main screen losing its state.
You can listen to the drawer state and rebuild your screen with a absorber if its open.

@YDA93
Copy link
Contributor Author

YDA93 commented Mar 29, 2022

@medyas Wouldn't make sense to at least include this option in the package? I can PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants