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

Drawer opens when it should not #37

Closed
giaur500 opened this issue Apr 29, 2020 · 2 comments
Closed

Drawer opens when it should not #37

giaur500 opened this issue Apr 29, 2020 · 2 comments

Comments

@giaur500
Copy link

giaur500 commented Apr 29, 2020

Test on Android.
To reproduce:

  • open drawer
  • don't choose any menu option, swipe on blank space inside drawer menu to close drawer
  • tap inside window where drawer is located. Unable to click anything, drawer opens itself

On some phones it's even worse, drawer always opens itself and I am unable to click anything in window. It depends from font size and dpi used.
Drawer is buggy, please look?

emem365 added a commit to emem365/Best-Flutter-UI-Templates that referenced this issue May 20, 2020
As the issue states, the drawer was opening when it shouldn't. The problem was that sometimes there was a minute difference between scrollController.offset and widget.drawerWidth (294.54545454545456 and 294.54545454545455, in my case), and thus the correct function was not being executed. I have changed the > < if condition when adding the Listener to scrollController to compare with the floor value instead, (294, in my case). Since the change is quite less, I figure this should work fine :)
@emem365
Copy link
Contributor

emem365 commented May 20, 2020

Hi @mitesh77, I really appreciate what you've done with flutter here. I was looking around your examples when I faced the same issue. I managed to fix it for my fork of the repo. If this repo is open to PRs, maybe you can merge it to the master :)

@giaur500
Copy link
Author

giaur500 commented May 21, 2020

I can confirm, fix works fine. I think issue can be closed.

mitesh77 added a commit that referenced this issue Jul 17, 2020
eugene2candy pushed a commit to eugene2candy/Best-Flutter-UI-Templates that referenced this issue Apr 10, 2021
As the issue states, the drawer was opening when it shouldn't. The problem was that sometimes there was a minute difference between scrollController.offset and widget.drawerWidth (294.54545454545456 and 294.54545454545455, in my case), and thus the correct function was not being executed. I have changed the > < if condition when adding the Listener to scrollController to compare with the floor value instead, (294, in my case). Since the change is quite less, I figure this should work fine :)
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