Skip to main content

Flet v0.23.0 Release Announcement

· 3 min read
Henri Ndonko
Flet Contributor and Maintainer

We are excited to announce the release of Flet 0.23.0. It is a big release with many new features and bug fixes.

New Controls

New Properties

Error Handling

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.

Command Line (CLI) Output

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.

Breaking Changes

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:

Bug Fixes

The below issues were successfully fixed:

  • #3144: ScrollbarTheme.thickness value not respected when not interacting with
  • #3072: High-resolution videos play laggy on Android TV devices.
  • #3023: (Regression) Some LineChart colors not visually respected
  • #2989: Color of Dropdown when disabled doesn't reflect its disabled state
  • #1753: Markdown code block not selectable
  • #3097: Hot-reload occurs when a file is opened
  • #1647: Container.theme_mode not honoured when Container.theme=None
  • #3064: Container.on_tap_down not called when Container.on_click=None

Special Thanks to the dynamic Flet community for reporting all the issues they encountered. We keep working hard on solving the remaining ones.

Deprecations

  • 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!