From 99b979d1c8260a8dd20358a1dd1556646e13694c Mon Sep 17 00:00:00 2001 From: ndonkoHenri Date: Mon, 26 Oct 2026 01:16:09 +0100 Subject: [PATCH] Move example `platforms` to [tool.flet.gallery] `[tool.flet].platforms` in the examples isn't a Flet setting: flet build and flet run ignore it. It tells the gallery and the docs which platforms an example supports. Under [tool.flet] it looked like a build setting and was copied into projects created from examples. Move it to [tool.flet.gallery].platforms in the 59 examples that set it, read it from there in the docs generator, and point the create-flet-example-projects skill at the new location. --- .agents/skills/create-flet-example-projects/SKILL.md | 8 ++++---- .../authentication/github_login_same_page/pyproject.toml | 4 +++- .../authentication/github_repos_browser/pyproject.toml | 4 +++- .../apps/declarative/routing_two_pages/pyproject.toml | 2 +- .../examples/apps/router/active_links/pyproject.toml | 2 +- sdk/python/examples/apps/router/app_drawer/pyproject.toml | 2 +- .../examples/apps/router/auth_dialog/pyproject.toml | 2 +- sdk/python/examples/apps/router/auth_page/pyproject.toml | 2 +- .../examples/apps/router/dynamic_segments/pyproject.toml | 2 +- sdk/python/examples/apps/router/featured/pyproject.toml | 2 +- .../examples/apps/router/featured_views/pyproject.toml | 2 +- .../examples/apps/router/index_routes/pyproject.toml | 2 +- .../examples/apps/router/layout_outlet/pyproject.toml | 2 +- sdk/python/examples/apps/router/loaders/pyproject.toml | 2 +- .../examples/apps/router/modal_routes/pyproject.toml | 2 +- .../apps/router/nested_outlet_views/pyproject.toml | 2 +- .../examples/apps/router/nested_routes/pyproject.toml | 2 +- .../examples/apps/router/prefix_routes/pyproject.toml | 2 +- .../examples/apps/router/recursive_routes/pyproject.toml | 2 +- sdk/python/examples/apps/router/routing/pyproject.toml | 2 +- .../examples/apps/router/runtime_routes/pyproject.toml | 2 +- sdk/python/examples/apps/router/splats/pyproject.toml | 2 +- .../building_views_on_route_change/pyproject.toml | 2 +- .../routing_navigation/drawer_navigation/pyproject.toml | 2 +- .../apps/routing_navigation/home_store/pyproject.toml | 2 +- .../apps/routing_navigation/initial_route/pyproject.toml | 2 +- .../routing_navigation/pop_view_confirm/pyproject.toml | 2 +- .../routing_navigation/pop_views_until/pyproject.toml | 2 +- .../routing_navigation/route_change_event/pyproject.toml | 2 +- .../controls/core/column/scroll_events/pyproject.toml | 2 +- .../core/container/handling_hovers/pyproject.toml | 2 +- .../container/page_dark_and_light_themes/pyproject.toml | 2 +- .../core/page/app_exit_confirm_dialog/pyproject.toml | 2 +- .../core/page/window_hidden_on_start/pyproject.toml | 2 +- .../controls/core/page/window_resize/pyproject.toml | 2 +- .../core/window_drag_area/no_frame_window/pyproject.toml | 2 +- .../material/context_menu/triggers/pyproject.toml | 2 +- .../ads/banner_ad_and_interstitial_ad/pyproject.toml | 2 +- sdk/python/examples/extensions/ads/consent/pyproject.toml | 2 +- .../extensions/camera/camera_playground/pyproject.toml | 2 +- .../charts/plotly_chart/plotly_bar_chart/pyproject.toml | 2 +- .../charts/plotly_chart/plotly_box_plot/pyproject.toml | 2 +- .../charts/plotly_chart/plotly_line_chart/pyproject.toml | 2 +- .../charts/plotly_chart/plotly_pie_chart/pyproject.toml | 2 +- .../extensions/flashlight/flashlight/pyproject.toml | 2 +- .../extensions/local_auth/local_auth/pyproject.toml | 2 +- .../permission_handler/permission_handler/pyproject.toml | 2 +- .../extensions/shadcn_ui/context_menu/pyproject.toml | 2 +- .../examples/extensions/web_view/web_view/pyproject.toml | 2 +- .../services/accelerometer/accelerometer/pyproject.toml | 2 +- .../examples/services/barometer/barometer/pyproject.toml | 2 +- .../examples/services/battery/battery/pyproject.toml | 2 +- .../browser_context_menu/pyproject.toml | 2 +- .../services/file_picker/pick_and_upload/pyproject.toml | 2 +- .../examples/services/gyroscope/gyroscope/pyproject.toml | 2 +- .../haptic_feedback/haptic_feedback/pyproject.toml | 2 +- .../services/magnetometer/magnetometer/pyproject.toml | 2 +- .../screen_brightness/screen_brightness/pyproject.toml | 2 +- .../services/shake_detector/shake_detector/pyproject.toml | 2 +- .../user_accelerometer/user_accelerometer/pyproject.toml | 2 +- tools/crocodocs/src/crocodocs/examples.py | 6 ++++-- 61 files changed, 71 insertions(+), 65 deletions(-) diff --git a/.agents/skills/create-flet-example-projects/SKILL.md b/.agents/skills/create-flet-example-projects/SKILL.md index f1c8845bf0..18cdf221d3 100644 --- a/.agents/skills/create-flet-example-projects/SKILL.md +++ b/.agents/skills/create-flet-example-projects/SKILL.md @@ -39,17 +39,17 @@ Ensure each runnable example is a standalone project containing: - Infer from path and code. - Create missing `pyproject.toml` files for existing project folders. - Update obviously stale metadata when migrating existing examples (for example wrong title/description/categories). -- Verify platform support before adding or omitting `[tool.flet].platforms`: +- Verify platform support before adding or omitting `[tool.flet.gallery].platforms`: - Check the local implementation and docs for explicit platform guards, support tables, or platform-specific exceptions. - - If support is limited, add `[tool.flet].platforms` with only the supported platforms. - - If support is broad/all-platform, omit `[tool.flet].platforms`. + - If support is limited, add `[tool.flet.gallery].platforms` with only the supported platforms. + - If support is broad/all-platform, omit `[tool.flet.gallery].platforms`. - Required fields: - `[project]`: `name`, `version`, `description`, `requires-python`, `keywords`, `authors`, `dependencies` - `[dependency-groups].dev`: include `flet-cli`, `flet-desktop`, `flet-web` - `[tool.flet.gallery].categories` - `[tool.flet.metadata]`: `title`, `controls`, `layout_pattern`, `complexity`, `features` - `[tool.flet]`: `org`, `company`, `copyright` -- Add `[tool.flet].platforms` only when the example is platform-limited. +- Add `[tool.flet.gallery].platforms` only when the example is platform-limited. - Add permissions blocks only when code actually needs them. 4. Infer metadata. diff --git a/sdk/python/examples/apps/authentication/github_login_same_page/pyproject.toml b/sdk/python/examples/apps/authentication/github_login_same_page/pyproject.toml index c29ed39ac5..a7ea12e01d 100644 --- a/sdk/python/examples/apps/authentication/github_login_same_page/pyproject.toml +++ b/sdk/python/examples/apps/authentication/github_login_same_page/pyproject.toml @@ -10,6 +10,9 @@ dependencies = ["flet"] [dependency-groups] dev = ["flet-cli", "flet-desktop", "flet-web"] +[tool.flet.gallery] +platforms = ["web"] + [tool.flet.metadata] title = "GitHub login in same page" controls = ["SafeArea", "Column", "Button", "Text", "GitHubOAuthProvider", "UrlLauncher"] @@ -21,4 +24,3 @@ features = ["oauth login", "same-tab redirect"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["web"] diff --git a/sdk/python/examples/apps/authentication/github_repos_browser/pyproject.toml b/sdk/python/examples/apps/authentication/github_repos_browser/pyproject.toml index 6cc838d6f6..180758a856 100644 --- a/sdk/python/examples/apps/authentication/github_repos_browser/pyproject.toml +++ b/sdk/python/examples/apps/authentication/github_repos_browser/pyproject.toml @@ -10,6 +10,9 @@ dependencies = ["flet", "httpx"] [dependency-groups] dev = ["flet-cli", "flet-desktop", "flet-web"] +[tool.flet.gallery] +platforms = ["web"] + [tool.flet.metadata] title = "GitHub repos browser" controls = ["SafeArea", "Column", "Row", "Text", "Button", "ListView", "ListTile", "GitHubOAuthProvider"] @@ -21,4 +24,3 @@ features = ["oauth login", "saved token restore", "github api request"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["web"] diff --git a/sdk/python/examples/apps/declarative/routing_two_pages/pyproject.toml b/sdk/python/examples/apps/declarative/routing_two_pages/pyproject.toml index 8e4d486d60..6fb91679fa 100644 --- a/sdk/python/examples/apps/declarative/routing_two_pages/pyproject.toml +++ b/sdk/python/examples/apps/declarative/routing_two_pages/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Declarative", "Navigation/Routing", "Featured"] +platforms = ["web"] screenshots = ["packages/flet/integration_tests/examples/apps/golden/macos/declarative_routing_two_pages/declarative_routing_two_pages.png"] [tool.flet.metadata] @@ -22,7 +23,6 @@ complexity = "intermediate" features = ["routing", "context", "theme switching"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/router/active_links/pyproject.toml b/sdk/python/examples/apps/router/active_links/pyproject.toml index 30e4628b51..68a7448302 100644 --- a/sdk/python/examples/apps/router/active_links/pyproject.toml +++ b/sdk/python/examples/apps/router/active_links/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Router"] +platforms = ["web"] [tool.flet.metadata] title = "Active links" @@ -21,7 +22,6 @@ complexity = "basic" features = ["is_route_active", "active link styling", "use_route_outlet"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/router/app_drawer/pyproject.toml b/sdk/python/examples/apps/router/app_drawer/pyproject.toml index 55e172cede..aed440680c 100644 --- a/sdk/python/examples/apps/router/app_drawer/pyproject.toml +++ b/sdk/python/examples/apps/router/app_drawer/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Router"] +platforms = ["web"] [tool.flet.metadata] title = "App settings drawer" @@ -21,7 +22,6 @@ complexity = "intermediate" features = ["manage_views", "outlet", "nested routes", "NavigationDrawer", "deep linking", "is_route_active"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/router/auth_dialog/pyproject.toml b/sdk/python/examples/apps/router/auth_dialog/pyproject.toml index fac95ac3ff..3a8c6da31f 100644 --- a/sdk/python/examples/apps/router/auth_dialog/pyproject.toml +++ b/sdk/python/examples/apps/router/auth_dialog/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Router"] +platforms = ["web"] [tool.flet.metadata] title = "Auth dialog" @@ -21,7 +22,6 @@ complexity = "intermediate" features = ["auth guard", "modal dialog", "context", "observable state", "use_effect"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/router/auth_page/pyproject.toml b/sdk/python/examples/apps/router/auth_page/pyproject.toml index 67cd586439..9404e6356f 100644 --- a/sdk/python/examples/apps/router/auth_page/pyproject.toml +++ b/sdk/python/examples/apps/router/auth_page/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Router"] +platforms = ["web"] [tool.flet.metadata] title = "Auth page redirect" @@ -21,7 +22,6 @@ complexity = "intermediate" features = ["auth guard", "route redirect", "context", "observable state"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/router/dynamic_segments/pyproject.toml b/sdk/python/examples/apps/router/dynamic_segments/pyproject.toml index 09d791debe..53eba326a0 100644 --- a/sdk/python/examples/apps/router/dynamic_segments/pyproject.toml +++ b/sdk/python/examples/apps/router/dynamic_segments/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Router"] +platforms = ["web"] [tool.flet.metadata] title = "Dynamic segments" @@ -21,7 +22,6 @@ complexity = "basic" features = ["dynamic segments", "use_route_params", "nested params"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/router/featured/pyproject.toml b/sdk/python/examples/apps/router/featured/pyproject.toml index 7bdf0b1c58..21cb176fc9 100644 --- a/sdk/python/examples/apps/router/featured/pyproject.toml +++ b/sdk/python/examples/apps/router/featured/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Router", "Featured"] +platforms = ["web"] screenshots = ["packages/flet/integration_tests/examples/apps/golden/macos/router/featured_logged_in.png"] [tool.flet.metadata] @@ -22,7 +23,6 @@ complexity = "advanced" features = ["nested routes", "layout outlet", "auth guard", "route loaders", "active links", "dynamic segments", "context", "observable state"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/router/featured_views/pyproject.toml b/sdk/python/examples/apps/router/featured_views/pyproject.toml index cea005c99b..5f19d1c20a 100644 --- a/sdk/python/examples/apps/router/featured_views/pyproject.toml +++ b/sdk/python/examples/apps/router/featured_views/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Router"] +platforms = ["web"] [tool.flet.metadata] title = "Managed views — full app with NavigationRail" @@ -22,7 +23,6 @@ complexity = "intermediate" features = ["manage_views", "outlet", "nested routes", "view stack", "back navigation", "tabs", "is_route_active"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/router/index_routes/pyproject.toml b/sdk/python/examples/apps/router/index_routes/pyproject.toml index 066ded58c2..c21d0accf8 100644 --- a/sdk/python/examples/apps/router/index_routes/pyproject.toml +++ b/sdk/python/examples/apps/router/index_routes/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Router"] +platforms = ["web"] [tool.flet.metadata] title = "Index routes" @@ -21,7 +22,6 @@ complexity = "basic" features = ["index routes", "default child routes"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/router/layout_outlet/pyproject.toml b/sdk/python/examples/apps/router/layout_outlet/pyproject.toml index ef82a25506..f00182b605 100644 --- a/sdk/python/examples/apps/router/layout_outlet/pyproject.toml +++ b/sdk/python/examples/apps/router/layout_outlet/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Router"] +platforms = ["web"] [tool.flet.metadata] title = "Layout outlet" @@ -21,7 +22,6 @@ complexity = "basic" features = ["layout routes", "use_route_outlet", "shared layout"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/router/loaders/pyproject.toml b/sdk/python/examples/apps/router/loaders/pyproject.toml index a79ff8e8c1..a814920520 100644 --- a/sdk/python/examples/apps/router/loaders/pyproject.toml +++ b/sdk/python/examples/apps/router/loaders/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Router"] +platforms = ["web"] [tool.flet.metadata] title = "Route loaders" @@ -21,7 +22,6 @@ complexity = "intermediate" features = ["route loaders", "use_route_loader_data", "use_route_params"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/router/modal_routes/pyproject.toml b/sdk/python/examples/apps/router/modal_routes/pyproject.toml index f44e156d75..0be6ff428d 100644 --- a/sdk/python/examples/apps/router/modal_routes/pyproject.toml +++ b/sdk/python/examples/apps/router/modal_routes/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Router"] +platforms = ["web"] [tool.flet.metadata] title = "Modal routes" @@ -23,7 +24,6 @@ complexity = "intermediate" features = ["modal routes", "fullscreen_dialog", "manage_views", "global modal", "local modal"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/router/nested_outlet_views/pyproject.toml b/sdk/python/examples/apps/router/nested_outlet_views/pyproject.toml index c0cc2fa86c..bc04ef29ca 100644 --- a/sdk/python/examples/apps/router/nested_outlet_views/pyproject.toml +++ b/sdk/python/examples/apps/router/nested_outlet_views/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Router"] +platforms = ["web"] [tool.flet.metadata] title = "Managed views — shared layout with outlet" @@ -22,7 +23,6 @@ complexity = "intermediate" features = ["nested routes", "outlet", "manage_views", "view stack", "back navigation"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/router/nested_routes/pyproject.toml b/sdk/python/examples/apps/router/nested_routes/pyproject.toml index 21f0aa3e65..c08d763f6c 100644 --- a/sdk/python/examples/apps/router/nested_routes/pyproject.toml +++ b/sdk/python/examples/apps/router/nested_routes/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Router"] +platforms = ["web"] [tool.flet.metadata] title = "Managed views — nested routes" @@ -22,7 +23,6 @@ complexity = "basic" features = ["nested routes", "dynamic segments", "use_route_params"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/router/prefix_routes/pyproject.toml b/sdk/python/examples/apps/router/prefix_routes/pyproject.toml index 05d641c95c..8a5b5d5f07 100644 --- a/sdk/python/examples/apps/router/prefix_routes/pyproject.toml +++ b/sdk/python/examples/apps/router/prefix_routes/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Router"] +platforms = ["web"] [tool.flet.metadata] title = "Prefix routes" @@ -21,7 +22,6 @@ complexity = "basic" features = ["pathless layouts", "path-only grouping", "use_route_outlet"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/router/recursive_routes/pyproject.toml b/sdk/python/examples/apps/router/recursive_routes/pyproject.toml index 9e2627eede..b28d185df3 100644 --- a/sdk/python/examples/apps/router/recursive_routes/pyproject.toml +++ b/sdk/python/examples/apps/router/recursive_routes/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Router"] +platforms = ["web"] [tool.flet.metadata] title = "Recursive routes" @@ -22,7 +23,6 @@ complexity = "intermediate" features = ["recursive routes", "use_view_path", "manage_views", "tree URLs"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/router/routing/pyproject.toml b/sdk/python/examples/apps/router/routing/pyproject.toml index 427ff194c9..2b91b16b91 100644 --- a/sdk/python/examples/apps/router/routing/pyproject.toml +++ b/sdk/python/examples/apps/router/routing/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Router"] +platforms = ["web"] [tool.flet.metadata] title = "Routing" @@ -21,7 +22,6 @@ complexity = "basic" features = ["flat routes", "navigation"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/router/runtime_routes/pyproject.toml b/sdk/python/examples/apps/router/runtime_routes/pyproject.toml index 2b58c48674..a7a375d83d 100644 --- a/sdk/python/examples/apps/router/runtime_routes/pyproject.toml +++ b/sdk/python/examples/apps/router/runtime_routes/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Router"] +platforms = ["web"] [tool.flet.metadata] title = "Runtime routes" @@ -21,7 +22,6 @@ complexity = "intermediate" features = ["dynamic routes", "use_state", "add routes", "remove routes"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/router/splats/pyproject.toml b/sdk/python/examples/apps/router/splats/pyproject.toml index f54935d27b..a066d9ccfc 100644 --- a/sdk/python/examples/apps/router/splats/pyproject.toml +++ b/sdk/python/examples/apps/router/splats/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Router"] +platforms = ["web"] [tool.flet.metadata] title = "Splat routes" @@ -21,7 +22,6 @@ complexity = "basic" features = ["catch-all routes", "splat segments", "use_route_params"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/routing_navigation/building_views_on_route_change/pyproject.toml b/sdk/python/examples/apps/routing_navigation/building_views_on_route_change/pyproject.toml index d0bdef7ea8..469043f8c3 100644 --- a/sdk/python/examples/apps/routing_navigation/building_views_on_route_change/pyproject.toml +++ b/sdk/python/examples/apps/routing_navigation/building_views_on_route_change/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Routing"] +platforms = ["web"] [tool.flet.metadata] title = "Building views on route change" @@ -21,7 +22,6 @@ complexity = "basic" features = ["routing", "nested routes", "back navigation"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/routing_navigation/drawer_navigation/pyproject.toml b/sdk/python/examples/apps/routing_navigation/drawer_navigation/pyproject.toml index 91fe6251a0..af75cb8449 100644 --- a/sdk/python/examples/apps/routing_navigation/drawer_navigation/pyproject.toml +++ b/sdk/python/examples/apps/routing_navigation/drawer_navigation/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Routing"] +platforms = ["web"] [tool.flet.metadata] title = "Drawer navigation" @@ -21,7 +22,6 @@ complexity = "basic" features = ["routing", "drawer navigation", "back navigation"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/routing_navigation/home_store/pyproject.toml b/sdk/python/examples/apps/routing_navigation/home_store/pyproject.toml index 4310633156..0240dddf5c 100644 --- a/sdk/python/examples/apps/routing_navigation/home_store/pyproject.toml +++ b/sdk/python/examples/apps/routing_navigation/home_store/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Routing", "Getting Started"] +platforms = ["web"] [tool.flet.metadata] title = "Routing with two pages" @@ -21,7 +22,6 @@ complexity = "basic" features = ["routing", "view stack", "async"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/routing_navigation/initial_route/pyproject.toml b/sdk/python/examples/apps/routing_navigation/initial_route/pyproject.toml index 6e5c54b0ff..a5db0b4572 100644 --- a/sdk/python/examples/apps/routing_navigation/initial_route/pyproject.toml +++ b/sdk/python/examples/apps/routing_navigation/initial_route/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Routing"] +platforms = ["web"] [tool.flet.metadata] title = "Initial route" @@ -21,7 +22,6 @@ complexity = "basic" features = ["routing basics"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/routing_navigation/pop_view_confirm/pyproject.toml b/sdk/python/examples/apps/routing_navigation/pop_view_confirm/pyproject.toml index 2a7dfddc4b..7909a222d7 100644 --- a/sdk/python/examples/apps/routing_navigation/pop_view_confirm/pyproject.toml +++ b/sdk/python/examples/apps/routing_navigation/pop_view_confirm/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Routing"] +platforms = ["web"] [tool.flet.metadata] title = "Pop view confirm" @@ -21,7 +22,6 @@ complexity = "basic" features = ["routing", "confirmation dialog", "back navigation"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/routing_navigation/pop_views_until/pyproject.toml b/sdk/python/examples/apps/routing_navigation/pop_views_until/pyproject.toml index b827479ee5..e40cc19ed5 100644 --- a/sdk/python/examples/apps/routing_navigation/pop_views_until/pyproject.toml +++ b/sdk/python/examples/apps/routing_navigation/pop_views_until/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Routing"] +platforms = ["web"] [tool.flet.metadata] title = "Pop views until" @@ -21,7 +22,6 @@ complexity = "intermediate" features = ["routing", "view stack", "pop views until", "result passing", "async"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/apps/routing_navigation/route_change_event/pyproject.toml b/sdk/python/examples/apps/routing_navigation/route_change_event/pyproject.toml index 4903d55dd5..f684d1b5a4 100644 --- a/sdk/python/examples/apps/routing_navigation/route_change_event/pyproject.toml +++ b/sdk/python/examples/apps/routing_navigation/route_change_event/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Navigation/Routing"] +platforms = ["web"] [tool.flet.metadata] title = "Route change event" @@ -21,7 +22,6 @@ complexity = "basic" features = ["routing basics", "route change event"] [tool.flet] -platforms = ["web"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/controls/core/column/scroll_events/pyproject.toml b/sdk/python/examples/controls/core/column/scroll_events/pyproject.toml index e9efcbdf11..cd0f351337 100644 --- a/sdk/python/examples/controls/core/column/scroll_events/pyproject.toml +++ b/sdk/python/examples/controls/core/column/scroll_events/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Layout/Column"] +platforms = ["web", "macos", "windows", "linux"] [tool.flet.metadata] title = "Column scroll events" @@ -24,4 +25,3 @@ features = ["on_scroll callback", "scroll event inspection"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["web", "macos", "windows", "linux"] diff --git a/sdk/python/examples/controls/core/container/handling_hovers/pyproject.toml b/sdk/python/examples/controls/core/container/handling_hovers/pyproject.toml index aa2d02b6e7..1b9dd065cc 100644 --- a/sdk/python/examples/controls/core/container/handling_hovers/pyproject.toml +++ b/sdk/python/examples/controls/core/container/handling_hovers/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Layout/Container"] +platforms = ["web", "macos", "windows", "linux"] [tool.flet.metadata] title = "Handling hovers" @@ -24,4 +25,3 @@ features = ["hover handling", "dynamic styling"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["web", "macos", "windows", "linux"] diff --git a/sdk/python/examples/controls/core/container/page_dark_and_light_themes/pyproject.toml b/sdk/python/examples/controls/core/container/page_dark_and_light_themes/pyproject.toml index c9fb31d4e1..c0149cfcfa 100644 --- a/sdk/python/examples/controls/core/container/page_dark_and_light_themes/pyproject.toml +++ b/sdk/python/examples/controls/core/container/page_dark_and_light_themes/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Layout/Container"] +platforms = ["web", "macos", "windows", "linux"] [tool.flet.metadata] title = "Page, dark and light themes" @@ -24,4 +25,3 @@ features = ["nested themes", "theme mode override"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["web", "macos", "windows", "linux"] diff --git a/sdk/python/examples/controls/core/page/app_exit_confirm_dialog/pyproject.toml b/sdk/python/examples/controls/core/page/app_exit_confirm_dialog/pyproject.toml index ac7c8d0668..785c342c2d 100644 --- a/sdk/python/examples/controls/core/page/app_exit_confirm_dialog/pyproject.toml +++ b/sdk/python/examples/controls/core/page/app_exit_confirm_dialog/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Pages/Page"] +platforms = ["macos", "windows", "linux"] [tool.flet.metadata] title = "App exit confirm dialog" @@ -21,7 +22,6 @@ complexity = "basic" features = ["window close interception", "confirm dialog"] [tool.flet] -platforms = ["macos", "windows", "linux"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/controls/core/page/window_hidden_on_start/pyproject.toml b/sdk/python/examples/controls/core/page/window_hidden_on_start/pyproject.toml index f6dc3d9e45..9b2c9cd1c9 100644 --- a/sdk/python/examples/controls/core/page/window_hidden_on_start/pyproject.toml +++ b/sdk/python/examples/controls/core/page/window_hidden_on_start/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Pages/Page"] +platforms = ["macos", "windows", "linux"] [tool.flet.metadata] title = "Window hidden on start" @@ -25,7 +26,6 @@ complexity = "basic" features = ["hidden startup", "window configuration"] [tool.flet] -platforms = ["macos", "windows", "linux"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/controls/core/page/window_resize/pyproject.toml b/sdk/python/examples/controls/core/page/window_resize/pyproject.toml index 1d2efd0311..ea6eefbb68 100644 --- a/sdk/python/examples/controls/core/page/window_resize/pyproject.toml +++ b/sdk/python/examples/controls/core/page/window_resize/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Pages/Page"] +platforms = ["macos", "windows", "linux"] [tool.flet.metadata] title = "Window resize" @@ -21,7 +22,6 @@ complexity = "basic" features = ["window geometry", "desktop platform behavior"] [tool.flet] -platforms = ["macos", "windows", "linux"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/controls/core/window_drag_area/no_frame_window/pyproject.toml b/sdk/python/examples/controls/core/window_drag_area/no_frame_window/pyproject.toml index a358ed0a40..b5fe3b3d78 100644 --- a/sdk/python/examples/controls/core/window_drag_area/no_frame_window/pyproject.toml +++ b/sdk/python/examples/controls/core/window_drag_area/no_frame_window/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Layout/Window"] +platforms = ["windows", "macos", "linux"] [tool.flet.metadata] title = "No frame window" @@ -21,7 +22,6 @@ complexity = "basic" features = ["frameless window", "custom window dragging"] [tool.flet] -platforms = ["windows", "macos", "linux"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/controls/material/context_menu/triggers/pyproject.toml b/sdk/python/examples/controls/material/context_menu/triggers/pyproject.toml index 95b7f30149..33e9aac6cc 100644 --- a/sdk/python/examples/controls/material/context_menu/triggers/pyproject.toml +++ b/sdk/python/examples/controls/material/context_menu/triggers/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Input/ContextMenu"] +platforms = ["web", "macos", "windows", "linux"] [tool.flet.metadata] title = "Triggers" @@ -24,4 +25,3 @@ features = ["multi-trigger menus", "item selection callback", "dismiss callback" org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["web", "macos", "windows", "linux"] diff --git a/sdk/python/examples/extensions/ads/banner_ad_and_interstitial_ad/pyproject.toml b/sdk/python/examples/extensions/ads/banner_ad_and_interstitial_ad/pyproject.toml index 6aef403a67..bc55148320 100644 --- a/sdk/python/examples/extensions/ads/banner_ad_and_interstitial_ad/pyproject.toml +++ b/sdk/python/examples/extensions/ads/banner_ad_and_interstitial_ad/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Marketing/Ads"] +platforms = ["ios", "android"] [tool.flet.metadata] title = "BannerAd and InterstitialAd" @@ -21,7 +22,6 @@ complexity = "basic" features = ["banner ad loading", "interstitial ad loading", "ad lifecycle callbacks", "platform-specific ad units"] [tool.flet] -platforms = ["ios", "android"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/extensions/ads/consent/pyproject.toml b/sdk/python/examples/extensions/ads/consent/pyproject.toml index f8f07d63aa..a0d2d94c7d 100644 --- a/sdk/python/examples/extensions/ads/consent/pyproject.toml +++ b/sdk/python/examples/extensions/ads/consent/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Marketing/Ads"] +platforms = ["ios", "android"] [tool.flet.metadata] title = "AdMob Consent (UMP)" @@ -21,7 +22,6 @@ complexity = "basic" features = ["consent gathering", "consent form", "privacy options form", "consent status"] [tool.flet] -platforms = ["ios", "android"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/extensions/camera/camera_playground/pyproject.toml b/sdk/python/examples/extensions/camera/camera_playground/pyproject.toml index f51821a1ff..00cd333762 100644 --- a/sdk/python/examples/extensions/camera/camera_playground/pyproject.toml +++ b/sdk/python/examples/extensions/camera/camera_playground/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Media/Camera"] +platforms = ["web", "ios", "android"] [tool.flet.metadata] title = "Camera playground" @@ -21,7 +22,6 @@ complexity = "advanced" features = ["camera initialization", "photo capture", "video recording", "record pause/resume", "image streaming", "preview pause/resume", "camera state events"] [tool.flet] -platforms = ["web", "ios", "android"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/extensions/charts/plotly_chart/plotly_bar_chart/pyproject.toml b/sdk/python/examples/extensions/charts/plotly_chart/plotly_bar_chart/pyproject.toml index aea5649aa9..50b6d7e0d6 100644 --- a/sdk/python/examples/extensions/charts/plotly_chart/plotly_bar_chart/pyproject.toml +++ b/sdk/python/examples/extensions/charts/plotly_chart/plotly_bar_chart/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Charts/PlotlyChart"] +platforms = ["ios", "android", "macos", "windows", "linux"] [tool.flet.metadata] title = "Plotly bar chart" @@ -22,7 +23,6 @@ complexity = "basic" features = ["chart visualization"] [tool.flet] -platforms = ["ios", "android", "macos", "windows", "linux"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/extensions/charts/plotly_chart/plotly_box_plot/pyproject.toml b/sdk/python/examples/extensions/charts/plotly_chart/plotly_box_plot/pyproject.toml index edc38f3e9f..1a07ac6a41 100644 --- a/sdk/python/examples/extensions/charts/plotly_chart/plotly_box_plot/pyproject.toml +++ b/sdk/python/examples/extensions/charts/plotly_chart/plotly_box_plot/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Charts/PlotlyChart"] +platforms = ["ios", "android", "macos", "windows", "linux"] [tool.flet.metadata] title = "Plotly box plot" @@ -22,7 +23,6 @@ complexity = "basic" features = ["chart visualization"] [tool.flet] -platforms = ["ios", "android", "macos", "windows", "linux"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/extensions/charts/plotly_chart/plotly_line_chart/pyproject.toml b/sdk/python/examples/extensions/charts/plotly_chart/plotly_line_chart/pyproject.toml index 1588468ef1..ffbc88c361 100644 --- a/sdk/python/examples/extensions/charts/plotly_chart/plotly_line_chart/pyproject.toml +++ b/sdk/python/examples/extensions/charts/plotly_chart/plotly_line_chart/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Charts/PlotlyChart"] +platforms = ["ios", "android", "macos", "windows", "linux"] [tool.flet.metadata] title = "Plotly line chart" @@ -22,7 +23,6 @@ complexity = "basic" features = ["chart visualization"] [tool.flet] -platforms = ["ios", "android", "macos", "windows", "linux"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/extensions/charts/plotly_chart/plotly_pie_chart/pyproject.toml b/sdk/python/examples/extensions/charts/plotly_chart/plotly_pie_chart/pyproject.toml index 093d45b75d..2da4be8fcc 100644 --- a/sdk/python/examples/extensions/charts/plotly_chart/plotly_pie_chart/pyproject.toml +++ b/sdk/python/examples/extensions/charts/plotly_chart/plotly_pie_chart/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Charts/PlotlyChart"] +platforms = ["ios", "android", "macos", "windows", "linux"] [tool.flet.metadata] title = "Plotly pie chart" @@ -22,7 +23,6 @@ complexity = "basic" features = ["chart visualization"] [tool.flet] -platforms = ["ios", "android", "macos", "windows", "linux"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/extensions/flashlight/flashlight/pyproject.toml b/sdk/python/examples/extensions/flashlight/flashlight/pyproject.toml index 7fd465bad0..aa5578c178 100644 --- a/sdk/python/examples/extensions/flashlight/flashlight/pyproject.toml +++ b/sdk/python/examples/extensions/flashlight/flashlight/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Utility/Flashlight"] +platforms = ["ios", "android"] [tool.flet.metadata] title = "Flashlight" @@ -24,4 +25,3 @@ features = ["flashlight toggle"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["ios", "android"] diff --git a/sdk/python/examples/extensions/local_auth/local_auth/pyproject.toml b/sdk/python/examples/extensions/local_auth/local_auth/pyproject.toml index a673d37cc3..d4bc75b8f9 100644 --- a/sdk/python/examples/extensions/local_auth/local_auth/pyproject.toml +++ b/sdk/python/examples/extensions/local_auth/local_auth/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Utility/LocalAuthentication"] +platforms = ["ios", "android", "windows", "macos"] [tool.flet.metadata] title = "Local authentication" @@ -24,5 +25,4 @@ features = ["biometric authentication", "device capability checks"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["ios", "android", "windows", "macos"] permissions = ["biometric"] diff --git a/sdk/python/examples/extensions/permission_handler/permission_handler/pyproject.toml b/sdk/python/examples/extensions/permission_handler/permission_handler/pyproject.toml index 92f3625c52..3801432d8d 100644 --- a/sdk/python/examples/extensions/permission_handler/permission_handler/pyproject.toml +++ b/sdk/python/examples/extensions/permission_handler/permission_handler/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Utility/PermissionHandler"] +platforms = ["windows", "ios", "android", "web"] [tool.flet.metadata] title = "Permission Handler" @@ -24,4 +25,3 @@ features = ["permission request", "settings shortcut"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["windows", "ios", "android", "web"] diff --git a/sdk/python/examples/extensions/shadcn_ui/context_menu/pyproject.toml b/sdk/python/examples/extensions/shadcn_ui/context_menu/pyproject.toml index 9b06636847..604732be36 100644 --- a/sdk/python/examples/extensions/shadcn_ui/context_menu/pyproject.toml +++ b/sdk/python/examples/extensions/shadcn_ui/context_menu/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Extensions/Shadcn"] +platforms = ["web", "macos", "windows", "linux"] [tool.flet.metadata] title = "Shadcn ContextMenu" @@ -21,7 +22,6 @@ complexity = "basic" features = ["right click", "submenu", "click handling"] [tool.flet] -platforms = ["web", "macos", "windows", "linux"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/extensions/web_view/web_view/pyproject.toml b/sdk/python/examples/extensions/web_view/web_view/pyproject.toml index 63006432f8..8b316e5ede 100644 --- a/sdk/python/examples/extensions/web_view/web_view/pyproject.toml +++ b/sdk/python/examples/extensions/web_view/web_view/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Display/WebView"] +platforms = ["macos", "ios", "android"] [tool.flet.metadata] title = "WebView" @@ -21,7 +22,6 @@ complexity = "basic" features = ["page lifecycle events"] [tool.flet] -platforms = ["macos", "ios", "android"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" diff --git a/sdk/python/examples/services/accelerometer/accelerometer/pyproject.toml b/sdk/python/examples/services/accelerometer/accelerometer/pyproject.toml index aea05482e0..3c5a3e75e8 100644 --- a/sdk/python/examples/services/accelerometer/accelerometer/pyproject.toml +++ b/sdk/python/examples/services/accelerometer/accelerometer/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Sensors/Accelerometer"] +platforms = ["android", "ios"] [tool.flet.metadata] title = "Accelerometer" @@ -24,7 +25,6 @@ features = ["live sensor readings", "sensor error handling"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["android", "ios"] [tool.flet.ios.info] NSMotionUsageDescription = "This app uses device motion sensors (accelerometer, gyroscope, magnetometer) to demonstrate the Accelerometer control." diff --git a/sdk/python/examples/services/barometer/barometer/pyproject.toml b/sdk/python/examples/services/barometer/barometer/pyproject.toml index d4f8a2cd93..08dee6aac1 100644 --- a/sdk/python/examples/services/barometer/barometer/pyproject.toml +++ b/sdk/python/examples/services/barometer/barometer/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Sensors/Barometer"] +platforms = ["android", "ios"] [tool.flet.metadata] title = "Barometer" @@ -24,7 +25,6 @@ features = ["live sensor readings", "sensor error handling"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["android", "ios"] [tool.flet.ios.info] NSMotionUsageDescription = "This app requires access to the barometer to demonstrate the Barometer control and provide altitude/pressure information." diff --git a/sdk/python/examples/services/battery/battery/pyproject.toml b/sdk/python/examples/services/battery/battery/pyproject.toml index 15ca49d58f..3149b44ff2 100644 --- a/sdk/python/examples/services/battery/battery/pyproject.toml +++ b/sdk/python/examples/services/battery/battery/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Sensors/Battery"] +platforms = ["android", "ios", "windows", "linux", "macos"] [tool.flet.metadata] title = "Battery" @@ -24,4 +25,3 @@ features = ["battery state", "battery saver status"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["android", "ios", "windows", "linux", "macos"] diff --git a/sdk/python/examples/services/browser_context_menu/browser_context_menu/pyproject.toml b/sdk/python/examples/services/browser_context_menu/browser_context_menu/pyproject.toml index 5cc7eb72dd..ff61bbff86 100644 --- a/sdk/python/examples/services/browser_context_menu/browser_context_menu/pyproject.toml +++ b/sdk/python/examples/services/browser_context_menu/browser_context_menu/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Utility/BrowserContextMenu"] +platforms = ["web"] [tool.flet.metadata] title = "Browser context menu" @@ -24,4 +25,3 @@ features = ["web context menu toggle"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["web"] diff --git a/sdk/python/examples/services/file_picker/pick_and_upload/pyproject.toml b/sdk/python/examples/services/file_picker/pick_and_upload/pyproject.toml index 80acb32cfd..cbf2d9694a 100644 --- a/sdk/python/examples/services/file_picker/pick_and_upload/pyproject.toml +++ b/sdk/python/examples/services/file_picker/pick_and_upload/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Utility/FilePicker"] +platforms = ["web"] [tool.flet.metadata] title = "Pick and upload files" @@ -25,4 +26,3 @@ features = ["file upload", "upload progress"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["web"] diff --git a/sdk/python/examples/services/gyroscope/gyroscope/pyproject.toml b/sdk/python/examples/services/gyroscope/gyroscope/pyproject.toml index 6da17b07c1..298d82c3e7 100644 --- a/sdk/python/examples/services/gyroscope/gyroscope/pyproject.toml +++ b/sdk/python/examples/services/gyroscope/gyroscope/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Sensors/Gyroscope"] +platforms = ["android", "ios"] [tool.flet.metadata] title = "Gyroscope" @@ -24,7 +25,6 @@ features = ["live sensor readings", "sensor error handling"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["android", "ios"] [tool.flet.ios.info] NSMotionUsageDescription = "This app uses device motion sensors (accelerometer, gyroscope, magnetometer) to demonstrate the Gyroscope control." diff --git a/sdk/python/examples/services/haptic_feedback/haptic_feedback/pyproject.toml b/sdk/python/examples/services/haptic_feedback/haptic_feedback/pyproject.toml index 9fc5f645bc..53cfa4f73c 100644 --- a/sdk/python/examples/services/haptic_feedback/haptic_feedback/pyproject.toml +++ b/sdk/python/examples/services/haptic_feedback/haptic_feedback/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Sensors/HapticFeedback"] +platforms = ["android", "ios"] [tool.flet.metadata] title = "Haptic feedback" @@ -24,7 +25,6 @@ features = ["haptic feedback"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["android", "ios"] [tool.flet.android.permission] "android.permission.VIBRATE" = true diff --git a/sdk/python/examples/services/magnetometer/magnetometer/pyproject.toml b/sdk/python/examples/services/magnetometer/magnetometer/pyproject.toml index 98b918fff7..69df9f7600 100644 --- a/sdk/python/examples/services/magnetometer/magnetometer/pyproject.toml +++ b/sdk/python/examples/services/magnetometer/magnetometer/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Sensors/Magnetometer"] +platforms = ["android", "ios"] [tool.flet.metadata] title = "Magnetometer" @@ -24,7 +25,6 @@ features = ["live sensor readings", "sensor error handling"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["android", "ios"] [tool.flet.ios.info] NSMotionUsageDescription = "This app uses device motion sensors (accelerometer, gyroscope, magnetometer) to demonstrate the Magnetometer control." diff --git a/sdk/python/examples/services/screen_brightness/screen_brightness/pyproject.toml b/sdk/python/examples/services/screen_brightness/screen_brightness/pyproject.toml index b1da7193d0..cf9c1f9b47 100644 --- a/sdk/python/examples/services/screen_brightness/screen_brightness/pyproject.toml +++ b/sdk/python/examples/services/screen_brightness/screen_brightness/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Utility/ScreenBrightness"] +platforms = ["android", "ios"] [tool.flet.metadata] title = "Screen brightness" @@ -24,4 +25,3 @@ features = ["brightness control", "change events"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["android", "ios"] diff --git a/sdk/python/examples/services/shake_detector/shake_detector/pyproject.toml b/sdk/python/examples/services/shake_detector/shake_detector/pyproject.toml index b8423d9904..575542fc29 100644 --- a/sdk/python/examples/services/shake_detector/shake_detector/pyproject.toml +++ b/sdk/python/examples/services/shake_detector/shake_detector/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Sensors/ShakeDetector"] +platforms = ["android", "ios"] [tool.flet.metadata] title = "Shake detector" @@ -24,7 +25,6 @@ features = ["shake detection"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["android", "ios"] [tool.flet.ios.info] NSMotionUsageDescription = "This app uses device motion sensors (accelerometer, gyroscope, magnetometer) to demonstrate the ShakeDetector control." diff --git a/sdk/python/examples/services/user_accelerometer/user_accelerometer/pyproject.toml b/sdk/python/examples/services/user_accelerometer/user_accelerometer/pyproject.toml index 26f79a11e2..050500c280 100644 --- a/sdk/python/examples/services/user_accelerometer/user_accelerometer/pyproject.toml +++ b/sdk/python/examples/services/user_accelerometer/user_accelerometer/pyproject.toml @@ -12,6 +12,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] [tool.flet.gallery] categories = ["Sensors/UserAccelerometer"] +platforms = ["android", "ios"] [tool.flet.metadata] title = "User accelerometer" @@ -24,7 +25,6 @@ features = ["live sensor readings", "sensor error handling"] org = "dev.flet" company = "Flet" copyright = "Copyright (C) 2023-2026 by Flet" -platforms = ["android", "ios"] [tool.flet.ios.info] NSMotionUsageDescription = "This app uses device motion sensors (accelerometer, gyroscope, magnetometer) to demonstrate the UserAccelerometer control." diff --git a/tools/crocodocs/src/crocodocs/examples.py b/tools/crocodocs/src/crocodocs/examples.py index 8087729f8f..7426aae93e 100644 --- a/tools/crocodocs/src/crocodocs/examples.py +++ b/tools/crocodocs/src/crocodocs/examples.py @@ -61,10 +61,12 @@ def _read_pyproject(pyproject_path: Path) -> dict[str, Any]: def _example_web_supported(pyproject_path: Path) -> bool: """Return True when the example at pyproject_path supports the web platform. - Web is supported when [tool.flet].platforms is absent, empty, or contains "web". + Web is supported when [tool.flet.gallery].platforms is absent, empty, or + contains "web". """ data = _read_pyproject(pyproject_path) - platforms = data.get("tool", {}).get("flet", {}).get("platforms") + flet = data.get("tool", {}).get("flet", {}) + platforms = flet.get("gallery", {}).get("platforms") if not platforms: return True return "web" in platforms