Skip to content

Commit ef3cc5c

Browse files
committed
Squashed commit of the following:
commit 2a1facb Author: Henning Wilmer <[email protected]> Date: Thu Jun 12 18:37:58 2025 +0200 Change the type alias from a class to a real rename (#5258) commit 8f83b45 Author: PythonPan <[email protected]> Date: Fri Jun 13 00:29:49 2025 +0800 Fix page.run_thread does not receive kwargs (#5318) (#5320) commit bf09a2c Author: Antón Fernández Pérez <[email protected]> Date: Wed Jun 11 21:16:41 2025 +0200 Update remove_control_payload.dart (#5353) Android apk app randomly generates this error in logcat: E [ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: type 'Null' is not a subtype of type 'String' #0 new List.from (dart:core-patch/array_patch.dart:30) #1 new RemoveControlPayload.fromJson (package:flet/src/protocol/remove_control_payload.dart:7) #2 appReducer (package:flet/src/reducers.dart:376) #3 Store._createReduceAndNotify.<anonymous closure> (package:redux/src/store.dart:235) #4 Store.dispatch (package:redux/src/store.dart:267) #5 FletServer._onMessage (package:flet/src/flet_server.dart:265) #6 FletTcpSocketServerProtocol._onMessage (package:flet/src/flet_server_protocol_tcp_socket.dart:125) #7 FletTcpSocketServerProtocol.connect.<anonymous closure> (package:flet/src/flet_server_protocol_tcp_socket.dart:94) #8 _RootZone.runUnaryGuarded (dart:async/zone.dart:1778) #9 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381) #10 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:312) #11 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:798) #12 _StreamController._add (dart:async/stream_controller.dart:663) #13 _StreamController.add (dart:async/stream_controller.dart:618) #14 _Socket._onData (dart:io-patch/socket_patch.dart:2904) #15 _RootZone.runUnaryGuarded (dart:async/zone.dart:1778) #16 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381) #17 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:312) #18 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:798) #19 _StreamController._add (dart:async/stream_controller.dart:663) #20 _StreamController.add (dart:async/stream_controller.dart:618) #21 new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:2323) #22 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1646) #23 _microtaskLoop (dart:async/schedule_microtask.dart:40) #24 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49) commit 1c040ef Author: Feodor Fitsner <[email protected]> Date: Sun May 18 20:13:06 2025 -0400 Preparing Flet v0.28.3 release (#5306) * Fix images displaying in web mode with non-empty page name Fix #5198 * Fix page.on_view_pop event handling Fix #5302 * Fix FilePicker.save_file() for Android and iOS Fix #5301 * PubSub: allow multiple subscribers per session, per topic Close #5303 * Bump version to 0.28.3, updated changelog commit 69e4e10 Author: Feodor Fitsner <[email protected]> Date: Sat May 10 13:49:30 2025 -0700 Prepare Flet 0.28.2 (#5295) * Added missing imports into `__init__.py` * Changelog, bumped version to 0.28.2 * fix WindowDragArea * update code in readme * Upated changelog --------- Co-authored-by: ndonkoHenri <[email protected]> commit 7ce8e48 Author: Feodor Fitsner <[email protected]> Date: Thu May 8 12:38:37 2025 -0700 Update .appveyor.yml commit deb38c7 Author: Feodor Fitsner <[email protected]> Date: Thu May 8 09:11:14 2025 -0700 v0.28.0 release notes (#5286) * v0.28.0 release notes * Fix "Fixed:" commit fcc712f Author: Feodor Fitsner <[email protected]> Date: Wed May 7 10:29:03 2025 -0700 `View.can_pop` and `View.on_confirm_pop` (#5284) * View.can_pop and View.on_confirm_pop * Dismissible and View: added 5 minutes timeout for confirm callbacks commit c3d550a Author: Owen McDonnell <[email protected]> Date: Sat May 3 16:41:10 2025 -0700 Update CONTRIBUTING.md (#5268) note about activating .zprofile variables. commit f4b83ae Author: bl1nch <[email protected]> Date: Tue Apr 29 07:31:08 2025 +0600 UTF-8 encoding for pyproject.toml (#5203) commit e3f4d16 Author: Feodor Fitsner <[email protected]> Date: Fri Apr 4 17:17:48 2025 -0700 Update reorderable_list_view.dart commit add9c61 Author: TheEthicalBoy <[email protected]> Date: Sat Apr 5 02:10:23 2025 +0200 feat: custom `ReorderableListView` drag handle listeners (#5051) * initial commit * `ReorderableListView`: mouse_cursor, show_default_drag_handles * generated files * flutter 3.29.0 commit 440009d Author: TheEthicalBoy <[email protected]> Date: Sat Apr 5 02:04:32 2025 +0200 feat: expose events (`on_double_tap`, `on_pan_start`) in `WindowDragArea` (#5043) * improve events typing in gesture_detector.py * window.start_dragging * delete window_drag_area.dart * rework WindowDragArea inheriting from GestureDetector * export more utils
1 parent 553d46e commit ef3cc5c

File tree

9 files changed

+185
-17
lines changed

9 files changed

+185
-17
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ environment:
1212
python_stack: python 3.12
1313
FLUTTER_VERSION: 3.32.4
1414
GITHUB_TOKEN:
15-
secure: 9SKIwc3VSfYJ5IChvNR74hQprJ0DRmcV9pPX+8KyE6IXIdfMsX6ikeUmMhJGRu3ztkZaF45jmU7Xn/6tauXQXhDBxK1N8kFHFSAnq6LjUXyhS0TZKX/H+jDozBeVbCXp
15+
secure: 9SKIwc3VSfYJ5IChvNR74qi9xlUYK71gpBEZQSL4ZiqOEIAultwlQo3tHiHGLS8tz+EQtwMXEoWvw1Bl4y7oImJiH7lPjqo+BZnD7fzj9jwUYdDrP0u/HcmTxLHedH2b
1616
TWINE_USERNAME: __token__
1717
TWINE_PASSWORD:
1818
secure: 174ncAbF5IjSIkmioPt62jeSnzmTlRNchUkE4QdjDWH8xK1olYtySXLJpo2q95HcP7lWJky1hv4APESiRRHnBWoY0XRFafzM/mbCDMzG1tZXiXZmpP1qzHAtRP2QSCIg18xh1TMktraUdTi7sbJnjjRhqzgbW1k0kLBxKw79MPFBhYQ/TiGcmaYWZbWVZNY3HCUCb6Dt7bG1OE2Ul9rD1gvs55xwO9Oq9FOVA1VnMYw=

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@
2525
.DS_Store
2626
*.bkp
2727
.python-version
28-
vendor/
28+
vendor/
29+
/client/android/app/.cxx

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# Flet changelog
22

3+
## 0.28.3
4+
5+
* New: Multiple subscribers can subscribe to a published topic by `send_all_on_topic` ([#5303](https://github.com/flet-dev/flet/issues/5303))
6+
* Fixed: Local Images Not Rendering in Android App using Flet 0.27.6 ([#5198](https://github.com/flet-dev/flet/issues/5198))
7+
* Fixed: FilePicker.save_file() opens blank gray screen in APK build (works fine in VS) ([#5301](https://github.com/flet-dev/flet/issues/5301))
8+
* Fixed: Routing / Navigation broken since flet 0.28.2 ([#5302](https://github.com/flet-dev/flet/issues/5302))
9+
10+
## 0.28.2
11+
12+
* Fixed missing imports in `__init__.py` ([#5292](https://github.com/flet-dev/flet/pull/5292)).
13+
* Fixed: GestureDetector should have at least one event handler defined ([#5293](https://github.com/flet-dev/flet/pull/5293)).
14+
15+
## 0.28.0
16+
17+
* feat(cli): `flet -V` as alternative to `flet --version` ([#4791](https://github.com/flet-dev/flet/pull/4791))
18+
* New Features and Flutter 3.29 ([#4891](https://github.com/flet-dev/flet/issues/4891))
19+
* Fixed: `Dropdown.expand` has no effect ([#5042](https://github.com/flet-dev/flet/pull/5042))
20+
* feat: expose events (`on_double_tap`, `on_pan_start`) in `WindowDragArea` ([#5043](https://github.com/flet-dev/flet/pull/5043))
21+
* feat: custom `ReorderableListView` drag handle listeners ([#5051](https://github.com/flet-dev/flet/pull/5051))
22+
* Fixed: `LineChartDataPoint.tooltip` not properly rendered ([#5105](https://github.com/flet-dev/flet/pull/5105))
23+
* Fixed: broken code in `Page.__on_authorize_async` ([#5154](https://github.com/flet-dev/flet/pull/5154))
24+
* Remove Flet v0.25 deprecations ([#5155](https://github.com/flet-dev/flet/pull/5155))
25+
* Prevent platform back button from popping a route with pop confirmation event ([#5280](https://github.com/flet-dev/flet/issues/5280))
26+
* Fixed: SearchBar does not handle capitalization correctly ([#5014](https://github.com/flet-dev/flet/issues/5014))
27+
* Fixed: `FilePicker` upload fails if original filename is modified ([#5037](https://github.com/flet-dev/flet/issues/5037))
28+
329
## 0.27.6
430

531
* Fix `flet build`: allow dependencies with commas ([#5033](https://github.com/flet-dev/flet/issues/5033))

CONTRIBUTING.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,24 +103,26 @@ Once installed, every time you commit, pre-commit will run the configured hooks
103103

104104
Add the `FLET_VIEW_PATH` and `FLET_WEB_PATH` variables to the environment variables or profile scripts for your respective OS, making sure to modify the path accordingly:
105105

106-
- On macOS (in `~/.zprofile` or any other profile script):
106+
- On macOS (in `~/.zprofile` or any other profile script)*:
107107
```
108108
# Flet
109109
export FLET_VIEW_PATH="$HOME/{path-to-flet}/flet/client/build/macos/Build/Products/Release"
110110
export FLET_WEB_PATH="$HOME/{path-to-flet}/flet/client/build/web"
111111
```
112112

113+
113114
- On Windows (open "System Properties" > "Environment Variables", then add a new environment variable):
114115
- as "Variable name", enter `FLET_VIEW_PATH`, and as "Value", `{path-to-flet}\flet\client\build\windows\x64\runner\Release`
115116
- as "Variable name", enter `FLET_WEB_PATH`, and as "Value", `{path-to-flet}\flet\client\build\web`
116117

117-
- On Linux (in `~/.bash_profile` or any other profile script):
118+
- On Linux (in `~/.bash_profile` or any other profile script)*:
118119
```
119120
# Flet
120121
export FLET_VIEW_PATH="$HOME/{path-to-flet}/flet/client/build/linux/{arch}/release/bundle"
121122
export FLET_WEB_PATH="$HOME/{path-to-flet}/flet/client/build/web"
122123
```
123124

125+
124126
If you have Microsoft Edge installed and want to use it for debugging Flutter apps:
125127

126128
```
@@ -130,6 +132,8 @@ export CHROME_EXECUTABLE="/Applications/Microsoft Edge.app/Contents/MacOS/Micros
130132

131133
If you added these through the terminal, close that terminal session and create a new one.
132134

135+
\* <small>if continuing in the same shell run `source ~/.zprofile` to activate variables in current session</small>
136+
133137
### Building the Flutter client
134138
Open an instance of your IDE (preferably VS Code) at the `flet-dev/flet/client` directory.
135139

@@ -271,4 +275,4 @@ Set PATH:
271275
echo 'export PATH=$HOME/fvm/default/bin:$PATH' >> ~/.zprofile
272276
```
273277

274-
* **cocoapods**: https://guides.cocoapods.org/using/getting-started.html#installation
278+
* **cocoapods**: https://guides.cocoapods.org/using/getting-started.html#installation

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,13 @@ At the moment you can write Flet apps in Python and other languages will be adde
3737
Here is a sample "Counter" app:
3838

3939
```python title="counter.py"
40-
import flet
41-
from flet import IconButton, Page, Row, TextField, icons
40+
import flet as ft
4241

43-
def main(page: Page):
42+
def main(page: ft.Page):
4443
page.title = "Flet counter example"
45-
page.vertical_alignment = "center"
44+
page.vertical_alignment = ft.MainAxisAlignment.CENTER
4645

47-
txt_number = TextField(value="0", text_align="right", width=100)
46+
txt_number = ft.TextField(value="0", text_align=ft.TextAlign.RIGHT, width=100)
4847

4948
def minus_click(e):
5049
txt_number.value = str(int(txt_number.value) - 1)
@@ -55,17 +54,17 @@ def main(page: Page):
5554
page.update()
5655

5756
page.add(
58-
Row(
57+
ft.Row(
5958
[
60-
IconButton(icons.REMOVE, on_click=minus_click),
59+
ft.IconButton(ft.Icons.REMOVE, on_click=minus_click),
6160
txt_number,
62-
IconButton(icons.ADD, on_click=plus_click),
61+
ft.IconButton(ft.Icons.ADD, on_click=plus_click),
6362
],
64-
alignment="center",
63+
alignment=ft.alignment.center,
6564
)
6665
)
6766

68-
flet.app(target=main)
67+
ft.app(main)
6968
```
7069

7170
To run the app install `flet` module:

ci/clean-pypi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# set PYPI_CLEANUP_PASSWORD with pypi.org password
2-
VER="0\.25\.0\.dev"
2+
VER="0\.28\.0\.dev"
33
#VER="0\.21\.1"
44
pypi-cleanup -u flet -p flet -y -r $VER --do-it
55
pypi-cleanup -u flet -p flet-cli -y -r $VER --do-it

ci/whats-new.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$milestone = 12
1+
$milestone = 17
22

33
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
44

packages/flet/CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
# 0.28.3
2+
3+
* Fixed: Local Images Not Rendering in Android App using Flet 0.27.6 ([#5198](https://github.com/flet-dev/flet/issues/5198))
4+
* Fixed: FilePicker.save_file() opens blank gray screen in APK build (works fine in VS) ([#5301](https://github.com/flet-dev/flet/issues/5301))
5+
6+
# 0.28.2
7+
8+
* Fixed missing imports in `__init__.py` ([#5292](https://github.com/flet-dev/flet/pull/5292)).
9+
* Fixed: GestureDetector should have at least one event handler defined ([#5293](https://github.com/flet-dev/flet/pull/5293)).
10+
11+
# 0.28.0
12+
13+
* New Features and Flutter 3.29 ([#4891](https://github.com/flet-dev/flet/issues/4891))
14+
* Fixed: `Dropdown.expand` has no effect ([#5042](https://github.com/flet-dev/flet/pull/5042))
15+
* feat: custom `ReorderableListView` drag handle listeners ([#5051](https://github.com/flet-dev/flet/pull/5051))
16+
* Fixed: `LineChartDataPoint.tooltip` not properly rendered ([#5105](https://github.com/flet-dev/flet/pull/5105))
17+
* Remove Flet v0.25 deprecations ([#5155](https://github.com/flet-dev/flet/pull/5155))
18+
* Prevent platform back button from popping a route with pop confirmation event ([#5280](https://github.com/flet-dev/flet/issues/5280))
19+
* Fixed: SearchBar does not handle capitalization correctly ([#5014](https://github.com/flet-dev/flet/issues/5014))
20+
* Fixed: `FilePicker` upload fails if original filename is modified ([#5037](https://github.com/flet-dev/flet/issues/5037))
21+
122
# 0.27.6
223

324
* Fix `flet build`: allow dependencies with commas ([#5033](https://github.com/flet-dev/flet/issues/5033))
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
from typing import Any, Optional, Union
2+
3+
from flet.core.adaptive_control import AdaptiveControl
4+
from flet.core.animation import AnimationValue
5+
from flet.core.badge import BadgeValue
6+
from flet.core.constrained_control import ConstrainedControl
7+
from flet.core.control import Control, OptionalNumber
8+
from flet.core.ref import Ref
9+
from flet.core.tooltip import TooltipValue
10+
from flet.core.types import (
11+
OffsetValue,
12+
OptionalControlEventCallable,
13+
PaddingValue,
14+
ResponsiveNumber,
15+
RotateValue,
16+
ScaleValue,
17+
)
18+
19+
20+
class ReorderableDraggable(ConstrainedControl, AdaptiveControl):
21+
def __init__(
22+
self,
23+
index: int,
24+
content: Control,
25+
#
26+
# ConstrainedControl
27+
#
28+
ref: Optional[Ref] = None,
29+
key: Optional[str] = None,
30+
width: OptionalNumber = None,
31+
height: OptionalNumber = None,
32+
expand: Union[None, bool, int] = None,
33+
expand_loose: Optional[bool] = None,
34+
col: Optional[ResponsiveNumber] = None,
35+
opacity: OptionalNumber = None,
36+
rotate: Optional[RotateValue] = None,
37+
scale: Optional[ScaleValue] = None,
38+
offset: Optional[OffsetValue] = None,
39+
aspect_ratio: OptionalNumber = None,
40+
animate_opacity: Optional[AnimationValue] = None,
41+
animate_size: Optional[AnimationValue] = None,
42+
animate_position: Optional[AnimationValue] = None,
43+
animate_rotation: Optional[AnimationValue] = None,
44+
animate_scale: Optional[AnimationValue] = None,
45+
animate_offset: Optional[AnimationValue] = None,
46+
on_animation_end: OptionalControlEventCallable = None,
47+
tooltip: Optional[TooltipValue] = None,
48+
visible: Optional[bool] = None,
49+
disabled: Optional[bool] = None,
50+
data: Any = None,
51+
rtl: Optional[bool] = None,
52+
#
53+
# Adaptive
54+
#
55+
adaptive: Optional[bool] = None,
56+
):
57+
ConstrainedControl.__init__(
58+
self,
59+
ref=ref,
60+
key=key,
61+
width=width,
62+
height=height,
63+
expand=expand,
64+
expand_loose=expand_loose,
65+
col=col,
66+
opacity=opacity,
67+
rotate=rotate,
68+
scale=scale,
69+
offset=offset,
70+
aspect_ratio=aspect_ratio,
71+
animate_opacity=animate_opacity,
72+
animate_size=animate_size,
73+
animate_position=animate_position,
74+
animate_rotation=animate_rotation,
75+
animate_scale=animate_scale,
76+
animate_offset=animate_offset,
77+
on_animation_end=on_animation_end,
78+
tooltip=tooltip,
79+
visible=visible,
80+
disabled=disabled,
81+
data=data,
82+
rtl=rtl,
83+
)
84+
85+
AdaptiveControl.__init__(self, adaptive=adaptive)
86+
87+
self.content = content
88+
self.index = index
89+
90+
def _get_control_name(self):
91+
return "reorderabledraggable"
92+
93+
def before_update(self):
94+
super().before_update()
95+
assert self.__content.visible, "content must be visible"
96+
97+
def _get_children(self):
98+
self.__content._set_attr_internal("n", "content")
99+
return [self.__content]
100+
101+
# index
102+
@property
103+
def index(self) -> int:
104+
return self._get_attr("index", data_type="int")
105+
106+
@index.setter
107+
def index(self, value: int):
108+
self._set_attr("index", value)
109+
110+
# content
111+
@property
112+
def content(self) -> Control:
113+
return self.__content
114+
115+
@content.setter
116+
def content(self, value: Control):
117+
self.__content = value

0 commit comments

Comments
 (0)