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 :)
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 :)