-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support Scrolling within Floating Overlay #5
Comments
Hi! Thank you for the compliment! I'm still supporting this even with less time available. I see why the gesture detectors would conflict if you tried to scroll inside the floating overlay. We could think of a flag inside the controller that would disable some or all gesture detection from the floating widget. This way you could create a pin or some other button to indicate that the floating widget is fixed to that position/scale. About what you did to solve that, I get the size from the widget after the first frame, maybe filling the If you are willing to try and implement this, I would gladly accept a PR from your fork. Edit:If the |
Hi - I have been trying to get the _FloatingOverlayOffset to use a Rect instead of Offset but unfortunately I have not been able to get a version working successfully - there seems to be some magic creating the limits and enabling the scaling that I don't fully understand - I have run out of time on this. The more important requirement is to improve how the GestureDetector works with the floating child so that I can use TextFields or drop-down fields in the floating widget. I thought maybe I could try and add a header widget in a Column (with the existing child widget) and modify the gestureDetector of the FloatingOverlayController to only move or scale if the header was moused over - this would mean that only the header (top, topRight, topLeft) of the floating widget could be interacted with for moving/scaling, but I could live with that if I could then interact with other widgets in the body of the floating widget. Thoughts? I'd be happy to pay you for implementing the features if you gave me a quote. Many Thanks Edit: I have also tried to use a flag to only return the GestureDetector widget in the _CursorResizing and the FloatingOverlayController when this flag is set to false. The FloatingWidget still gets rebuilt every time I interact with the floating child widget. This seems to be because the OverlayEntry builder function is called anytime I interact with the floating widget. Do you know why this is? |
I found a solution! The issue was with the Overlay builder and the _Reposition object. I will submitt a PR tomorrow. Still need to fix getting the bottom right offset passed to the FloatingOverlayOffset.. but getting closer |
Great work! Waiting for your PR! About the rebuilding, that's something I'm trying to solve, I think it has something to do with getting the size of the child widget, but if you have any insight let me know! |
Hi - thanks for building a great widget. Are you still supporting this?
I am building for flutter web app - and the floating overlay uses the Positioned widget which means that a scrollable widget as a child does not scroll unless all the constructors for the positioned widget are set.
https://stackoverflow.com/questions/59936098/listview-not-scrolling-in-positioned-widget
I have forked the repo and updated the _Reposition class to set the right and bottom properties of the Positioned constructor to 0 (see below) - although this means that the overlay cannot be scaled from the right or bottom anymore.
Any suggestions for how to set the right and bottom properties correctly in the _Reposition class so that the overlay will still scale from all 4 sides? I think the solution maybe to pass in the _Side.bottom and _Side.right from the get _entryProcesWidgets call in the floating_overlay_controller?
Many Thanks
Alistair
The text was updated successfully, but these errors were encountered: