Skip to content

Commit e42e64f

Browse files
Routing and theme fixes for Flet 0.7.2 (#1412)
* Fix: Route change by url is not working if `page.theme` specified Fix #1406 * Make Flutter web debug work again * Added `view=ft.FLET_APP` to `ft.app()` Close #1401 * Flet version 0.7.2
1 parent fcdb2aa commit e42e64f

File tree

13 files changed

+59
-27
lines changed

13 files changed

+59
-27
lines changed

CHANGELOG.md

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

3+
## 0.7.2
4+
5+
* Fix: Route change by url is not working if `page.theme` specified ([#1406](https://github.com/flet-dev/flet/issues/1406)).
6+
* Rollback flutter_svg to 1.1.6 to fix regressions in Plotly charts ([#1402](https://github.com/flet-dev/flet/issues/1402)).
7+
* Force web server in desktop mode with `ft.app(view=ft.FLET_APP_WEB)`.
8+
39
## 0.7.1
410

511
* `ButtonStyle` with `shape` or `side` params failed in flet 0.7.0 ([#1390](https://github.com/flet-dev/flet/issues/1390)).

client/macos/Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ DEPENDENCIES:
2222
- FlutterMacOS (from `Flutter/ephemeral`)
2323
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
2424
- screen_retriever (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos`)
25-
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
25+
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos`)
2626
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
2727
- window_manager (from `Flutter/ephemeral/.symlinks/plugins/window_manager/macos`)
2828
- window_to_front (from `Flutter/ephemeral/.symlinks/plugins/window_to_front/macos`)
@@ -37,7 +37,7 @@ EXTERNAL SOURCES:
3737
screen_retriever:
3838
:path: Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos
3939
shared_preferences_foundation:
40-
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
40+
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos
4141
url_launcher_macos:
4242
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
4343
window_manager:
@@ -50,8 +50,8 @@ SPEC CHECKSUMS:
5050
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
5151
path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8
5252
screen_retriever: 59634572a57080243dd1bf715e55b6c54f241a38
53-
shared_preferences_foundation: e2dae3258e06f44cc55f49d42024fd8dd03c590c
54-
url_launcher_macos: 5335912b679c073563f29d89d33d10d459f95451
53+
shared_preferences_foundation: 297b3ebca31b34ec92be11acd7fb0ba932c822ca
54+
url_launcher_macos: c04e4fa86382d4f94f6b38f14625708be3ae52e2
5555
window_manager: 3a1844359a6295ab1e47659b1a777e36773cd6e8
5656
window_to_front: 4cdc24ddd8461ad1a55fa06286d6a79d8b29e8d8
5757

client/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ packages:
175175
path: "../package"
176176
relative: true
177177
source: path
178-
version: "0.7.1"
178+
version: "0.7.2"
179179
flutter:
180180
dependency: "direct main"
181181
description: flutter

client/web/index.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@
2424
<title>Flet</title>
2525
<link rel="manifest" href="manifest.json">
2626

27-
<!-- flutterWebRenderer -->
27+
<script>
28+
var webRenderer = "auto";
29+
var useColorEmoji = false;
30+
</script>
31+
32+
<!-- webRenderer -->
2833
<!-- useColorEmoji -->
2934

3035
<!-- pyodideCode -->
@@ -105,7 +110,7 @@
105110
}).then(function (engineInitializer) {
106111
loading.classList.add('main_done');
107112
return engineInitializer.initializeEngine({
108-
renderer: flutterWebRenderer,
113+
renderer: webRenderer,
109114
useColorEmoji: useColorEmoji,
110115
});
111116
}).then(function (appRunner) {

package/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.7.2
2+
3+
* Fix: Route change by url is not working if `page.theme` specified ([#1406](https://github.com/flet-dev/flet/issues/1406)).
4+
* Rollback flutter_svg to 1.1.6 to fix regressions in Plotly charts ([#1402](https://github.com/flet-dev/flet/issues/1402)).
5+
* Force web server in desktop mode with `ft.app(view=ft.FLET_APP_WEB)`.
6+
17
## 0.7.1
28

39
* `ButtonStyle` with `shape` or `side` params failed in flet 0.7.0 ([#1390](https://github.com/flet-dev/flet/issues/1390)).

package/lib/src/controls/create_control.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Widget createControl(Control? parent, String id, bool parentDisabled,
107107
globalKey, controlView, parent, parentDisabled, nextChild);
108108

109109
// no theme defined? return widget!
110-
if (controlView.control.attrString("theme") == null) {
110+
if (id == "page" || controlView.control.attrString("theme") == null) {
111111
return widget;
112112
}
113113

package/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: flet
22
description: Write entire Flutter app in Python or add server-driven UI experience into existing Flutter app.
33
homepage: https://flet.dev
44
repository: https://github.com/flet-dev/flet
5-
version: 0.7.1
5+
version: 0.7.2
66

77
# This package supports all platforms listed below.
88
platforms:
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1-
from flet.flet import FLET_APP, FLET_APP_HIDDEN, WEB_BROWSER, app, app_async
1+
from flet.flet import (
2+
FLET_APP,
3+
FLET_APP_HIDDEN,
4+
FLET_APP_WEB,
5+
WEB_BROWSER,
6+
app,
7+
app_async,
8+
)
29
from flet_core import *
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
from flet import utils
2-
from flet.flet import FLET_APP, FLET_APP_HIDDEN, WEB_BROWSER, app, app_async
2+
from flet.flet import (
3+
FLET_APP,
4+
FLET_APP_HIDDEN,
5+
FLET_APP_WEB,
6+
WEB_BROWSER,
7+
app,
8+
app_async,
9+
)
310
from flet.pubsub import PubSub
411
from flet_core import *

sdk/python/packages/flet/src/flet/cli/commands/publish.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,12 @@ def filter_tar(tarinfo: tarfile.TarInfo):
218218
index = index.replace("%FLET_WEB_PYODIDE%", "true")
219219
index = index.replace("<!-- pyodideCode -->", pyodideCode)
220220
index = index.replace(
221-
"<!-- flutterWebRenderer -->",
222-
f'<script>var flutterWebRenderer="{options.web_renderer}";</script>',
221+
"<!-- webRenderer -->",
222+
f'<script>webRenderer="{options.web_renderer}";</script>',
223223
)
224224
index = index.replace(
225225
"<!-- useColorEmoji -->",
226-
f"<script>var useColorEmoji={str(options.use_color_emoji).lower()};</script>",
226+
f"<script>useColorEmoji={str(options.use_color_emoji).lower()};</script>",
227227
)
228228
index = index.replace("%FLET_ROUTE_URL_STRATEGY%", options.route_url_strategy)
229229

0 commit comments

Comments
 (0)