Skip to content

Commit c5fcfde

Browse files
committed
fix: align example and test with v0.85.0 directory structure
Convert pop_views_until example from single file to subdirectory with main.py + pyproject.toml, matching the new example structure introduced in v0.84.0. Fix flet_app_main references to use module.main format consistent with upstream.
1 parent b674595 commit c5fcfde

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

sdk/python/examples/apps/routing_navigation/pop_views_until.py renamed to sdk/python/examples/apps/routing_navigation/pop_views_until/main.py

File renamed without changes.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[project]
2+
name = "apps-routing-navigation-pop-views-until"
3+
version = "1.0.0"
4+
description = "Pops multiple views from the navigation stack and returns a result to the destination view."
5+
requires-python = ">=3.10"
6+
keywords = ["apps", "routing", "navigation", "pop", "views", "result", "async"]
7+
authors = [{ name = "Flet team", email = "hello@flet.dev" }]
8+
dependencies = ["flet"]
9+
10+
[dependency-groups]
11+
dev = ["flet-cli", "flet-desktop", "flet-web"]
12+
13+
[tool.flet.gallery]
14+
categories = ["Apps/Navigation"]
15+
16+
[tool.flet.metadata]
17+
title = "Pop views until"
18+
controls = ["View", "AppBar", "Button", "Text", "SnackBar"]
19+
layout_pattern = "multi-step-flow"
20+
complexity = "intermediate"
21+
features = ["routing", "view stack", "pop views until", "result passing", "async"]
22+
23+
[tool.flet]
24+
org = "dev.flet"
25+
company = "Flet"
26+
copyright = "Copyright (C) 2023-2026 by Flet"

sdk/python/packages/flet/integration_tests/examples/apps/test_routing_navigation.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
@pytest.mark.parametrize(
1616
"flet_app_function",
17-
[{"flet_app_main": initial_route}],
17+
[{"flet_app_main": initial_route.main}],
1818
indirect=True,
1919
)
2020
@pytest.mark.asyncio(loop_scope="function")
@@ -25,7 +25,7 @@ async def test_initial_route(flet_app_function: ftt.FletTestApp):
2525

2626
@pytest.mark.parametrize(
2727
"flet_app_function",
28-
[{"flet_app_main": route_change_event}],
28+
[{"flet_app_main": route_change_event.main}],
2929
indirect=True,
3030
)
3131
@pytest.mark.asyncio(loop_scope="function")
@@ -40,7 +40,7 @@ async def test_route_change_event(flet_app_function: ftt.FletTestApp):
4040

4141
@pytest.mark.parametrize(
4242
"flet_app_function",
43-
[{"flet_app_main": home_store}],
43+
[{"flet_app_main": home_store.main}],
4444
indirect=True,
4545
)
4646
@pytest.mark.asyncio(loop_scope="function")
@@ -76,7 +76,7 @@ async def test_home_store(flet_app_function: ftt.FletTestApp):
7676

7777
@pytest.mark.parametrize(
7878
"flet_app_function",
79-
[{"flet_app_main": pop_view_confirm}],
79+
[{"flet_app_main": pop_view_confirm.main}],
8080
indirect=True,
8181
)
8282
@pytest.mark.asyncio(loop_scope="function")
@@ -134,7 +134,7 @@ async def test_pop_view_confirm(flet_app_function: ftt.FletTestApp):
134134

135135
@pytest.mark.parametrize(
136136
"flet_app_function",
137-
[{"flet_app_main": drawer_navigation}],
137+
[{"flet_app_main": drawer_navigation.main}],
138138
indirect=True,
139139
)
140140
@pytest.mark.asyncio(loop_scope="function")
@@ -190,7 +190,7 @@ async def test_drawer_navigation(flet_app_function: ftt.FletTestApp):
190190

191191
@pytest.mark.parametrize(
192192
"flet_app_function",
193-
[{"flet_app_main": pop_views_until}],
193+
[{"flet_app_main": pop_views_until.main}],
194194
indirect=True,
195195
)
196196
@pytest.mark.asyncio(loop_scope="function")

0 commit comments

Comments
 (0)