website/blog/2024-06-18-flet-v-0-23-release-announcement.md
We are excited to announce the release of Flet 0.23.0. It is a big release with many new features and bug fixes.
PEP 20 (Zen of Python): Errors should never pass silently.
Several devs reported that, on some occasions, a control might visually break without clear information on what caused the break.
For example, in issue #3149, @base-13 mentioned that "in a DataTable if the number of columns is less than the number of datacells in any row it will grey out whole table without throwing error".
Knowing this, we added more assertion-checks in most of the controls, such that, when you provide them with a wrong value, an AssertionError is raised with a very clear message of what was wrongly done.
If you find out that some checks are still missing, please point them out so they can be addressed.
The output of the flet build command has been prettified.
Also, a new option has been added --show-platform-matrix which displays a table containing the build platform matrix, which has header columns "Command" (possible build commands) and "Platform" (the device you should use with the respective command).
Furthermore, when the targeted platform can't be built on your device, a table displaying the build platform matrix is shown with an informative message.
While doing "Error Handling" mentioned above, we had to mark some important properties as required.
The following properties are now "required" (must be provided and visible) when creating an instance of their classes:
AnimatedSwitcher.contentBanner.content, Banner.actionsBottomSheet.contentCupertinoActionSheetAction.contentDataRow.cellsDataTable.columnsDragTarget.contentDraggable.contentExpansionTile.titleMenuBar.controlsPagelet.contentRadioGroup.contentSafeArea.contentShaderMask.shaderWindowDragArea.contentThe below issues were successfully fixed:
ScrollbarTheme.thickness value not respected when not
interacting withLineChart colors not visually respectedDropdown when disabled
doesn't reflect its disabled stateMarkdown code block not selectableContainer.theme_mode
not honoured when Container.theme=NoneContainer.on_tap_down
not called when Container.on_click=NoneSpecial Thanks to the dynamic Flet community for reporting all the issues they encountered. We keep working hard on solving the remaining ones.
All the Page.window_*** properties are now deprecated and moved to Page.window
property, which is of type Window.
To migrate, simply use change window_ to window. as seen below:
# before
page.window_height = 200
page.on_window_event = lambda e: print(e.type)
# now
page.window.height = 200
page.window.on_event = lambda e: print(e.type)
SafeArea.minimum is deprecated and has been renamed
to minimum_padding
MaterialState enum is deprecated and has been renamed to ControlState
NavigationDestination is deprecated and has been renamed
to NavigationBarDestination
Also, the deprecation policy has been modified. While Flet is pre-1.0, all deprecations will be removed from the API after the next 3 releases. So the above deprecations made in v0.23.0 (and all the other deprecations made in the previous versions), will be removed in v0.26.0.
That's it! :)
Upgrade to Flet 0.23.0, test your apps and let us know how you find the new features we added. If you have any questions, please join Flet Discord server or create a new thread on Flet GitHub discussions.
Happy Flet-ing!