Closed azhago closed 2 months ago
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.
Duplicate Check
Describe the bug
Hi, In v0.23.2, the GestureDetector doesn't work
It was OK till v0.23.1
Code
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..on_event() done, defined at C:_DEV__bibliotheque.venv\Lib\site-packages\flet_runtime\app.py:217> exception=KeyError('dx')>
Traceback (most recent call last):
File "C:_DEV__bibliotheque.venv\Lib\site-packages\flet_runtime\app.py", line 219, in on_event
await conn.sessions[e.sessionID].on_event_async(
File "C:_DEV__bibliotheque.venv\Lib\site-packages\flet_core\page.py", line 905, in on_event_async
await handler(ce)
File "C:_DEV__bibliotheque.venv\Lib\site-packages\flet_core\event_handler.py", line 18, in fn
ce = self.result_converter(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:_DEV\bibliotheque.venv\Lib\site-packages\flet_core\gesture_detector.py", line 277, in
self.__on_exit = EventHandler(lambda e: HoverEvent(e))
^^^^^^^^^^^^^
File "C:_DEV\ bibliotheque.venv\Lib\site-packages\flet_core\gesture_detector.py", line 818, in init
self.delta_x: Optional[float] = d["dx"]
~^^^^^^
KeyError: 'dx'
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