|
| 1 | +--- |
| 2 | +slug: flet-v-0-26-release-announcement |
| 3 | +title: Flet v0.26.0 Release Announcement |
| 4 | +author: Feodor Fitsner |
| 5 | +author_title: Flet founder and developer |
| 6 | +author_url: https://github.com/FeodorFitsner |
| 7 | +author_image_url: https://avatars0.githubusercontent.com/u/5041459?s=400&v=4 |
| 8 | +tags: [releases] |
| 9 | +--- |
| 10 | + |
| 11 | +The Flet 0.26.0 release is here, featuring a significant update to the extensibility approach! |
| 12 | + |
| 13 | +In summary, a Flet extension is now a single Python package that bundles both Python and Flutter code. This package can be part of your Flet project or hosted in a public Git repository or PyPI. |
| 14 | + |
| 15 | +Built-in Flet extensions, such as `Audio`, `Video`, and `Map`, have been moved to their own repositories. You’re welcome to fork these extensions to create your own or contribute to Flet! These extensions have been published to PyPI, making them easy to include in your Flet app. To use them, simply add the desired extensions to the `dependencies` section of your `pyproject.toml` file. |
| 16 | + |
| 17 | +For more details, see below. |
| 18 | + |
| 19 | +## How to upgrade |
| 20 | + |
| 21 | +Run the following command to upgrade Flet: |
| 22 | + |
| 23 | +``` |
| 24 | +pip install 'flet[all]' --upgrade |
| 25 | +``` |
| 26 | + |
| 27 | +:::note |
| 28 | +`[all]` is an "extra" specifier which tells pip to install or upgrade all `flet` packages: `flet`, `flet-cli`, `flet-desktop` and `flet-web`. |
| 29 | +::: |
| 30 | + |
| 31 | +Bump `flet` package version to `0.26.0` (or remove it at all to use the latest) in your `pyproject.toml`. |
| 32 | + |
| 33 | +## Extensibility changes |
| 34 | + |
| 35 | +### Built-in extensions |
| 36 | + |
| 37 | +Flet controls based on 3rd-party Flutter packages that used to be a part of Flet repository, now have been moved to separate repos and published on pypi: |
| 38 | + |
| 39 | +* [flet-ads](https://pypi.org/project/flet-ads/) |
| 40 | +* [flet-audio](https://pypi.org/project/flet-audio/) |
| 41 | +* [flet-audio-recorder](https://pypi.org/project/flet-audio-recorder/) |
| 42 | +* [flet-flashlight](https://pypi.org/project/flet-flashlight/) |
| 43 | +* [flet-geolocator](https://pypi.org/project/flet-geolocator/) |
| 44 | +* [flet-lottie](https://pypi.org/project/flet-lottie/) |
| 45 | +* [flet-map](https://pypi.org/project/flet-map/) |
| 46 | +* [flet-permission-handler](https://pypi.org/project/flet-permission-handler/) |
| 47 | +* [flet-rive](https://pypi.org/project/flet-rive/) |
| 48 | +* [flet-video](https://pypi.org/project/flet-video/) |
| 49 | +* [flet-webview](https://pypi.org/project/flet-webview/) |
| 50 | + |
| 51 | +To use a built-in Flet extension in your project, add it to the `dependencies` section of your `pyproject.toml` file, for example: |
| 52 | + |
| 53 | +``` |
| 54 | +dependencies = [ |
| 55 | + "flet-audio", |
| 56 | + "flet>=0.26.0", |
| 57 | +] |
| 58 | +``` |
| 59 | + |
| 60 | +### User extensions |
| 61 | + |
| 62 | +Flet now makes it easy to create and build projects with your custom controls based on Flutter widgets or Flutter 3rd-party packages: |
| 63 | + |
| 64 | +1. Create new virtual enviroment and [install Flet](/docs/getting-started/#python-venv-module) there. |
| 65 | + |
| 66 | +2. Create new Flet extension project from template: |
| 67 | + |
| 68 | +``` |
| 69 | +flet create --template extension --project-name my-control |
| 70 | +``` |
| 71 | + |
| 72 | +A project with new MyControl control will be created. The control is just a Flutter Text widget with a single `text` property. |
| 73 | + |
| 74 | +3. Build your app. |
| 75 | + |
| 76 | +Flet project created from extension template has `examples/my_control_example` folder with the example app. |
| 77 | + |
| 78 | +When in the folder where your `pyproject.toml` for the app is, run `flet build` command, for example, for macOS: |
| 79 | + |
| 80 | +``` |
| 81 | +flet build macos -v |
| 82 | +``` |
| 83 | + |
| 84 | +Run the app and see the new custom Flet Control: |
| 85 | + |
| 86 | +``` |
| 87 | +open build/macos/my-control-example.app |
| 88 | +``` |
| 89 | + |
| 90 | +<img src="/img/blog/extensions/example.png" className="screenshot-30" /> |
| 91 | + |
| 92 | +Read more about how to customise your extension [here](/docs/extend/user-extensions). |
| 93 | + |
| 94 | +## Development environment configuration |
| 95 | + |
| 96 | +To enhance the developer experience with the `flet build` command, Flet 0.26.0 ensures that the correct versions of Flutter SDK, Java (JDK), and Android SDK are installed. If any of these are missing or outdated, it automatically installs them for you. |
| 97 | + |
| 98 | +You still need to install Visual Studio 2022 yourself if you're building a Flet app for Windows, or Xcode if you're building for iOS or macOS. |
| 99 | + |
| 100 | +In the next releases we are going to introduce automatic configuration and startup of Android and iOS emulators. |
| 101 | + |
| 102 | +## Flutter 3.27 |
| 103 | + |
| 104 | +Flet has been migrated to Flutter SDK 3.27. See [this pull request](https://github.com/flet-dev/flet/pull/4703) for new and updated control properties. |
| 105 | + |
| 106 | +## Python 3.9 |
| 107 | + |
| 108 | +Flet 0.26.0 requires Python 3.9 or later. Python 3.8 has reached [EOL](https://devguide.python.org/versions/). |
| 109 | + |
| 110 | +## Other changes |
| 111 | + |
| 112 | +* Optional on-demand creation of `ListView.controls` ([#3931](https://github.com/flet-dev/flet/issues/3931)) |
| 113 | +* Reset `InteractiveViewer` tranformations ([#4391](https://github.com/flet-dev/flet/issues/4391)) |
| 114 | +* Passthrough of mouse events from main window to other applications ([#1438](https://github.com/flet-dev/flet/issues/1438)) |
| 115 | +* Implemented `Window.ignore_mouse_events` ([#4465](https://github.com/flet-dev/flet/pull/4465)) |
| 116 | +* Adding Google/Android TV platform support ([#4581](https://github.com/flet-dev/flet/pull/4581)) |
| 117 | +* Remove `Optional[]` from predefined typing `*Value`s ([#4702](https://github.com/flet-dev/flet/pull/4702)) |
| 118 | +* Throttle `InteractiveViewer` update events ([#4704](https://github.com/flet-dev/flet/pull/4704)) |
| 119 | +* Remove v0.26.0-related deprecations ([#4456](https://github.com/flet-dev/flet/issues/4456)) |
| 120 | + |
| 121 | +## Bug fixes |
| 122 | + |
| 123 | +* Fixed: Update project_dependencies.py ([#4459](https://github.com/flet-dev/flet/pull/4459)) |
| 124 | +* Fixed: `SafeArea` object has no attribute `_SafeArea__minimum` ([#4500](https://github.com/flet-dev/flet/pull/4500)) |
| 125 | +* Fixed: Tooltip corruption in `Segment` and `BarChartRod` on `update()` ([#4525](https://github.com/flet-dev/flet/pull/4525)) |
| 126 | +* Fixed: Setting `CheckBox.border_side.stroke_align` to an Enum fails ([#4526](https://github.com/flet-dev/flet/pull/4526)) |
| 127 | +* Fixed: `ControlState` should be resolved based on user-defined order ([#4556](https://github.com/flet-dev/flet/pull/4556)) |
| 128 | +* Fixed: broken `Dismissible.dismiss_direction` ([#4557](https://github.com/flet-dev/flet/pull/4557)) |
| 129 | +* Fixed: Fix Rive not updating ([#4582](https://github.com/flet-dev/flet/pull/4582)) |
| 130 | +* Fixed: `DatePicker` regression with first and last dates ([#4661](https://github.com/flet-dev/flet/pull/4661)) |
| 131 | +* `flet build` command: Copy `flutter-packages`, support for platform-specific dependencies ([#4667](https://github.com/flet-dev/flet/pull/4667)) |
| 132 | +* Fixed: `CupertinoBottomSheet` applies a red color and yellow underline to `Text` content ([#4673](https://github.com/flet-dev/flet/pull/4673)) |
| 133 | +* Fixed: setting `ButtonTheme` displays a grey screen ([#4731](https://github.com/flet-dev/flet/pull/4731)) |
| 134 | +* Fixed: `Textfield` input border color considers user-specified `border_color` property ([#4735](https://github.com/flet-dev/flet/pull/4735)) |
| 135 | +* Fixed: make `Tooltip.message` a required parameter ([#4736](https://github.com/flet-dev/flet/pull/4736)) |
| 136 | + |
| 137 | +## Conclusion |
| 138 | + |
| 139 | +Upgrade to Flet 0.26.0, test your apps and let us know how you find the new features we added. |
| 140 | + |
| 141 | +If you have any questions, please join [Flet Discord server](https://discord.gg/dzWXP8SHG8) or create a new thread |
| 142 | +on [Flet GitHub discussions](https://github.com/flet-dev/flet/discussions). |
| 143 | + |
| 144 | +Happy Flet-ing! 👾 |
0 commit comments