Skip to content

Commit 667bbad

Browse files
FeodorFitsnerndonkoHenriInesaFitsner
authored
Flet 0.26.0 release announcement (#374)
* add example for `Page.get_control()` * remove deprecations * document window.ignore_mouse_events * Added /blog/flet-v-0-26-release-announcement * Update 2025-01-17-flet-v-0-26-release-announcement.md * Update 2025-01-17-flet-v-0-26-release-announcement.md * Update 2025-01-17-flet-v-0-26-release-announcement.md * update blog post - extensions * Update 2025-01-17-flet-v-0-26-release-announcement.md * Update 2025-01-17-flet-v-0-26-release-announcement.md * updated blog * extending flet * user extensions * Snackbar example updated * Update built-in-extensions.md * Update integrating-existing-flutter-packages.md * updated user extension guide * rename to user-extensions * blog updated * user-extensions, blog updated * Update 2025-01-17-flet-v-0-26-release-announcement.md * Prerequisites for all platforms updated * update user-extensions * Flet project structure updated * Update user-extensions.md * update user-extensions * Renamed blog post file * updated blog * Update 2025-01-24-flet-v-0-26-release-announcement.md * Update user-extensions.md * updated built-in extensions * fixed typo * Python 3.8 removed/replaced * Update 2025-01-24-flet-v-0-26-release-announcement.md * Update user-extensions.md * WSL notes in getting started updated * Update user-extensions.md * user extensions * Update user-extensions.md * update * update * getting started updated * Added "uv" section to getting started * updated blog --------- Co-authored-by: ndonkoHenri <[email protected]> Co-authored-by: InesaFitsner <[email protected]>
1 parent b9bb16d commit 667bbad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1503
-1329
lines changed

blog/2022-09-27-user-authentication.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ print(plain_text)
145145
* [`Image.gapless_playback`](/docs/controls/image#gapless_playback)
146146
* [`on_animation_end` callback](/docs/cookbook/animations#animation-end-callback) to chain animations.
147147
* [`Container.clip_behavior` property](/docs/controls/container#clip_behavior).
148-
* [`page.window_bgcolor`](/docs/controls/page#window_bgcolor) to make cool transparent app window:
148+
* [`page.window.bgcolor`](/docs/reference/types/window#bgcolor) to make cool transparent app window:
149149

150150
```python
151151
import flet as ft
@@ -166,7 +166,7 @@ ft.app(target=main)
166166
* `web_popup_window` - set to `True` to display a URL in a browser popup window. Default is `False`.
167167
* `window_width` - optional, popup window width.
168168
* `window_height` - optional, popup window height.
169-
* [`page.window_to_front()`](/docs/controls/page#window_to_front)
169+
* [`page.window.to_front()`](/docs/reference/types/window#to_front)
170170
* [`page.close_in_app_web_view()`](/docs/controls/page#close_in_app_web_view)
171171

172172

blog/2024-06-18-flet-v-0-23-release-announcement.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ solving the remaining ones.
108108
page.window.on_event = lambda e: print(e.type)
109109
```
110110

111-
* [`SafeArea.minimum`](/docs/controls/safearea#minimum) is deprecated and has been renamed
111+
* `SafeArea.minimum` is deprecated and has been renamed
112112
to [`minimum_padding`](/docs/controls/safearea#minimum_padding)
113113
* `MaterialState` enum is deprecated and has been renamed to [`ControlState`](/docs/reference/types/controlstate)
114114
* `NavigationDestination` is deprecated and has been renamed
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
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! 👾

docs/controls/banner.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ The amount of space surrounding the banner.
128128

129129
The value is an instance of [`Margin`](/docs/reference/types/margin) class or a number.
130130

131+
### `min_action_bar_height`
132+
133+
The optional minimum action bar height.
134+
135+
Defaults to `52`.
136+
131137
### `open`
132138

133139
Set to `True` to display a banner.

docs/controls/bottomsheet.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,22 @@ ft.app(main)
4747

4848
## Properties
4949

50+
### `animation_style`
51+
52+
The sheet's animation style.
53+
54+
Value is of type [`AnimationStyle`](/docs/reference/types/animationstyle).
55+
5056
### `bgcolor`
5157

5258
The sheet's background [color](/docs/reference/colors).
5359

60+
### `clip_behavior`
61+
62+
The sheet's clip behavior.
63+
64+
Value is of type [`ClipBehavior`](/docs/reference/types/clipbehavior).
65+
5466
### `content`
5567

5668
The content `Control` of the bottom sheet.
@@ -85,10 +97,22 @@ Set to `True` to display a bottom sheet.
8597

8698
Defaults to `False`.
8799

100+
### `shape`
101+
102+
Defines the shape of the bottom sheet.
103+
104+
Value is of type [`OutlinedBorder`](/docs/reference/types/outlinedborder).
105+
88106
### `show_drag_handle`
89107

90108
Whether to display drag handle at the top of sheet or not.
91109

110+
### `size_constraints`
111+
112+
The size constraints to apply to the bottom sheet.
113+
114+
Value is of type [`BoxConstraints`](/docs/reference/types/boxconstraints).
115+
92116
### `use_safe_area`
93117

94118
Specifies whether the sheet will avoid system intrusions on the top, left, and right.

docs/controls/chip.md

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ True if the control will be selected as the initial focus. If there is more than
114114

115115
### `border_side`
116116

117-
Defines the color and weight of the chip's outline. Value is the instance of [`BorderSide`](/docs/reference/types/borderside) class.
117+
Defines the color and weight of the chip's outline.
118+
119+
Value is of type [`BorderSide`](/docs/reference/types/borderside).
118120

119121
### `check_color`
120122

@@ -134,8 +136,13 @@ Value is of type [`ClipBehavior`](/docs/reference/types/clipbehavior) and defaul
134136

135137
### `color`
136138

137-
The [color](/docs/reference/colors) that fills the chip in various [`ControlState`](/docs/reference/types/controlstate)
138-
s.
139+
The [color](/docs/reference/colors) that fills the chip in various [`ControlState`](/docs/reference/types/controlstate)s.
140+
141+
### `delete_drawer_animation_style`
142+
143+
The animation style for the `delete_icon`'s animations.
144+
145+
Value is of type [`AnimationStyle`](/docs/reference/types/animationstyle).
139146

140147
### `delete_icon_tooltip`
141148

@@ -151,6 +158,13 @@ Defaults to an [`Icon(icons.CANCEL)`](/docs/controls/icon).
151158

152159
[Color](/docs/reference/colors) of the `delete_icon`.
153160

161+
### `delete_icon_size_constraints`
162+
163+
The size constraints for the `delete_icon` control.
164+
When unspecified, it defaults to a minimum size of chip height or label height (whichever is greater) and a padding of 8.0 pixels on all sides.
165+
166+
Value is of type [`BoxConstraints`](/docs/reference/types/boxconstraints).
167+
154168
### `disabled_color`
155169

156170
The [color](/docs/reference/colors) used for the chip's background if it is disabled.
@@ -161,6 +175,12 @@ A non-negative value which defines the size of the shadow below the chip.
161175

162176
Defaults to `0`.
163177

178+
### `enable_animation_style`
179+
180+
The animation style for the enable and disable animations.
181+
182+
Value is of type [`AnimationStyle`](/docs/reference/types/animationstyle).
183+
164184
### `label`
165185

166186
A `Control` that represents primary content of the chip, typically a [`Text`](/docs/controls/text). Label is a required
@@ -186,6 +206,19 @@ A `Control` to display to the left of the chip's `label`.
186206

187207
Typically the leading control is an [`Icon`](/docs/controls/icon) or a [`CircleAvatar`](/docs/controls/circleavatar).
188208

209+
### `leading_drawer_animation_style`
210+
211+
The animation style for the `leading` control's animations.
212+
213+
Value is of type [`AnimationStyle`](/docs/reference/types/animationstyle).
214+
215+
### `leading_size_constraints`
216+
217+
The size constraints for the `leading` control.
218+
When unspecified, it defaults to a minimum size of chip height or label height (whichever is greater) and a padding of 8.0 pixels on all sides.
219+
220+
Value is of type [`BoxConstraints`](/docs/reference/types/boxconstraints).
221+
189222
### `padding`
190223

191224
The padding between the `label` and the outside shape.
@@ -200,6 +233,12 @@ If `on_select` event is specified, `selected` property is used to determine whet
200233

201234
Defaults to `False`.
202235

236+
### `select_animation_style`
237+
238+
The animation style for the select and unselect animations.
239+
240+
Value is of type [`AnimationStyle`](/docs/reference/types/animationstyle).
241+
203242
### `selected_color`
204243

205244
The [color](/docs/reference/colors) used for the chip's background when it is selected.

docs/controls/circleavatar.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,6 @@ ft.app(main)
7474

7575
The source (local asset file or URL) of the background image in the circle. Changing the background image will cause the avatar to animate to the new image. Typically used as a fallback image for `foreground_image_src`. If the CircleAvatar is to have the user's initials, use `content` instead.
7676

77-
### ~~`background_image_url`~~
78-
79-
The source (local asset file or URL) of the background image in the circle. Changing the background image will cause the avatar to animate to the new image. Typically used as a fallback image for `foreground_image_url`. If the CircleAvatar is to have the user's initials, use `content` instead.
80-
81-
**Deprecated (renamed) in v0.22.0 and will be removed in v0.26.0. Use `background_image_src` instead.**
82-
8377
### `bgcolor`
8478

8579
The [color](/docs/reference/colors) with which to fill the circle. Changing the background color will cause the avatar to animate to the new color.
@@ -96,12 +90,6 @@ Typically a `Text` control. If the CircleAvatar is to have an image, use `backgr
9690

9791
The source (local asset file or URL) of the foreground image in the circle. Typically used as profile image. For fallback use `background_image_src`.
9892

99-
### ~~`foreground_image_url`~~
100-
101-
The source (local asset file or URL) of the foreground image in the circle. Typically used as profile image. For fallback use `background_image_url`.
102-
103-
**Deprecated (renamed) in version 0.22.0 and will be removed in v0.26.0. Use `foreground_image_src` instead.**
104-
10593
### `max_radius`
10694

10795
The maximum size of the avatar, expressed as the radius (half the diameter). If maxRadius is specified, then radius must not also be specified. Defaults to "infinity".

docs/controls/column.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,11 +392,21 @@ to `CrossAxisAlignment.START`.
392392

393393
### `on_scroll_interval`
394394

395-
Throttling in milliseconds for `on_scroll` event. Default is `10`.
395+
Throttling in milliseconds for `on_scroll` event.
396+
397+
Defaults to `10`.
396398

397399
### `rtl`
398400

399-
`True` to set text direction to right-to-left. Default is `False`.
401+
`True` to set text direction to right-to-left.
402+
403+
Defaults to `False`.
404+
405+
### `run_alignment`
406+
407+
How the runs should be placed in the cross-axis when `wrap=True`.
408+
409+
Value is of type [`MainAxisAlignment`](/docs/reference/types/mainaxisalignment) and defaults to `MainAxisAlignment.START`.
400410

401411
### `run_spacing`
402412

@@ -410,7 +420,10 @@ Value is of type [`ScrollMode`](/docs/reference/types/scrollmode) and defaults t
410420

411421
### `spacing`
412422

413-
Spacing between controls in a Column. Default value is 10 virtual pixels. Spacing is applied only when `alignment` is set to `start`, `end` or `center`.
423+
Spacing between the `controls`.
424+
It is applied only when `alignment` is set to `MainAxisAlignment.START`, `MainAxisAlignment.END` or `MainAxisAlignment.CENTER`.
425+
426+
Default value is `10` virtual pixels.
414427

415428
### `tight`
416429

docs/controls/cupertinoalertdialog.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,15 @@ If it is also `None`, then `Colors.BLACK_54` is used.
117117

118118
### `content`
119119

120-
The (optional) content of the dialog is displayed in the center of the dialog in a lighter font. Typically this is a [`Column`](/docs/controls/column) that contains the dialog's [`Text`](/docs/controls/text) message.
120+
The (optional) content of the dialog is displayed in the center of the dialog in a lighter font.
121+
122+
Typically this is a [`Column`](/docs/controls/column) that contains the dialog's [`Text`](/docs/controls/text) message.
123+
124+
### `inset_animation`
125+
126+
The animation style to be used when the system keyboard intrudes into the space that the dialog is placed in.
127+
128+
Value is of type [`AnimationStyle`](/docs/reference/types/animationstyle).
121129

122130
### `modal`
123131

0 commit comments

Comments
 (0)