-
Notifications
You must be signed in to change notification settings - Fork 4
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
Box Controller Drag update handle #1
base: master
Are you sure you want to change the base?
Box Controller Drag update handle #1
Conversation
Send your code to check. |
Just modify the following code in the music_player_screen.dart Line 82: and Line 145: |
Thank you for the help! |
you're welcome. no other problem? problem is solved? |
The problem actually was that the sliding window was actually covering the whole screen(according to my design) so the top part was not able to get the gesture.... I tried what you instructed but the problem was that it would be a bad UX for the user to able to hold a small part according to my design I wanted the user to give some room so I tried that with the flow I explained and gave this PR for The whole screen is filled with the sliding panel(open) and on top there is a minimize button (arrow_down icon) and the whole region I placed an invisible container and on that I used gesture detector and with boxController.onGestureUpdate I did get the feel I wanted.... I just thought that some would want like me to use bit more customized and have a bit more control over the drag update So now my screen is somewhat like |
I did not understand what you did Did you use the nest box? Is your problem solved, if not write an example code for me to check. |
Ya my issue was resolved no worries. I just showed my desired action in the video above |
Issue
I was working on my app which is a music app. As demonstrated in the example It opens the collapsed view by drag but when closing from the open state it was giving issue. This was because I gave the open height the full screen.
I then followed the example and tried to give 90% of the screen width. This gave me the access of some area above. I noticed that when I set draggableIconVisible as false on my opened body(panel) the drag was getting updated but it had some offset. Like the area just above it was used to drag the item down which was I suppose the area for the icon. I tried multiple ways, but maybe I was not able to dive deep enough to find a way if you have provided to it.
I gave a read to your source code and found a possible solution to it. I saw that there was a
_onGestureUpdate
and_onGestureEnd
method which could be used in my case. I just exposed them with the help of BoxController and i was able to achieve the drag from externally. In my panel at the top I gave a inivisble Container of full width and height 40 and with that I was able to do the drag operationYour source code is very readable and very well made thanks to that I was able to get to the solution very quickly.
I don't know if there is a solution to this but these few lines helped me and might help others.