Open noobloser opened 3 years ago
@noobloser did you find a workaround to find which side called the callback? I found workaround: 1- onDragUpdate will set which direction. 2- innerDrawerCallback will set open or close
onDragUpdate: (value, direction) {
_direction = direction;
},
innerDrawerCallback: (isOpen) {
if (onChange != null) {
onChange(isOpen, _direction);
}
},
@EbramTawfik I did not work on it any further till now, as my application has more major problems rn :/
Also if I remember that correctly, I used onDragUpdate before, but it fires based on the swipe direction, so it does not fire, when I use my own button to open the drawer. (correct me if I'm wrong)
But based on your approach, I could set the _direction in onDragUpdate, as well as in the buttons onPressed Callback, which would be a working approach (even though it is kind of hacky)
@noobloser it fires on both swipe and toggle from the button. But I will try again to confirm.
The passing value for innerDrawerCallBack does not define rn which side of the drawer is opened. It would be great to get ahold of this information somehow. (I saw one issue here, where someone requested the extension of the GlobalKey to not only change the state, but also get the value, which sounds nice imo :D)