GestureDetector on_exit method throw an error / don't work anymore on v0.23.2
Duplicate Check
- [X] I have searched the opened issues and there are no duplicates
Describe the bug
Hi, In v0.23.2, the GestureDetector doesn't work
It was OK till v0.23.1
Code
import flet as ft
gesture_container:ft.GestureDetector = ft.GestureDetector(
content=ft.Container(
width=100,
height=100,
bgcolor="blue",
),
on_hover=lambda e: print("hover"),
on_exit=lambda e: print("exit"),
)
container:ft.Container = ft.Container(
width=600,
height=600,
bgcolor="grey",
content=gesture_container,
)
def main(page:ft.Page):
page.add(container)
if __name__ == "__main__":
ft.app(target=main)
To reproduce
Use the code above. When you exit the GestureDetector zone, an error will be thrown.
Tested in v0.23.2 : KO Tested in v0.23.1 : OK
error :
Task exception was never retrieved
future: <Task finished name='Task-83' coro=<__run_socket_server.
Expected behavior
No response
Screenshots
No response
Operating System
Windows
Operating system details
windows 11
Flet version
0.23.2
Regression
Yes, it used to work in a previous Flet version (please specify the version in additional details)
Suggestions
No response
Additional details
No response
have same issue with OnScrollEvent
Sorry for that! Issue has been fixed in https://github.com/flet-dev/flet/pull/3551
Issue has been fixed.
Give it a try by installing the latest Flet prerelease: pip install flet --pre (https://pypi.org/project/flet/#history)
Report if the issue persists.