Documentation
- flet-notifications: Document how to update a notification after an inline reply on Android, and fix the "Action buttons and replies" example's notification staying stuck with a spinner after a reply (#7058, #7060) by @ItsRenjiii.
- Document how to show a loading screen while
main()starts up, and where unhandled exceptions from handlers, tasks and threads end up, in the Async apps guide (#7100, #7101) by @daneeller.
Improvements
- flet-mcp knows flet-shadcn-ui's Lucide icons:
get_enum("LucideIcons")andenum_has_member()list them, andfind_icon(query, family="lucide")searches them (a search without a family still returns only Material and Cupertino icons). Its API reference now also covers flet-local-auth, flet-notifications and flet-spinkit (#7118) by @FeodorFitsner. - flet-mcp records what each Flet module exports, the keyword arguments each class takes and each enum's members, introspected from the installed packages, so code checkers can catch
ft.PieChart(it'sflet_charts.PieChart),ft.TextField(helper_text=...)orft.Colors.BLACK45before the code runs:ApiStore.module_exports(),modules_exporting(),init_params(),settable_attrs()andmodule_enum_members(), on the store the MCP server shares throughshared_api_store()(#7118) by @FeodorFitsner. - Load a
DataTableof thousands of rows without freezing the app: a table with 100 or more rows of one height builds only the rows near the visible part of the page, so a 3,470-row table loads in one 0.2 s frame instead of a 4 s freeze, and selecting a row no longer freezes the app for a second; set the newbuild_rows_on_demandtoFalseto build every row (#7076) by @FeodorFitsner. - Load a
DataTable2(flet-datatable2) of thousands of rows without freezing the app: a table with 100 or more rows builds only the rows near the visible part of the table, so a 3,470-row table loads in one 0.3 s frame instead of a 2.5 s freeze.flet-datatable2now carries its own copy ofdata_table_2'sDataTable2to do this, and honorsbuild_rows_on_demandtoo (#7076) by @FeodorFitsner. - Scroll long pages and tables smoothly: every control used to get its own compositing layer, so a page of thousands of controls, like a
DataTablewith thousands of rows, stuttered on every scroll frame; controls now add a layer only while theiropacityis between 0 and 1, and aDataTableno longer repaints all of its rows as it scrolls (#7076) by @FeodorFitsner. - Look up icons by name, as with enum members:
ft.Icons["HOME"],ft.CupertinoIcons["ADD"]andLucideIcons[...], and check a name with"HOME" in ft.Icons(#7114) by @FeodorFitsner. ft.use_dialog()raises aTypeErrorfor a dialog returned from an@ft.componentfunction, or any other control that isn't a dialog, instead of silently never opening it (#7114) by @FeodorFitsner.- Start web apps that use
flet-rive1 MB lighter when they don't show aRivecontrol: the Rive engine (rive_native.wasm) now loads when the firstRivecontrol loads its file, instead of at startup (#7057) by @FeodorFitsner.
Bug fixes
- Fix
DataTable.horizontal_lineshaving no effect (#7076) by @FeodorFitsner. - Fix event handlers and
use_effectsetups that call an async function from a plain function, such ason_click=lambda: save(item)orft.use_effect(lambda: load(item_id), [item_id]), silently doing nothing: Flet now awaits the coroutine they return as it would anasync defhandler or setup, and runs a returned generator as a generator handler. A task or future they start is still left to run on its own (#7117) by @FeodorFitsner. - Fix
ft.use_memo()andft.use_effect()ignoring in-place changes to an observable's list or dict passed as a dependency, such asstate.items.append(x): the value is now recomputed and the effect re-run (#7114) by @FeodorFitsner. - Fix SVG images drawing blank when their URL has a query string or fragment, such as a cache-busting
icon.svg?v=2:Imagenow recognizes an SVG by the URL's path, in any letter case (#7057) by @FeodorFitsner. - Fix
Textwithspansignoringoverflow: a rich text cut off bymax_linesnow ends in an ellipsis withoverflow=TextOverflow.ELLIPSIS, as plain text does, instead of being clipped at a word (#7057) by @FeodorFitsner. - Fix mypy inferring
type[Never]for classes decorated with@control("Name"): the overload that takes arguments now accepts only a stringdart_widget_name(#7085, #7087) by @joaoaracheski. - Fix type checkers ignoring
dataclasses.field()arguments such asinit=Falseon@controland@valueclasses, by declaringdataclasses.fieldas a field specifier (#6377, #7084) by @joaoaracheski. - Fix macOS apps playing the system alert sound for key presses that no control handles, such as keys handled only by
page.on_keyboard_event(#1282, #7092) by @ndonkoHenri. - Fix
page.window.resizable = Falselocking the window at 1280×720 instead of the setwidthandheighton Linux (#1375, #7062) by @ndonkoHenri. - Fix
page.window.min_width,min_height,max_widthandmax_heightnot limiting the window size on Linux (#1735, #7063) by @ndonkoHenri. - Fix
page.windowsize limits that are cleared by setting them toNone, or amax_widthormax_heightset without the other, being ignored on Windows and Linux (#7063) by @ndonkoHenri. - flet-charts: Fix
BarChartfailing to render when aBarChartRodStackItemhas nofrom_yorcolor; an item without a color now uses its rod's color (#7064) by @ndonkoHenri. - flet-charts: Fix
LineChartjumping instead of animating when the points of a data series change (flet-charts#8, #7064) by @ndonkoHenri. - Fix cancelled client method calls keeping their responses in memory for the rest of the session, and client method calls made after the session closed waiting forever instead of failing with "Session closed" (#7065) by @remote-controlled-man.
- Fix
flet packfailing on Windows withValueError: binary mode doesn't take an encoding argument, and leaving a client that signing tools reject, since the desktop client is signed (1.1.0) (#7067) by @ndonkoHenri. - Fix apps packaged with plain
pyinstallerdownloading the Flet desktop client on their first start, or after a rebuild, and failing to build on macOS, and apps made withflet packfrom aFLET_VIEW_PATHthat holds the client itself downloading it too (#7053, #7068) by @ndonkoHenri. - Fix Linux apps made with
flet packorpyinstallerthat run on a newer distro than they were built on downloading the light client instead of using the bundled one, and switching from the full to the light client (#7068) by @ndonkoHenri. - Fix
flet build windowsreplacing the images in a supplied.icoapp icon with ones resampled from its largest image; the file is now copied into the app unchanged, and is used over a.pngof the same name (#6007, #7074) by @arthur-tacca. - Fix
ShakeDetectornever callingon_shakewith its default settings, and missing most shakes because it sampled the accelerometer only every 200 ms; on desktop it now raisesFletUnsupportedPlatformException, likeAccelerometer(#6456, #7093) by @ndonkoHenri. - Fix
@ft.observablenot refreshing the UI after in-place changes such as+=on a list field (#6293, #7086) by @joaoaracheski. - Fix web apps freezing every session while sending a large page update, such as a theme switch on a page with a big
DataTable: the transport no longer turns each message into debug text when debug logging is off (#7097) by @joaoaracheski. - Fix web apps serving FastAPI's
/docs,/redocand/openapi.json, which took those routes from the app and loaded Swagger UI and ReDoc from a CDN even withno_cdn=True: apps made byflet_web.fastapi.app()andflet run --webno longer register them (#7111, #7112) by @joaoaracheski. - Fix component state changed from a worker thread, such as by
set_statein apage.run_thread()handler, not reaching the screen until something else woke the app, stopping all later updates of the session when asyncio debug mode is on, and possibly racing a re-render of the component (#7108, #7113) by @joaoaracheski. - Fix
flet --version --jsonprinting invalid JSON whenflet-cliis not installed yet: the on-the-fly install's progress messages now go to stderr (flet-build-action#2, #7099) by @ndonkoHenri. - Fix changes to a control's
theme,dark_themeortheme_mode, such as togglingContainer.theme_mode, not being applied until its parent was updated (#7090) by @ndonkoHenri. - Fix
Screenshot.capture()failing with a type error whenpixel_ratiois a whole number, such aspixel_ratio=1(#7090) by @ndonkoHenri. - Fix
animate_sizeonContainerandImageand emiton_animation_endwithe.data == "size"when their size animation completes (#5766, #7091) by @ndonkoHenri. - Report the final size for each frame in
on_size_changewhen a control is laid out multiple times in that frame (#7091) by @ndonkoHenri. - Fix controls failing to render when an animation property such as
animate,animate_opacityoranimate_scaleisFalse:Falsenow turns that animation off (#7091) by @ndonkoHenri. - Fix controls with a
badgelosing their state when the badge'slabel_visiblechanges or the badge is replaced, such as an openPopupMenuButtonnever callingon_canceloron_select(#7080, #7089) by @ndonkoHenri. - Fix the
badgeof a control positioned withleft/top/right/bottomin aStackbeing drawn away from the control (#7089) by @ndonkoHenri. - Fix a generator
main()not showing the updates made before ayield, such as a splash screen, until the blocking work after it finished (#7100, #7106) by @ndonkoHenri. - Fix unhandled exceptions in
page.run_thread()functions and PubSub subscribers not being reported, and inpage.run_task()tasks being logged underconcurrent.futureseven when awaited; all are now logged on thefletlogger, a task's only when nothing awaits it (#7109, #7110) by @ndonkoHenri.
Full Changelog: v1.1.2...v1.1.3