Skip to content

fix(ui): replace ft.run_task with asyncio.create_task for Flet 0.85 - #5

Open
awoni wants to merge 1 commit into
mainfrom
claude/review-app-config-G4ZOK
Open

fix(ui): replace ft.run_task with asyncio.create_task for Flet 0.85#5
awoni wants to merge 1 commit into
mainfrom
claude/review-app-config-G4ZOK

Conversation

@awoni

@awoni awoni commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Flet 0.85's public API no longer exposes ft.run_task, so both the
mount-time effect and every Refresh button raised AttributeError before
any view could render. Switch to plain asyncio.create_task(coro), which
schedules on the running Flet event loop and does the same job with no
Flet-side helper.

  • use_effect wrapper now returns None explicitly
    (asyncio.create_task(load()) and None) so Flet does not mistake the
    Task for a cleanup callable.
  • Button on_click sites schedule load(force=True) directly.
  • radar_view and amedas_view gain the import asyncio they didn't need
    before.

Flet 0.85's public API no longer exposes ft.run_task, so both the
mount-time effect and every Refresh button raised AttributeError before
any view could render. Switch to plain asyncio.create_task(coro), which
schedules on the running Flet event loop and does the same job with no
Flet-side helper.

- use_effect wrapper now returns None explicitly
  (`asyncio.create_task(load()) and None`) so Flet does not mistake the
  Task for a cleanup callable.
- Button on_click sites schedule `load(force=True)` directly.
- radar_view and amedas_view gain the `import asyncio` they didn't need
  before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant