diff --git a/sdk/python/examples/apps/router/featured_views/pyproject.toml b/sdk/python/examples/apps/router/featured_views/pyproject.toml index 59f4737c11..e5b420a547 100644 --- a/sdk/python/examples/apps/router/featured_views/pyproject.toml +++ b/sdk/python/examples/apps/router/featured_views/pyproject.toml @@ -14,7 +14,8 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Navigation/Router"] [tool.flet.metadata] -title = "Featured views" +title = "Managed views — full app with NavigationRail" +docs_intro = "Complete app with [NavigationRail](navigationrail/index.md), stacked project views, and tabbed settings — all using `manage_views=True`." controls = ["View", "AppBar", "Column", "Row", "Container", "Button", "Switch", "TextField", "Router", "Route"] layout_pattern = "page-navigation" complexity = "intermediate" diff --git a/sdk/python/examples/apps/router/modal_routes/pyproject.toml b/sdk/python/examples/apps/router/modal_routes/pyproject.toml index 6b31bf8804..ed3d47cc8e 100644 --- a/sdk/python/examples/apps/router/modal_routes/pyproject.toml +++ b/sdk/python/examples/apps/router/modal_routes/pyproject.toml @@ -15,6 +15,8 @@ categories = ["Navigation/Router"] [tool.flet.metadata] title = "Modal routes" +docs_intro = """ +Routes marked `modal=True` are rendered as a fullscreen-dialog overlay on top of the previous (non-modal) location's view stack. A *global* modal is declared at the top level (the URL works from anywhere); a *local* modal is declared as a child of a non-modal parent (the URL embeds the parent's segment, so deep-link works without any state).""" controls = ["SafeArea", "Column", "Button", "Text", "TextField", "AppBar", "View", "Router", "Route"] layout_pattern = "page-navigation" complexity = "intermediate" 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 4644b43bf2..8967949b42 100644 --- a/sdk/python/examples/apps/router/nested_outlet_views/pyproject.toml +++ b/sdk/python/examples/apps/router/nested_outlet_views/pyproject.toml @@ -14,7 +14,8 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Navigation/Router"] [tool.flet.metadata] -title = "Nested outlet views" +title = "Managed views — shared layout with outlet" +docs_intro = "A layout route with `outlet=True` wraps child routes in a shared [View](../controls/view.md). Leaf components return regular controls; the layout provides the View." controls = ["View", "AppBar", "Column", "Container", "Button", "Text", "Router", "Route"] layout_pattern = "page-navigation" complexity = "intermediate" diff --git a/sdk/python/examples/apps/router/nested_routes/pyproject.toml b/sdk/python/examples/apps/router/nested_routes/pyproject.toml index d3fd7fd7fe..2ff4c48c37 100644 --- a/sdk/python/examples/apps/router/nested_routes/pyproject.toml +++ b/sdk/python/examples/apps/router/nested_routes/pyproject.toml @@ -14,7 +14,8 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Navigation/Router"] [tool.flet.metadata] -title = "Nested routes" +title = "Managed views — nested routes" +docs_intro = "Each route component returns a [View](../controls/view.md) with its own [AppBar](../controls/appbar.md). Navigating deeper pushes views onto the stack; swipe-back and AppBar back button pop them." controls = ["SafeArea", "Column", "Row", "Button", "Text", "Router", "Route"] layout_pattern = "page-navigation" complexity = "basic" diff --git a/sdk/python/examples/apps/router/recursive_routes/pyproject.toml b/sdk/python/examples/apps/router/recursive_routes/pyproject.toml index df6921e607..42eb8d4e67 100644 --- a/sdk/python/examples/apps/router/recursive_routes/pyproject.toml +++ b/sdk/python/examples/apps/router/recursive_routes/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Navigation/Router"] [tool.flet.metadata] title = "Recursive routes" +docs_intro = "A route marked `recursive=True` can match itself as its own descendant — one View is emitted per consumed URL segment. Use this for tree-shaped URLs with unbounded depth (e.g. a file browser at `/folder/a/b/c`)." controls = ["SafeArea", "Column", "Button", "Text", "TextField", "AppBar", "View", "Router", "Route"] layout_pattern = "page-navigation" complexity = "intermediate" diff --git a/sdk/python/examples/controls/core/column/infinite_scrolling/pyproject.toml b/sdk/python/examples/controls/core/column/infinite_scrolling/pyproject.toml index 943e45b564..99cab7da4f 100644 --- a/sdk/python/examples/controls/core/column/infinite_scrolling/pyproject.toml +++ b/sdk/python/examples/controls/core/column/infinite_scrolling/pyproject.toml @@ -14,7 +14,8 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Layout/Column"] [tool.flet.metadata] -title = "Column infinite scrolling" +title = "Infinite scrolling" +docs_intro = "This example demonstrates adding of list items on-the-fly, as user scroll to the bottom, creating the illusion of infinite list:" controls = ["Container", "Column", "Text"] layout_pattern = "infinite-list" complexity = "basic" diff --git a/sdk/python/examples/controls/core/column/programmatic_scroll/pyproject.toml b/sdk/python/examples/controls/core/column/programmatic_scroll/pyproject.toml index 7a75ab126e..7aa6994cb6 100644 --- a/sdk/python/examples/controls/core/column/programmatic_scroll/pyproject.toml +++ b/sdk/python/examples/controls/core/column/programmatic_scroll/pyproject.toml @@ -14,7 +14,8 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Layout/Column"] [tool.flet.metadata] -title = "Column programmatic scroll" +title = "Scrolling programmatically" +docs_intro = "This example shows how to use [`scroll_to()`](scrollablecontrol.md#flet.ScrollableControl.scroll_to) to programmatically scroll a column:" controls = ["Container", "Column", "Row", "Button", "Text"] layout_pattern = "control-panel" complexity = "basic" diff --git a/sdk/python/examples/controls/core/container/nested_themes_1/pyproject.toml b/sdk/python/examples/controls/core/container/nested_themes_1/pyproject.toml index 73c0393525..c7db272197 100644 --- a/sdk/python/examples/controls/core/container/nested_themes_1/pyproject.toml +++ b/sdk/python/examples/controls/core/container/nested_themes_1/pyproject.toml @@ -14,7 +14,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Layout/Container"] [tool.flet.metadata] -title = "Nested themes 1" +title = "Inherited and overridden theme" controls = ["SafeArea", "Column", "Container", "Button"] layout_pattern = "single-panel" complexity = "basic" diff --git a/sdk/python/examples/controls/core/container/nested_themes_2/pyproject.toml b/sdk/python/examples/controls/core/container/nested_themes_2/pyproject.toml index 9ff856560c..38ddd5c998 100644 --- a/sdk/python/examples/controls/core/container/nested_themes_2/pyproject.toml +++ b/sdk/python/examples/controls/core/container/nested_themes_2/pyproject.toml @@ -14,7 +14,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Layout/Container"] [tool.flet.metadata] -title = "Nested themes 2" +title = "Page, dark and light themes" controls = ["SafeArea", "Column", "Row", "Container", "Button", "TextButton", "Text"] layout_pattern = "stacked-sections" complexity = "basic" diff --git a/sdk/python/examples/controls/core/container/nested_themes_3/pyproject.toml b/sdk/python/examples/controls/core/container/nested_themes_3/pyproject.toml index 78d8336e09..9bf159e6ac 100644 --- a/sdk/python/examples/controls/core/container/nested_themes_3/pyproject.toml +++ b/sdk/python/examples/controls/core/container/nested_themes_3/pyproject.toml @@ -14,7 +14,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Layout/Container"] [tool.flet.metadata] -title = "Nested themes 3" +title = "Theme mode toggle" controls = ["SafeArea", "Column", "Row", "Container", "Button", "Switch"] layout_pattern = "stacked-sections" complexity = "basic" diff --git a/sdk/python/examples/controls/core/dismissible/remove_on_dismiss_declarative/pyproject.toml b/sdk/python/examples/controls/core/dismissible/remove_on_dismiss_declarative/pyproject.toml index a4f3eebd5b..2ccb48ba49 100644 --- a/sdk/python/examples/controls/core/dismissible/remove_on_dismiss_declarative/pyproject.toml +++ b/sdk/python/examples/controls/core/dismissible/remove_on_dismiss_declarative/pyproject.toml @@ -14,7 +14,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Layout/Dismissible"] [tool.flet.metadata] -title = "Remove on dismiss declarative" +title = "Remove `Dismissible` `on_dismiss` inside component" controls = ["SafeArea", "ListView", "Dismissible", "ListTile"] layout_pattern = "list-detail" complexity = "basic" diff --git a/sdk/python/examples/controls/core/gesture_detector/draggable_containers/pyproject.toml b/sdk/python/examples/controls/core/gesture_detector/draggable_containers/pyproject.toml index b412691782..6faee0ec22 100644 --- a/sdk/python/examples/controls/core/gesture_detector/draggable_containers/pyproject.toml +++ b/sdk/python/examples/controls/core/gesture_detector/draggable_containers/pyproject.toml @@ -15,6 +15,10 @@ categories = ["Utility/GestureDetector"] [tool.flet.metadata] title = "Draggable containers" +docs_intro = """ +The following example demonstrates how a control can be freely dragged inside a Stack. + +The sample also shows that GestureDetector can have a child control (blue container) as well as be nested inside another control (yellow container) giving the same results.""" controls = ["SafeArea", "Stack", "Container", "GestureDetector"] layout_pattern = "canvas" complexity = "basic" diff --git a/sdk/python/examples/controls/core/image/gapless_playback/pyproject.toml b/sdk/python/examples/controls/core/image/gapless_playback/pyproject.toml index c2b1ef33b8..c524d7e8d1 100644 --- a/sdk/python/examples/controls/core/image/gapless_playback/pyproject.toml +++ b/sdk/python/examples/controls/core/image/gapless_playback/pyproject.toml @@ -15,6 +15,8 @@ categories = ["Displays/Image"] [tool.flet.metadata] title = "Gapless playback when changing image sources" +docs_intro = """ +This example updates both images to a new network URL on each click. With [`gapless_playback`](image.md#flet.Image.gapless_playback) set to `True`, the previous frame remains visible while the next image loads. With [`gapless_playback`](image.md#flet.Image.gapless_playback) set to `False`, the image area can briefly be empty, causing a flicker/blink effect.""" controls = ["SafeArea", "Column", "Row", "Container", "Text", "Image", "FilledButton", "AppBar"] layout_pattern = "comparison" complexity = "basic" diff --git a/sdk/python/examples/controls/core/page/device_orientation/pyproject.toml b/sdk/python/examples/controls/core/page/device_orientation/pyproject.toml index 3e4a4b5f30..6f0dcf6c8c 100644 --- a/sdk/python/examples/controls/core/page/device_orientation/pyproject.toml +++ b/sdk/python/examples/controls/core/page/device_orientation/pyproject.toml @@ -14,7 +14,8 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Utility/Page"] [tool.flet.metadata] -title = "Device orientation" +title = "Mobile device orientation configuration" +docs_intro = "Shows how to lock your app to specific device orientations (e.g., portrait up, landscape right) and listen for orientation changes on mobile devices." controls = ["SafeArea", "AppBar", "Text", "Column", "Checkbox", "Page"] layout_pattern = "single-panel" complexity = "basic" 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 7b1135659e..f6dc3d9e45 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 @@ -15,6 +15,10 @@ categories = ["Pages/Page"] [tool.flet.metadata] title = "Window hidden on start" +docs_intro = """ +A Flet desktop app (Windows, macOS, or Linux) can start with its window hidden. This lets your app perform initial setup (for example, add content, resize or position the window) before showing it to the user. + +In the example below, the window is resized and centered before becoming visible:""" controls = ["SafeArea", "Column", "Text"] layout_pattern = "single-panel" complexity = "basic" diff --git a/sdk/python/examples/controls/material/chip/assist_chips/pyproject.toml b/sdk/python/examples/controls/material/chip/assist_chips/pyproject.toml index 3f1b5da46d..6e841efe1c 100644 --- a/sdk/python/examples/controls/material/chip/assist_chips/pyproject.toml +++ b/sdk/python/examples/controls/material/chip/assist_chips/pyproject.toml @@ -15,6 +15,12 @@ categories = ["Input/Chip"] [tool.flet.metadata] title = "Assist chips" +docs_intro = """ +Assist chips are chips with [`leading`](chip.md#flet.Chip.leading) icon and [`on_click`](chip.md#flet.Chip.on_click) event specified. + +They represent smart or automated actions that appear dynamically and contextually in a UI. + +An alternative to assist chips are buttons, which should appear persistently and consistently.""" controls = ["SafeArea", "Row", "Chip", "Icon", "Text"] layout_pattern = "inline-actions" complexity = "basic" diff --git a/sdk/python/examples/controls/material/chip/filter_chips/pyproject.toml b/sdk/python/examples/controls/material/chip/filter_chips/pyproject.toml index d0c2aea954..1a575cb8c9 100644 --- a/sdk/python/examples/controls/material/chip/filter_chips/pyproject.toml +++ b/sdk/python/examples/controls/material/chip/filter_chips/pyproject.toml @@ -15,6 +15,10 @@ categories = ["Input/Chip"] [tool.flet.metadata] title = "Filter chips" +docs_intro = """ +Filter chips are chips with [`on_select`](chip.md#flet.Chip.on_select) event specified. + +They use tags or descriptive words provided in the [`label`](chip.md#flet.Chip.label) to filter content. They can be a good alternative to switches or checkboxes.""" controls = ["SafeArea", "Column", "Row", "Chip", "Icon", "Text"] layout_pattern = "filter-bar" complexity = "basic" diff --git a/sdk/python/examples/controls/material/data_table/adaptive_row_heights/pyproject.toml b/sdk/python/examples/controls/material/data_table/adaptive_row_heights/pyproject.toml index 819ec0f036..ab5674fdbe 100644 --- a/sdk/python/examples/controls/material/data_table/adaptive_row_heights/pyproject.toml +++ b/sdk/python/examples/controls/material/data_table/adaptive_row_heights/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Layout/DataTable"] [tool.flet.metadata] title = "Adaptive row heights" +docs_intro = "Setting [`data_row_max_height`](index.md#flet.DataTable.data_row_max_height) to `float('inf')` (infinity) will cause the `DataTable` to let each individual row adapt its height to its respective content, instead of all rows having the same height." controls = ["SafeArea", "DataTable", "DataColumn", "DataRow", "DataCell"] layout_pattern = "table-view" complexity = "basic" diff --git a/sdk/python/examples/controls/material/data_table/sortable_and_selectable/pyproject.toml b/sdk/python/examples/controls/material/data_table/sortable_and_selectable/pyproject.toml index 5a6031e82c..0c5e3df9e4 100644 --- a/sdk/python/examples/controls/material/data_table/sortable_and_selectable/pyproject.toml +++ b/sdk/python/examples/controls/material/data_table/sortable_and_selectable/pyproject.toml @@ -14,7 +14,8 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Layout/DataTable"] [tool.flet.metadata] -title = "Sortable and selectable" +title = "Sortable columns and selectable rows" +docs_intro = "This example demonstrates row selection (including select-all), sortable string and numeric columns, and stable selection across sorts and refreshes." controls = ["SafeArea", "DataTable", "DataColumn", "DataRow", "DataCell", "Text"] layout_pattern = "table-view" complexity = "intermediate" diff --git a/sdk/python/examples/controls/material/data_table/spacing/pyproject.toml b/sdk/python/examples/controls/material/data_table/spacing/pyproject.toml index cb2d259a87..ff376cc5bc 100644 --- a/sdk/python/examples/controls/material/data_table/spacing/pyproject.toml +++ b/sdk/python/examples/controls/material/data_table/spacing/pyproject.toml @@ -14,7 +14,8 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Layout/DataTable"] [tool.flet.metadata] -title = "Spacing" +title = "Horizontal margin and column spacing" +docs_intro = "Use [`horizontal_margin`](index.md#flet.DataTable.horizontal_margin) to control the left and right edge spacing of the first and last columns. Use [`column_spacing`](index.md#flet.DataTable.column_spacing) to control spacing between columns." controls = ["SafeArea", "Column", "DataTable", "DataColumn", "DataRow", "DataCell", "Slider", "FilledButton", "OutlinedButton", "Container", "Text", "AppBar"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/controls/material/expansion_panel_list/scrollable/pyproject.toml b/sdk/python/examples/controls/material/expansion_panel_list/scrollable/pyproject.toml index 0545271517..df79fc2564 100644 --- a/sdk/python/examples/controls/material/expansion_panel_list/scrollable/pyproject.toml +++ b/sdk/python/examples/controls/material/expansion_panel_list/scrollable/pyproject.toml @@ -14,7 +14,8 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Layout/ExpansionPanelList"] [tool.flet.metadata] -title = "Scrollable" +title = "Scrolling" +docs_intro = "`ExpansionPanelList` supports scrolling through its [`scroll`](expansionpanellist.md) property." controls = ["SafeArea", "ExpansionPanelList", "ExpansionPanel", "ListTile", "IconButton", "Text"] layout_pattern = "list-detail" complexity = "basic" diff --git a/sdk/python/examples/controls/material/navigation_drawer/adaptive_navigation/pyproject.toml b/sdk/python/examples/controls/material/navigation_drawer/adaptive_navigation/pyproject.toml index a9545c7511..e5b68d4e47 100644 --- a/sdk/python/examples/controls/material/navigation_drawer/adaptive_navigation/pyproject.toml +++ b/sdk/python/examples/controls/material/navigation_drawer/adaptive_navigation/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Navigation/NavigationDrawer"] [tool.flet.metadata] title = "Adaptive Navigation" +docs_intro = "This example switches between a `NavigationBar` on narrow layouts and a [`NavigationRail`](../navigationrail/index.md) with an end [`NavigationDrawer`](../navigationdrawer/index.md) on wider layouts." controls = ["NavigationDrawer", "NavigationDrawerDestination", "NavigationRail", "NavigationRailDestination", "NavigationBar", "NavigationBarDestination", "Button", "SafeArea", "Container", "Row", "Column", "VerticalDivider", "Text", "Page"] layout_pattern = "adaptive-navigation" complexity = "intermediate" diff --git a/sdk/python/examples/controls/material/reorderable_drag_handle/basic/pyproject.toml b/sdk/python/examples/controls/material/reorderable_drag_handle/basic/pyproject.toml index 213597586e..9bdb5844d2 100644 --- a/sdk/python/examples/controls/material/reorderable_drag_handle/basic/pyproject.toml +++ b/sdk/python/examples/controls/material/reorderable_drag_handle/basic/pyproject.toml @@ -14,7 +14,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Input/Reorderable"] [tool.flet.metadata] -title = "ReorderableDragHandle" +title = "Custom drag handle" controls = ["ReorderableListView", "ReorderableDragHandle", "ListTile", "SafeArea"] layout_pattern = "draggable-list" complexity = "basic" diff --git a/sdk/python/examples/extensions/charts/matplotlib_chart/bar_chart/pyproject.toml b/sdk/python/examples/extensions/charts/matplotlib_chart/bar_chart/pyproject.toml index e926721e7c..f302ef8ee8 100644 --- a/sdk/python/examples/extensions/charts/matplotlib_chart/bar_chart/pyproject.toml +++ b/sdk/python/examples/extensions/charts/matplotlib_chart/bar_chart/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Charts/MatplotlibChart"] [tool.flet.metadata] title = "Bar Chart" +docs_intro = "Based on an official [Matplotlib example](https://matplotlib.org/stable/gallery/lines_bars_and_markers/bar_colors.html#sphx-glr-gallery-lines-bars-and-markers-bar-colors-py)." controls = ["SafeArea", "MatplotlibChart"] layout_pattern = "single-chart" complexity = "basic" diff --git a/sdk/python/examples/extensions/charts/matplotlib_chart/toolbar/pyproject.toml b/sdk/python/examples/extensions/charts/matplotlib_chart/toolbar/pyproject.toml index d2ba114e9e..7dd7602b46 100644 --- a/sdk/python/examples/extensions/charts/matplotlib_chart/toolbar/pyproject.toml +++ b/sdk/python/examples/extensions/charts/matplotlib_chart/toolbar/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Charts/MatplotlibChart"] [tool.flet.metadata] title = "Toolbar" +docs_intro = "Based on an official [Matplotlib example](https://matplotlib.org/stable/gallery/lines_bars_and_markers/cohere.html#sphx-glr-gallery-lines-bars-and-markers-cohere-py)." controls = ["SafeArea", "MatplotlibChart"] layout_pattern = "single-chart" complexity = "basic" diff --git a/sdk/python/examples/extensions/charts/plotly_chart/example_1/pyproject.toml b/sdk/python/examples/extensions/charts/plotly_chart/example_1/pyproject.toml index 2806044857..ee3a10a67a 100644 --- a/sdk/python/examples/extensions/charts/plotly_chart/example_1/pyproject.toml +++ b/sdk/python/examples/extensions/charts/plotly_chart/example_1/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Charts/PlotlyChart"] [tool.flet.metadata] title = "Plotly line chart" +docs_intro = "Based on an official [Plotly example](https://plotly.com/python/line-charts)." controls = ["SafeArea", "PlotlyChart"] layout_pattern = "single-chart" complexity = "basic" diff --git a/sdk/python/examples/extensions/charts/plotly_chart/example_2/pyproject.toml b/sdk/python/examples/extensions/charts/plotly_chart/example_2/pyproject.toml index 6d3a8110a5..2124e2af13 100644 --- a/sdk/python/examples/extensions/charts/plotly_chart/example_2/pyproject.toml +++ b/sdk/python/examples/extensions/charts/plotly_chart/example_2/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Charts/PlotlyChart"] [tool.flet.metadata] title = "Plotly bar chart" +docs_intro = "Based on an official [Plotly example](https://plotly.com/python/bar-charts)." controls = ["SafeArea", "PlotlyChart"] layout_pattern = "single-chart" complexity = "basic" diff --git a/sdk/python/examples/extensions/charts/plotly_chart/example_3/pyproject.toml b/sdk/python/examples/extensions/charts/plotly_chart/example_3/pyproject.toml index d25200d0f5..738d8add53 100644 --- a/sdk/python/examples/extensions/charts/plotly_chart/example_3/pyproject.toml +++ b/sdk/python/examples/extensions/charts/plotly_chart/example_3/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Charts/PlotlyChart"] [tool.flet.metadata] title = "Plotly pie chart" +docs_intro = "Based on an official [Plotly example](https://plotly.com/python/pie-charts)." controls = ["SafeArea", "PlotlyChart"] layout_pattern = "single-chart" complexity = "basic" diff --git a/sdk/python/examples/extensions/charts/plotly_chart/example_4/pyproject.toml b/sdk/python/examples/extensions/charts/plotly_chart/example_4/pyproject.toml index c9de9a7ed4..43be70f713 100644 --- a/sdk/python/examples/extensions/charts/plotly_chart/example_4/pyproject.toml +++ b/sdk/python/examples/extensions/charts/plotly_chart/example_4/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Charts/PlotlyChart"] [tool.flet.metadata] title = "Plotly box plot" +docs_intro = "Based on an official [Plotly example](https://plotly.com/python/box-plots)." controls = ["SafeArea", "PlotlyChart"] layout_pattern = "single-chart" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/button_bars/pyproject.toml b/sdk/python/examples/extensions/video/button_bars/pyproject.toml index 0453573ccc..e46b75a750 100644 --- a/sdk/python/examples/extensions/video/button_bars/pyproject.toml +++ b/sdk/python/examples/extensions/video/button_bars/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Button bars" +docs_intro = "Customize the [`primary_button_bar`][flet_video.MaterialDesktopVideoControls.primary_button_bar], [`top_button_bar`][flet_video.MaterialDesktopVideoControls.top_button_bar], and [`bottom_button_bar`][flet_video.MaterialDesktopVideoControls.bottom_button_bar] of [`MaterialDesktopVideoControls`][flet_video.MaterialDesktopVideoControls] with built-in and custom items." controls = ["SafeArea", "Text", "Icon", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/controls/pyproject.toml b/sdk/python/examples/extensions/video/controls/pyproject.toml index a924227726..faa21a3eca 100644 --- a/sdk/python/examples/extensions/video/controls/pyproject.toml +++ b/sdk/python/examples/extensions/video/controls/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Controls" +docs_intro = "Switch between [`AdaptiveVideoControls`][flet_video.AdaptiveVideoControls], [`MaterialVideoControls`][flet_video.MaterialVideoControls], [`MaterialDesktopVideoControls`][flet_video.MaterialDesktopVideoControls], custom, and hidden control sets at runtime." controls = ["SafeArea", "Column", "Row", "Button", "IconButton", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/controls_mode/pyproject.toml b/sdk/python/examples/extensions/video/controls_mode/pyproject.toml index fbc5249288..e2e95f6a18 100644 --- a/sdk/python/examples/extensions/video/controls_mode/pyproject.toml +++ b/sdk/python/examples/extensions/video/controls_mode/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Mode-specific controls" +docs_intro = "Show different controls in normal vs. fullscreen mode by mapping each [`VideoControlsMode`][flet_video.VideoControlsMode] to its own [`controls`][flet_video.Video.controls] value." controls = ["SafeArea", "Container", "Text", "Video"] layout_pattern = "single-panel" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/events/pyproject.toml b/sdk/python/examples/extensions/video/events/pyproject.toml index 23ba44d8dc..8d694e602f 100644 --- a/sdk/python/examples/extensions/video/events/pyproject.toml +++ b/sdk/python/examples/extensions/video/events/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Events" +docs_intro = "Listen for player [events](#flet_video.Video-events) like [`on_load`][flet_video.Video.on_load], [`on_complete`][flet_video.Video.on_complete], [`on_track_change`][flet_video.Video.on_track_change], etc." controls = ["SafeArea", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/playback/pyproject.toml b/sdk/python/examples/extensions/video/playback/pyproject.toml index 2f1217f1e2..ff538fb642 100644 --- a/sdk/python/examples/extensions/video/playback/pyproject.toml +++ b/sdk/python/examples/extensions/video/playback/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Playback Controls" +docs_intro = "Drive playback programmatically with methods like [`play()`][flet_video.Video.play], [`pause()`][flet_video.Video.pause], [`stop()`][flet_video.Video.stop], [`seek()`][flet_video.Video.seek], [`next()`][flet_video.Video.next], and [`previous()`][flet_video.Video.previous], and inspect status with methods like [`is_playing()`][flet_video.Video.is_playing], [`get_current_position()`][flet_video.Video.get_current_position], and [`get_duration()`][flet_video.Video.get_duration]." controls = ["SafeArea", "Column", "Row", "Button", "Text", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/playlist/pyproject.toml b/sdk/python/examples/extensions/video/playlist/pyproject.toml index 15ebcbfa45..f18e507081 100644 --- a/sdk/python/examples/extensions/video/playlist/pyproject.toml +++ b/sdk/python/examples/extensions/video/playlist/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Playlist" +docs_intro = "Mutate [`playlist`][flet_video.Video.playlist] directly to add, remove, or replace items, and navigate between tracks." controls = ["SafeArea", "Column", "Row", "Button", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/screenshot/pyproject.toml b/sdk/python/examples/extensions/video/screenshot/pyproject.toml index 691296c054..977fc9a8bc 100644 --- a/sdk/python/examples/extensions/video/screenshot/pyproject.toml +++ b/sdk/python/examples/extensions/video/screenshot/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Video Screenshot" +docs_intro = "Shows how to capture the current video frame with [`take_screenshot()`][flet_video.Video.take_screenshot] and display it as an image." controls = ["SafeArea", "Column", "Row", "Button", "Container", "Image", "Text", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/video/subtitles/pyproject.toml b/sdk/python/examples/extensions/video/subtitles/pyproject.toml index 2da50ee4ea..aba42aaec4 100644 --- a/sdk/python/examples/extensions/video/subtitles/pyproject.toml +++ b/sdk/python/examples/extensions/video/subtitles/pyproject.toml @@ -15,6 +15,7 @@ categories = ["Media/Video"] [tool.flet.metadata] title = "Subtitles" +docs_intro = "Attach a [`VideoSubtitleTrack`][flet_video.VideoSubtitleTrack] (here, raw VTT text) and customize its appearance with [`VideoSubtitleConfiguration`][flet_video.VideoSubtitleConfiguration]." controls = ["SafeArea", "Column", "Switch", "Video"] layout_pattern = "dashboard" complexity = "basic" diff --git a/sdk/python/examples/extensions/webview/example_1/pyproject.toml b/sdk/python/examples/extensions/webview/example_1/pyproject.toml index a2dffc3a8b..98c306a5d8 100644 --- a/sdk/python/examples/extensions/webview/example_1/pyproject.toml +++ b/sdk/python/examples/extensions/webview/example_1/pyproject.toml @@ -14,7 +14,7 @@ dev = ["flet-cli", "flet-desktop", "flet-web"] categories = ["Display/WebView"] [tool.flet.metadata] -title = "WebView example 1" +title = "WebView" controls = ["SafeArea", "WebView"] layout_pattern = "single-panel" complexity = "basic" diff --git a/sdk/python/packages/flet/src/flet/controls/material/radio_group.py b/sdk/python/packages/flet/src/flet/controls/material/radio_group.py index 8bd9eaec5b..d6a6bd5459 100644 --- a/sdk/python/packages/flet/src/flet/controls/material/radio_group.py +++ b/sdk/python/packages/flet/src/flet/controls/material/radio_group.py @@ -21,8 +21,8 @@ class RadioGroup(Control): """ The content of the RadioGroup. - Typically a list of `Radio` controls nested in a container control, e.g. `Column`, - `Row`. + Typically a list of :class:`~flet.Radio` controls nested in a container control, + e.g. `Column`, `Row`. Raises: ValueError: If :attr:`content` is not visible. diff --git a/tools/crocodocs/src/crocodocs/generate.py b/tools/crocodocs/src/crocodocs/generate.py index aa38e22907..e73e701374 100644 --- a/tools/crocodocs/src/crocodocs/generate.py +++ b/tools/crocodocs/src/crocodocs/generate.py @@ -148,15 +148,19 @@ def _generate_code_examples(examples_root: Path, output_path: Path) -> int: return len(mapping) +def _read_pyproject(pyproject_path: Path) -> dict[str, Any]: + try: + return tomllib.loads(pyproject_path.read_text(encoding="utf-8")) + except (OSError, ValueError): + return {} + + 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". """ - try: - data = tomllib.loads(pyproject_path.read_text(encoding="utf-8")) - except (OSError, ValueError): - return True + data = _read_pyproject(pyproject_path) platforms = data.get("tool", {}).get("flet", {}).get("platforms") if not platforms: return True @@ -183,7 +187,14 @@ def _generate_examples_metadata(examples_root: Path, output_path: Path) -> int: if example_dir == examples_root: continue relative = example_dir.relative_to(examples_root).as_posix() - mapping[relative] = {"webSupported": _example_web_supported(pyproject_path)} + data = _read_pyproject(pyproject_path) + meta: dict[str, Any] = {"webSupported": _example_web_supported(pyproject_path)} + flet_metadata = data.get("tool", {}).get("flet", {}).get("metadata", {}) + if title := flet_metadata.get("title"): + meta["title"] = title + if docs_intro := flet_metadata.get("docs_intro"): + meta["docs_intro"] = docs_intro + mapping[relative] = meta output_path.write_text( json.dumps(mapping, indent=2, sort_keys=True), encoding="utf-8" diff --git a/website/docs/controls/ads/bannerad.md b/website/docs/controls/ads/bannerad.md index d91c3b16d3..68e5fc3636 100644 --- a/website/docs/controls/ads/bannerad.md +++ b/website/docs/controls/ads/bannerad.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Example 1 - diff --git a/website/docs/controls/ads/interstitialad.md b/website/docs/controls/ads/interstitialad.md index 8e559976a9..d23579e260 100644 --- a/website/docs/controls/ads/interstitialad.md +++ b/website/docs/controls/ads/interstitialad.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Example 1 - diff --git a/website/docs/controls/alertdialog.md b/website/docs/controls/alertdialog.md index 97491df20c..6ab8ba267b 100644 --- a/website/docs/controls/alertdialog.md +++ b/website/docs/controls/alertdialog.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Modal and non-modal dialogs - Modal and non-modal dialogs diff --git a/website/docs/controls/animatedswitcher.md b/website/docs/controls/animatedswitcher.md index 3e1680fc4a..e2b873b700 100644 --- a/website/docs/controls/animatedswitcher.md +++ b/website/docs/controls/animatedswitcher.md @@ -11,18 +11,12 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Animated switching between two containers with scale effect - scale-effect -### Animate Image switch - -### Animate Image switch buffered - diff --git a/website/docs/controls/appbar.md b/website/docs/controls/appbar.md index 563dcc14ef..0ca0940ad8 100644 --- a/website/docs/controls/appbar.md +++ b/website/docs/controls/appbar.md @@ -12,14 +12,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Actions and Popup Menu - actions-and-popup-menu -### Theme and Material Mode Toggles - theme-and-material-mode-toggles diff --git a/website/docs/controls/autocomplete.md b/website/docs/controls/autocomplete.md index bbe577c467..f90f788238 100644 --- a/website/docs/controls/autocomplete.md +++ b/website/docs/controls/autocomplete.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### AutoComplete - auto-complete-basic-example diff --git a/website/docs/controls/autofillgroup.md b/website/docs/controls/autofillgroup.md index 2cccc83441..1de1cfa077 100644 --- a/website/docs/controls/autofillgroup.md +++ b/website/docs/controls/autofillgroup.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### AutofillGroup - basic diff --git a/website/docs/controls/banner.md b/website/docs/controls/banner.md index ad24a3175a..a5e67a6039 100644 --- a/website/docs/controls/banner.md +++ b/website/docs/controls/banner.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Banner - basic diff --git a/website/docs/controls/bottomappbar.md b/website/docs/controls/bottomappbar.md index 4a92dc7223..1c748d0e6f 100644 --- a/website/docs/controls/bottomappbar.md +++ b/website/docs/controls/bottomappbar.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Notched `FloatingActionButton` - -### Custom border radius - diff --git a/website/docs/controls/bottomsheet.md b/website/docs/controls/bottomsheet.md index a8b3d4451d..fbc1f537fd 100644 --- a/website/docs/controls/bottomsheet.md +++ b/website/docs/controls/bottomsheet.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### BottomSheet - -### Fullscreen - diff --git a/website/docs/controls/button.md b/website/docs/controls/button.md index 0fcdc91915..ed05b75ae9 100644 --- a/website/docs/controls/button.md +++ b/website/docs/controls/button.md @@ -11,46 +11,32 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Button - Basic button -### Icons - Basic button -### Handling clicks - Handling clicks -### Custom content - Buttons with custom content -### Shapes - Buttons with different shapes -### Styling - Styled button - default state Styled button - hovered state -### Animate on hover - Unhovered button diff --git a/website/docs/controls/canvas/index.md b/website/docs/controls/canvas/index.md index bc0498fb0b..48f5ec944c 100644 --- a/website/docs/controls/canvas/index.md +++ b/website/docs/controls/canvas/index.md @@ -14,42 +14,28 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Smiling face - smiling-face -### Flet logo - flet-logo -### Triangles - triangles -### Bezier curves - bezier-curves -### Text - text -### Free-hand drawing with image capture - -### Gradients - diff --git a/website/docs/controls/charts/barchart.md b/website/docs/controls/charts/barchart.md index 9888921ea0..777dc44d0a 100644 --- a/website/docs/controls/charts/barchart.md +++ b/website/docs/controls/charts/barchart.md @@ -12,14 +12,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Interactive bar chart - -### Bar chart with hover - diff --git a/website/docs/controls/charts/candlestickchart.md b/website/docs/controls/charts/candlestickchart.md index 0e342874f6..134dd928bf 100644 --- a/website/docs/controls/charts/candlestickchart.md +++ b/website/docs/controls/charts/candlestickchart.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Candlestick chart - diff --git a/website/docs/controls/charts/linechart.md b/website/docs/controls/charts/linechart.md index fb71caf3f6..c706f258e0 100644 --- a/website/docs/controls/charts/linechart.md +++ b/website/docs/controls/charts/linechart.md @@ -12,14 +12,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Multi-series line chart - -### Line chart with custom axes - diff --git a/website/docs/controls/charts/matplotlibchart.md b/website/docs/controls/charts/matplotlibchart.md index ad71b65565..cf3afc6437 100644 --- a/website/docs/controls/charts/matplotlibchart.md +++ b/website/docs/controls/charts/matplotlibchart.md @@ -12,10 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Bar chart - -Based on an official [Matplotlib example](https://matplotlib.org/stable/gallery/lines_bars_and_markers/bar_colors.html#sphx-glr-gallery-lines-bars-and-markers-bar-colors-py). - diff --git a/website/docs/controls/charts/matplotlibchartwithtoolbar.md b/website/docs/controls/charts/matplotlibchartwithtoolbar.md index 41728d9833..1892808670 100644 --- a/website/docs/controls/charts/matplotlibchartwithtoolbar.md +++ b/website/docs/controls/charts/matplotlibchartwithtoolbar.md @@ -12,28 +12,18 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Basic - -Based on an official [Matplotlib example](https://matplotlib.org/stable/gallery/lines_bars_and_markers/cohere.html#sphx-glr-gallery-lines-bars-and-markers-cohere-py). - -### 3D chart - -### Handle events - -### Animated chart - diff --git a/website/docs/controls/charts/piechart.md b/website/docs/controls/charts/piechart.md index c538bcf0de..e2ac8b7f1f 100644 --- a/website/docs/controls/charts/piechart.md +++ b/website/docs/controls/charts/piechart.md @@ -12,20 +12,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Pie chart with hover borders - -### Pie chart with hover sections - -### Pie chart with icon badges - diff --git a/website/docs/controls/charts/plotlychart.md b/website/docs/controls/charts/plotlychart.md index 6a1c7e13eb..9b768eabf8 100644 --- a/website/docs/controls/charts/plotlychart.md +++ b/website/docs/controls/charts/plotlychart.md @@ -11,34 +11,18 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Plotly line chart - -Based on an official [Plotly example](https://plotly.com/python/line-charts). - -### Plotly bar chart - -Based on an official [Plotly example](https://plotly.com/python/bar-charts). - -### Plotly pie chart - -Based on an official [Plotly example](https://plotly.com/python/pie-charts). - -### Plotly box plot - -Based on an official [Plotly example](https://plotly.com/python/box-plots). - diff --git a/website/docs/controls/charts/radarchart.md b/website/docs/controls/charts/radarchart.md index d5a3b81ce4..0ab6740c29 100644 --- a/website/docs/controls/charts/radarchart.md +++ b/website/docs/controls/charts/radarchart.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Radar chart - diff --git a/website/docs/controls/charts/scatterchart.md b/website/docs/controls/charts/scatterchart.md index 76005d3245..9c42c9838d 100644 --- a/website/docs/controls/charts/scatterchart.md +++ b/website/docs/controls/charts/scatterchart.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Scatter chart - diff --git a/website/docs/controls/checkbox.md b/website/docs/controls/checkbox.md index 7401b0a76f..a35f7de7d4 100644 --- a/website/docs/controls/checkbox.md +++ b/website/docs/controls/checkbox.md @@ -11,20 +11,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Checkbox - basic -### Handling events - handling-events -### Styled checkboxes - Styled checkboxes diff --git a/website/docs/controls/chip.md b/website/docs/controls/chip.md index 650906e50b..88fee6d860 100644 --- a/website/docs/controls/chip.md +++ b/website/docs/controls/chip.md @@ -12,26 +12,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Assist chips - -Assist chips are chips with [`leading`](chip.md#flet.Chip.leading) icon -and [`on_click`](chip.md#flet.Chip.on_click) event specified. - -They represent smart or automated actions that appear dynamically and contextually in a UI. - -An alternative to assist chips are buttons, which should appear persistently and consistently. - assist-chips -### Filter chips - -Filter chips are chips with [`on_select`](chip.md#flet.Chip.on_select) event specified. - -They use tags or descriptive words provided in the [`label`](chip.md#flet.Chip.label) to filter content. -They can be a good alternative to switches or checkboxes. - filter-chips diff --git a/website/docs/controls/circleavatar.md b/website/docs/controls/circleavatar.md index 37ba943f9d..7ebaf04842 100644 --- a/website/docs/controls/circleavatar.md +++ b/website/docs/controls/circleavatar.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### User avatars - user-avatars diff --git a/website/docs/controls/codeeditor/index.md b/website/docs/controls/codeeditor/index.md index 53cc0e8714..3c98e83b7d 100644 --- a/website/docs/controls/codeeditor/index.md +++ b/website/docs/controls/codeeditor/index.md @@ -32,19 +32,14 @@ pip install flet-code-editor # (1)! ## Examples -### CodeEditor code-editor-example-1 -### Selection handling - code-editor-example-2 -### Folding and initial selection - code-editor-example-3 diff --git a/website/docs/controls/column.md b/website/docs/controls/column.md index 46efc639d3..5605fedfb9 100644 --- a/website/docs/controls/column.md +++ b/website/docs/controls/column.md @@ -12,41 +12,24 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Column `spacing` - spacing -### Column wrapping - wrap -### Column vertical alignments - alignment -### Column horizontal alignments - horizontal-alignment -### Infinite scrolling - -This example demonstrates adding of list items on-the-fly, as user scroll to the bottom, -creating the illusion of infinite list: - -### Scrolling programmatically - -This example shows how to use [`scroll_to()`](column.md) to programmatically scroll a column: - programmatic-scroll diff --git a/website/docs/controls/container.md b/website/docs/controls/container.md index e297fbdb7b..0c3930acbe 100644 --- a/website/docs/controls/container.md +++ b/website/docs/controls/container.md @@ -12,58 +12,38 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Clickable container - -### Handling clicks - -### Handling hovers - -### Animate size and color - -### Animate gradient and shape - -### Animated slide-in menu - -### Nested themes 1 - -### Nested themes 2 - -### Nested themes 3 - -### Size aware - diff --git a/website/docs/controls/contextmenu.md b/website/docs/controls/contextmenu.md index 87f81047a4..bc8336a2c6 100644 --- a/website/docs/controls/contextmenu.md +++ b/website/docs/controls/contextmenu.md @@ -11,20 +11,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Triggers - -### Programmatic open - -### Programmatic open with custom trigger - diff --git a/website/docs/controls/cupertinoactionsheet/index.md b/website/docs/controls/cupertinoactionsheet/index.md index 291da1f306..72b354aadb 100644 --- a/website/docs/controls/cupertinoactionsheet/index.md +++ b/website/docs/controls/cupertinoactionsheet/index.md @@ -14,8 +14,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoActionSheet - basic diff --git a/website/docs/controls/cupertinoactivityindicator.md b/website/docs/controls/cupertinoactivityindicator.md index 80d0e63f6d..ce3b13878a 100644 --- a/website/docs/controls/cupertinoactivityindicator.md +++ b/website/docs/controls/cupertinoactivityindicator.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoActivityIndicator - basic diff --git a/website/docs/controls/cupertinoalertdialog.md b/website/docs/controls/cupertinoalertdialog.md index 53cc3b2ff9..c608d049fa 100644 --- a/website/docs/controls/cupertinoalertdialog.md +++ b/website/docs/controls/cupertinoalertdialog.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### File deletion confirmation - file-deletion-confirmation -### Cupertino, material and adaptive alert dialogs - diff --git a/website/docs/controls/cupertinoappbar.md b/website/docs/controls/cupertinoappbar.md index 77bf20ebae..903319e3a0 100644 --- a/website/docs/controls/cupertinoappbar.md +++ b/website/docs/controls/cupertinoappbar.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoAppBar - basic -### App bar with theme mode toggle - diff --git a/website/docs/controls/cupertinobottomsheet.md b/website/docs/controls/cupertinobottomsheet.md index 2f7d37b7df..71e963e79f 100644 --- a/website/docs/controls/cupertinobottomsheet.md +++ b/website/docs/controls/cupertinobottomsheet.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Displaying a `CupertinoActionSheet` - cupertinoactionsheet diff --git a/website/docs/controls/cupertinobutton.md b/website/docs/controls/cupertinobutton.md index 4dbe6070f9..763b62c3b8 100644 --- a/website/docs/controls/cupertinobutton.md +++ b/website/docs/controls/cupertinobutton.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoButton - basic diff --git a/website/docs/controls/cupertinocheckbox.md b/website/docs/controls/cupertinocheckbox.md index 3b64837ab4..eb7c34e9ff 100644 --- a/website/docs/controls/cupertinocheckbox.md +++ b/website/docs/controls/cupertinocheckbox.md @@ -12,14 +12,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Cupertino, Material and Adaptive Checkboxes - cupertino-material-and-adaptive -### Styled checkboxes - diff --git a/website/docs/controls/cupertinocontextmenu/index.md b/website/docs/controls/cupertinocontextmenu/index.md index ae0c9a6790..db22f26b2c 100644 --- a/website/docs/controls/cupertinocontextmenu/index.md +++ b/website/docs/controls/cupertinocontextmenu/index.md @@ -13,8 +13,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoContextMenu - basic diff --git a/website/docs/controls/cupertinodatepicker.md b/website/docs/controls/cupertinodatepicker.md index f39f5bc223..1bb6dcb4a8 100644 --- a/website/docs/controls/cupertinodatepicker.md +++ b/website/docs/controls/cupertinodatepicker.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoDatePicker - basic diff --git a/website/docs/controls/cupertinodialogaction.md b/website/docs/controls/cupertinodialogaction.md index c54741d7b3..7155a0519a 100644 --- a/website/docs/controls/cupertinodialogaction.md +++ b/website/docs/controls/cupertinodialogaction.md @@ -1,12 +1,18 @@ --- class_name: "flet.CupertinoDialogAction" +examples: "controls/cupertino/cupertino_alert_dialog" +example_images: "examples/controls/cupertino/cupertino_alert_dialog/media" title: "CupertinoDialogAction" --- -import {ClassAll} from '@site/src/components/crocodocs'; +import {ClassAll, CodeExample, Image} from '@site/src/components/crocodocs'; ## Examples -See [these](cupertinoalertdialog.md#examples). + + +file-deletion-confirmation + + diff --git a/website/docs/controls/cupertinofilledbutton.md b/website/docs/controls/cupertinofilledbutton.md index 6681a4013d..ab186de8b5 100644 --- a/website/docs/controls/cupertinofilledbutton.md +++ b/website/docs/controls/cupertinofilledbutton.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoFilledButton - basic diff --git a/website/docs/controls/cupertinolisttile.md b/website/docs/controls/cupertinolisttile.md index d26d2d473f..bc1615d833 100644 --- a/website/docs/controls/cupertinolisttile.md +++ b/website/docs/controls/cupertinolisttile.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Notched and non-notched list tiles - notched diff --git a/website/docs/controls/cupertinonavigationbar.md b/website/docs/controls/cupertinonavigationbar.md index 157fe6ad82..a4a5894e29 100644 --- a/website/docs/controls/cupertinonavigationbar.md +++ b/website/docs/controls/cupertinonavigationbar.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoNavigationBar - basic -### Wired navigation bar - diff --git a/website/docs/controls/cupertinopicker.md b/website/docs/controls/cupertinopicker.md index a7705eee2e..817533414c 100644 --- a/website/docs/controls/cupertinopicker.md +++ b/website/docs/controls/cupertinopicker.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Fruit selection - fruit-selection diff --git a/website/docs/controls/cupertinoradio.md b/website/docs/controls/cupertinoradio.md index e3c449b883..45a841baf8 100644 --- a/website/docs/controls/cupertinoradio.md +++ b/website/docs/controls/cupertinoradio.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Cupertino, Material and Adaptive Radios - cupertino-material-and-adaptive diff --git a/website/docs/controls/cupertinosegmentedbutton.md b/website/docs/controls/cupertinosegmentedbutton.md index 6841188b63..5c1e9d574b 100644 --- a/website/docs/controls/cupertinosegmentedbutton.md +++ b/website/docs/controls/cupertinosegmentedbutton.md @@ -12,14 +12,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoSegmentedButton - basic -### Adjusting segments padding - diff --git a/website/docs/controls/cupertinoslider.md b/website/docs/controls/cupertinoslider.md index 1ce4a27bc3..17bcf45e11 100644 --- a/website/docs/controls/cupertinoslider.md +++ b/website/docs/controls/cupertinoslider.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Handling events - handling-events diff --git a/website/docs/controls/cupertinoslidingsegmentedbutton.md b/website/docs/controls/cupertinoslidingsegmentedbutton.md index 17afec8baa..b5924a255f 100644 --- a/website/docs/controls/cupertinoslidingsegmentedbutton.md +++ b/website/docs/controls/cupertinoslidingsegmentedbutton.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoSlidingSegmentedButton - basic diff --git a/website/docs/controls/cupertinoswitch.md b/website/docs/controls/cupertinoswitch.md index d25225165b..bb13775a69 100644 --- a/website/docs/controls/cupertinoswitch.md +++ b/website/docs/controls/cupertinoswitch.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Cupertino, Material and Adaptive Switches - cupertino-material-and-adaptive diff --git a/website/docs/controls/cupertinotextfield.md b/website/docs/controls/cupertinotextfield.md index 1a82390a44..34d0a9f151 100644 --- a/website/docs/controls/cupertinotextfield.md +++ b/website/docs/controls/cupertinotextfield.md @@ -12,18 +12,12 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoTextField - cupertino-material-and-adaptive -### Handling selection changes - -### Background image - diff --git a/website/docs/controls/cupertinotimerpicker.md b/website/docs/controls/cupertinotimerpicker.md index 70aa4d097b..00aa001399 100644 --- a/website/docs/controls/cupertinotimerpicker.md +++ b/website/docs/controls/cupertinotimerpicker.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### CupertinoTimerPicker - basic diff --git a/website/docs/controls/datacell.md b/website/docs/controls/datacell.md index e6151ca818..17bbba389e 100644 --- a/website/docs/controls/datacell.md +++ b/website/docs/controls/datacell.md @@ -1,12 +1,10 @@ --- class_name: "flet.DataCell" +examples: "controls/material/data_table" +example_images: "test-images/examples/controls/material/golden/macos/datatable" title: "DataCell" --- -import {ClassAll} from '@site/src/components/crocodocs'; - -## Examples - -See [these](datatable/index.md#examples). +import {ClassAll, CodeExample, Image} from '@site/src/components/crocodocs'; diff --git a/website/docs/controls/datacolumn.md b/website/docs/controls/datacolumn.md index 5a048ba64a..5f2ffbe741 100644 --- a/website/docs/controls/datacolumn.md +++ b/website/docs/controls/datacolumn.md @@ -1,12 +1,10 @@ --- class_name: "flet.DataColumn" +examples: "controls/material/data_table" +example_images: "test-images/examples/controls/material/golden/macos/datatable" title: "DataColumn" --- -import {ClassAll} from '@site/src/components/crocodocs'; - -## Examples - -See [these](datatable/index.md#examples). +import {ClassAll, CodeExample, Image} from '@site/src/components/crocodocs'; diff --git a/website/docs/controls/datarow.md b/website/docs/controls/datarow.md index a88bc1b8f4..393e0749ba 100644 --- a/website/docs/controls/datarow.md +++ b/website/docs/controls/datarow.md @@ -1,12 +1,10 @@ --- class_name: "flet.DataRow" +examples: "controls/material/data_table" +example_images: "test-images/examples/controls/material/golden/macos/datatable" title: "DataRow" --- -import {ClassAll} from '@site/src/components/crocodocs'; - -## Examples - -See [these](datatable/index.md#examples). +import {ClassAll, CodeExample, Image} from '@site/src/components/crocodocs'; diff --git a/website/docs/controls/datatable/index.md b/website/docs/controls/datatable/index.md index 7b0241db26..773a45c748 100644 --- a/website/docs/controls/datatable/index.md +++ b/website/docs/controls/datatable/index.md @@ -13,43 +13,22 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### DataTable - -### Horizontal margin and column spacing - -Use [`horizontal_margin`](index.md#flet.DataTable.horizontal_margin) to control the left and right -edge spacing of the first and last columns. -Use [`column_spacing`](index.md#flet.DataTable.column_spacing) to control spacing between columns. - -### Adaptive row heights - -Setting [`data_row_max_height`](index.md#flet.DataTable.data_row_max_height) to `float('inf')` -(infinity) will cause the `DataTable` to let each individual row adapt its height to its -respective content, instead of all rows having the same height. - -### Sortable columns and selectable rows - -This example demonstrates row selection (including select-all), -sortable string and numeric columns, and stable selection across sorts and refreshes. - -### Handling events - diff --git a/website/docs/controls/datatable2/index.md b/website/docs/controls/datatable2/index.md index 01f777461e..cad4fa73c9 100644 --- a/website/docs/controls/datatable2/index.md +++ b/website/docs/controls/datatable2/index.md @@ -43,20 +43,14 @@ pip install flet-datatable2 # (1)! ## Examples -### Empty state - -### Sortable and selectable - -### Column widths - diff --git a/website/docs/controls/datepicker.md b/website/docs/controls/datepicker.md index a5f3910c60..7b7503e775 100644 --- a/website/docs/controls/datepicker.md +++ b/website/docs/controls/datepicker.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### DatePicker - basic -### Custom locale - custom-locale diff --git a/website/docs/controls/daterangepicker.md b/website/docs/controls/daterangepicker.md index b03e51242b..7a67422bc5 100644 --- a/website/docs/controls/daterangepicker.md +++ b/website/docs/controls/daterangepicker.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### DateRangePicker - basic -### Custom locale - custom-locale diff --git a/website/docs/controls/dismissible.md b/website/docs/controls/dismissible.md index 21da8a490e..f416f01acb 100644 --- a/website/docs/controls/dismissible.md +++ b/website/docs/controls/dismissible.md @@ -11,13 +11,11 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Dismissible `ListTile`s - dismissible-list-tiles -### Remove Dismissible `on_dismiss` inside component +### Remove `Dismissible` `on_dismiss` inside component :::warning[Important] Always specify a key for `Dismissible` when using inside Flet component. @@ -25,20 +23,18 @@ Always specify a key for `Dismissible` when using inside Flet component. The issue you may encounter here is specific to the `Dismissible` control used inside Flet component (declarative UI). -When a user swipes (dismisses) an item, that widget is marked as “dismissed” on the Flutter side and effectively removed from the UI. +When a user swipes (dismisses) an item, that widget is marked as "dismissed" on the Flutter side and effectively removed from the UI. However, when Flet recalculates the UI diff on the Python side, it may attempt to reuse widgets in the list based on their order rather than their identity. -If no key is provided, Flet’s diffing algorithm can’t tell that a particular `Dismissible` corresponds to a specific item — so it assumes the items have merely shifted. +If no key is provided, Flet's diffing algorithm can't tell that a particular `Dismissible` corresponds to a specific item — so it assumes the items have merely shifted. That leads to update commands like: -> “Update text in items 0…N-1, then delete the last item (N).” - -On Flutter’s side, though, the already-dismissed `Dismissible` widget in the middle of the list can’t be updated — it’s gone — causing runtime errors. +> "Update text in items 0…N-1, then delete the last item (N)." -**Always assign a stable, unique key to each `Dismissible`, typically based on the item’s identifier or index.** +On Flutter's side, though, the already-dismissed `Dismissible` widget in the middle of the list can't be updated — it's gone — causing runtime errors. -Example: +**Always assign a stable, unique key to each `Dismissible`, typically based on the item's identifier or index.** - + diff --git a/website/docs/controls/divider.md b/website/docs/controls/divider.md index 710b34c366..f5a23b4fdb 100644 --- a/website/docs/controls/divider.md +++ b/website/docs/controls/divider.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Divider - basic diff --git a/website/docs/controls/draggable.md b/website/docs/controls/draggable.md index 588f889cfd..f4cddc3654 100644 --- a/website/docs/controls/draggable.md +++ b/website/docs/controls/draggable.md @@ -11,16 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Drag and drop Containers - -#### Imperative - -#### Declarative +drag-and-drop-containers -drag-and-drop-containers - diff --git a/website/docs/controls/dragtarget.md b/website/docs/controls/dragtarget.md index c19cd87e5d..d9f23461bf 100644 --- a/website/docs/controls/dragtarget.md +++ b/website/docs/controls/dragtarget.md @@ -1,12 +1,20 @@ --- class_name: "flet.DragTarget" +examples: "controls/core/drag_target_and_draggable" +example_images: "examples/controls/core/drag_target_and_draggable/media" title: "DragTarget" --- -import {ClassAll} from '@site/src/components/crocodocs'; +import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/components/crocodocs'; + + ## Examples -See [these](draggable.md#examples). + + +drag-and-drop-containers + + - + diff --git a/website/docs/controls/dropdown/index.md b/website/docs/controls/dropdown/index.md index 2d19583db2..9efb68ecec 100644 --- a/website/docs/controls/dropdown/index.md +++ b/website/docs/controls/dropdown/index.md @@ -13,32 +13,22 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Color selection with filtering - color-selection-with-filtering -### Icon selection - icon-selection -### Declarative dropdown - declarative-dropdown -### Select and change events - select-and-change-events -### Styled dropdowns - styled-dropdowns diff --git a/website/docs/controls/dropdownm2.md b/website/docs/controls/dropdownm2.md index 67d76bdcab..9df8a394f0 100644 --- a/website/docs/controls/dropdownm2.md +++ b/website/docs/controls/dropdownm2.md @@ -12,26 +12,18 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### DropdownM2 - basic -### Dropdown with label and hint - label-and-hint -### Handling events - handling-events -### Add and delete options - add-and-delete-options diff --git a/website/docs/controls/expansionpanellist.md b/website/docs/controls/expansionpanellist.md index c8e8fe7f33..963114d5ea 100644 --- a/website/docs/controls/expansionpanellist.md +++ b/website/docs/controls/expansionpanellist.md @@ -12,16 +12,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### ExpansionPanelList - -### Scrolling - -`ExpansionPanelList` supports scrolling through its [`scroll`](expansionpanellist.md) property. - diff --git a/website/docs/controls/expansiontile.md b/website/docs/controls/expansiontile.md index 45c900556a..f5b6f6d463 100644 --- a/website/docs/controls/expansiontile.md +++ b/website/docs/controls/expansiontile.md @@ -11,30 +11,20 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### ExpansionTile - -### Programmatic expansion/collapse - -### Custom animations - -### Theme mode toggle - -### Borders - diff --git a/website/docs/controls/filledbutton.md b/website/docs/controls/filledbutton.md index 4a995e017e..2d6eeda835 100644 --- a/website/docs/controls/filledbutton.md +++ b/website/docs/controls/filledbutton.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### FilledButton - basic diff --git a/website/docs/controls/filledtonalbutton.md b/website/docs/controls/filledtonalbutton.md index ed9a2ed08c..6775ace4b6 100644 --- a/website/docs/controls/filledtonalbutton.md +++ b/website/docs/controls/filledtonalbutton.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### FilledTonalButton - basic diff --git a/website/docs/controls/floatingactionbutton.md b/website/docs/controls/floatingactionbutton.md index bcbb35dd82..0be0daf253 100644 --- a/website/docs/controls/floatingactionbutton.md +++ b/website/docs/controls/floatingactionbutton.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Handling clicks - handling-clicks diff --git a/website/docs/controls/gesturedetector.md b/website/docs/controls/gesturedetector.md index 6c684f7078..73b0df45ac 100644 --- a/website/docs/controls/gesturedetector.md +++ b/website/docs/controls/gesturedetector.md @@ -13,27 +13,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen [Solitaire game tutorial](https://flet.dev/docs/tutorials/python-solitaire) -### Handling events - -### Draggable containers - -The following example demonstrates how a control can be freely dragged inside a Stack. - -The sample also shows that GestureDetector can have a child control (blue container) as well as be nested -inside another control (yellow container) giving the same results. - draggable-containers -### Window drag area - -### Mouse Cursors - diff --git a/website/docs/controls/gridview.md b/website/docs/controls/gridview.md index 2eb36753fa..09fe24f8b3 100644 --- a/website/docs/controls/gridview.md +++ b/website/docs/controls/gridview.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Photo gallery - photo-gallery diff --git a/website/docs/controls/hero.md b/website/docs/controls/hero.md index c6ed2f58b4..6ce29a28fc 100644 --- a/website/docs/controls/hero.md +++ b/website/docs/controls/hero.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Hero - -### Gallery - diff --git a/website/docs/controls/icon.md b/website/docs/controls/icon.md index fe773eefb3..0daa1ff3f5 100644 --- a/website/docs/controls/icon.md +++ b/website/docs/controls/icon.md @@ -15,8 +15,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen To browse and visualize all available icons, visit our [icons browser](https://flet.app/gallery/run/apps/icons_browser/) -### Icon - basic diff --git a/website/docs/controls/iconbutton.md b/website/docs/controls/iconbutton.md index 5361a8f956..05365cb0b6 100644 --- a/website/docs/controls/iconbutton.md +++ b/website/docs/controls/iconbutton.md @@ -12,20 +12,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Handling clicks - handling-clicks -### Selected icon - selected-icon -### Variants - variants diff --git a/website/docs/controls/image.md b/website/docs/controls/image.md index 7b1431cf11..345137ed9c 100644 --- a/website/docs/controls/image.md +++ b/website/docs/controls/image.md @@ -12,39 +12,20 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Image gallery - -### Fade-in images with a placeholder - -### Displaying images from base64 strings and byte data - -### Displaying a static SVG image - -### Displaying a dynamic SVG image - -### Displaying a Lucide icon - -### Gapless playback when changing image sources - -This example updates both images to a new network URL on each click. With -[`gapless_playback`](image.md#flet.Image.gapless_playback) set to `True`, the previous frame remains visible while the next -image loads. With [`gapless_playback`](image.md#flet.Image.gapless_playback) set to `False`, the image area can -briefly be empty, causing a flicker/blink effect. - diff --git a/website/docs/controls/interactiveviewer.md b/website/docs/controls/interactiveviewer.md index 4bd6431f35..f43542b790 100644 --- a/website/docs/controls/interactiveviewer.md +++ b/website/docs/controls/interactiveviewer.md @@ -10,12 +10,8 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Handling events - -### Programmatic transformations - diff --git a/website/docs/controls/keyboardlistener.md b/website/docs/controls/keyboardlistener.md index c730a871b9..887426b716 100644 --- a/website/docs/controls/keyboardlistener.md +++ b/website/docs/controls/keyboardlistener.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Press any keys - diff --git a/website/docs/controls/layoutcontrol.md b/website/docs/controls/layoutcontrol.md index cbbaef7a97..c3cc88959e 100644 --- a/website/docs/controls/layoutcontrol.md +++ b/website/docs/controls/layoutcontrol.md @@ -12,38 +12,26 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Flip - -### Rotate - -### RotatedBox - - + -### Scale - -### Offset - -### Matrix4 Transform - diff --git a/website/docs/controls/listtile.md b/website/docs/controls/listtile.md index 48cef1d00f..aaf7936c8f 100644 --- a/website/docs/controls/listtile.md +++ b/website/docs/controls/listtile.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### ListTile - basic diff --git a/website/docs/controls/listview.md b/website/docs/controls/listview.md index 3bcf5d553d..859dc1f9e8 100644 --- a/website/docs/controls/listview.md +++ b/website/docs/controls/listview.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Auto-scrolling and dynamical items addition - autoscroll-and-dynamic-items diff --git a/website/docs/controls/map/index.md b/website/docs/controls/map/index.md index 30440ae55e..ee2ec2ae92 100644 --- a/website/docs/controls/map/index.md +++ b/website/docs/controls/map/index.md @@ -45,32 +45,18 @@ More details [here](tilelayer.md). ## Examples -### Basic - -### Attributions - -### Camera Controls - -### Idle Camera - -### Interaction Flags - -### Multiple Layers - -### Overlay Images - ## Reference diff --git a/website/docs/controls/map/overlayimage.md b/website/docs/controls/map/overlayimage.md index 99a910c326..48ad52af5e 100644 --- a/website/docs/controls/map/overlayimage.md +++ b/website/docs/controls/map/overlayimage.md @@ -9,6 +9,4 @@ import {ClassAll, CodeExample} from '@site/src/components/crocodocs'; ## Examples -### OverlayImage - diff --git a/website/docs/controls/map/overlayimagelayer.md b/website/docs/controls/map/overlayimagelayer.md index c208176269..78d1d849f5 100644 --- a/website/docs/controls/map/overlayimagelayer.md +++ b/website/docs/controls/map/overlayimagelayer.md @@ -9,6 +9,4 @@ import {ClassAll, CodeExample} from '@site/src/components/crocodocs'; ## Examples -### OverlayImageLayer - diff --git a/website/docs/controls/map/rotatedoverlayimage.md b/website/docs/controls/map/rotatedoverlayimage.md index d12eb4e3c7..46f54bf8cc 100644 --- a/website/docs/controls/map/rotatedoverlayimage.md +++ b/website/docs/controls/map/rotatedoverlayimage.md @@ -9,6 +9,4 @@ import {ClassAll, CodeExample} from '@site/src/components/crocodocs'; ## Examples -### RotatedOverlayImage - diff --git a/website/docs/controls/markdown.md b/website/docs/controls/markdown.md index b55155a7c6..78f80c4b68 100644 --- a/website/docs/controls/markdown.md +++ b/website/docs/controls/markdown.md @@ -12,20 +12,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Markdown - basic -### Code syntax highlight - code-syntax-highlight -### Custom text theme - diff --git a/website/docs/controls/menubar.md b/website/docs/controls/menubar.md index cabf8a010a..ccacf51eaa 100644 --- a/website/docs/controls/menubar.md +++ b/website/docs/controls/menubar.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### `MenuBar` with Nested Submenus - diff --git a/website/docs/controls/menuitembutton.md b/website/docs/controls/menuitembutton.md index b9701ab883..ede56de2ec 100644 --- a/website/docs/controls/menuitembutton.md +++ b/website/docs/controls/menuitembutton.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### MenuItemButton - basic diff --git a/website/docs/controls/navigationbar/index.md b/website/docs/controls/navigationbar/index.md index c022067060..3129beb823 100644 --- a/website/docs/controls/navigationbar/index.md +++ b/website/docs/controls/navigationbar/index.md @@ -13,18 +13,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### NavigationBar - basic -### Adaptive navigation - -This example switches between a `NavigationBar` -on narrow layouts and a [`NavigationRail`](../navigationrail/index.md) with an -end [`NavigationDrawer`](../navigationdrawer/index.md) on wider layouts. - Adaptive navigation example switching between a navigation bar and a navigation rail with an end drawer diff --git a/website/docs/controls/navigationdrawer/index.md b/website/docs/controls/navigationdrawer/index.md index fa6560d339..ee3ab3b17c 100644 --- a/website/docs/controls/navigationdrawer/index.md +++ b/website/docs/controls/navigationdrawer/index.md @@ -13,30 +13,18 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Start-aligned drawer - Start-aligned navigation drawer example -### End-aligned drawer - End-aligned navigation drawer example -### Theming - Themed navigation drawer example -### Adaptive navigation - -This example switches between a [`NavigationBar`](../navigationbar/index.md) -on narrow layouts and a [`NavigationRail`](../navigationrail/index.md) with an -end [`NavigationDrawer`](../navigationdrawer/index.md) on wider layouts. - Adaptive navigation example switching between a navigation bar and a navigation rail with an end drawer diff --git a/website/docs/controls/navigationrail/index.md b/website/docs/controls/navigationrail/index.md index 7c1a6a53d1..d31a668deb 100644 --- a/website/docs/controls/navigationrail/index.md +++ b/website/docs/controls/navigationrail/index.md @@ -13,18 +13,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### NavigationRail - basic -### Adaptive navigation - -This example switches between a [`NavigationBar`](../navigationbar/index.md) -on narrow layouts and a `NavigationRail` with an -end [`NavigationDrawer`](../navigationdrawer/index.md) on wider layouts. - Adaptive navigation example switching between a navigation bar and a navigation rail with an end drawer diff --git a/website/docs/controls/outlinedbutton.md b/website/docs/controls/outlinedbutton.md index 6922f96596..f4053db6e2 100644 --- a/website/docs/controls/outlinedbutton.md +++ b/website/docs/controls/outlinedbutton.md @@ -12,26 +12,18 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### OutlinedButton - basic -### Handling clicks - handling-clicks -### Icons - icons -### Custom content - custom-content diff --git a/website/docs/controls/outlinediconbutton.md b/website/docs/controls/outlinediconbutton.md index f157fbd8a4..49510e231e 100644 --- a/website/docs/controls/outlinediconbutton.md +++ b/website/docs/controls/outlinediconbutton.md @@ -5,8 +5,4 @@ title: "OutlinedIconButton" import {ClassAll} from '@site/src/components/crocodocs'; -## Examples - -See `IconButton` [examples](iconbutton.md#examples). - diff --git a/website/docs/controls/page.md b/website/docs/controls/page.md index 215822b7e0..3775d784f8 100644 --- a/website/docs/controls/page.md +++ b/website/docs/controls/page.md @@ -11,40 +11,19 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Listening to keyboard events - -### Mobile device orientation configuration - -Shows how to lock your app to specific device orientations -(e.g., portrait up, landscape right) and listen for orientation changes on mobile devices. - -### App exit confirmation - -### Hidden app window on startup - -A Flet desktop app (Windows, macOS, or Linux) can start with its window hidden. -This lets your app perform initial setup (for example, add content, resize -or position the window) before showing it to the user. - -In the example below, the window is resized and centered before becoming visible: - If you need this feature when packaging a desktop app using [`flet build`](../cli/flet-build.md), see [this](../publish/index.md#hidden-app-window-on-startup). -### Toggle semantics debugger - -### Get device locales - diff --git a/website/docs/controls/pagelet.md b/website/docs/controls/pagelet.md index eca42ed8bb..67f678ad48 100644 --- a/website/docs/controls/pagelet.md +++ b/website/docs/controls/pagelet.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Pagelet - diff --git a/website/docs/controls/pageview.md b/website/docs/controls/pageview.md index a37182a16e..25aceb54d2 100644 --- a/website/docs/controls/pageview.md +++ b/website/docs/controls/pageview.md @@ -10,12 +10,8 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### PageView - -### Programmatic Swipes - diff --git a/website/docs/controls/placeholder.md b/website/docs/controls/placeholder.md index 9947174e93..48c3814c58 100644 --- a/website/docs/controls/placeholder.md +++ b/website/docs/controls/placeholder.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Placeholder - basic diff --git a/website/docs/controls/popupmenubutton.md b/website/docs/controls/popupmenubutton.md index 8477d50fce..53db44678a 100644 --- a/website/docs/controls/popupmenubutton.md +++ b/website/docs/controls/popupmenubutton.md @@ -13,8 +13,6 @@ import {ClassAll, ClassMembers, ClassSummary, CodeExample, Image} from '@site/sr ## Examples -### PopupMenuButton - basic diff --git a/website/docs/controls/progressbar.md b/website/docs/controls/progressbar.md index b710ca8c3f..d86865b590 100644 --- a/website/docs/controls/progressbar.md +++ b/website/docs/controls/progressbar.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Determinate and indeterminate progress bars - determinate-and-indeterminate diff --git a/website/docs/controls/progressring.md b/website/docs/controls/progressring.md index c88f3eae1e..973406924d 100644 --- a/website/docs/controls/progressring.md +++ b/website/docs/controls/progressring.md @@ -12,14 +12,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Determinate and indeterminate progress rings - determinate-and-indeterminate -### Gauge with progress - determinate-and-indeterminate diff --git a/website/docs/controls/radio.md b/website/docs/controls/radio.md index 8a38aff136..3e20ee9ec3 100644 --- a/website/docs/controls/radio.md +++ b/website/docs/controls/radio.md @@ -11,20 +11,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Radio - basic -### Handling selection changes - handling-selection-changes -### Styled radio buttons - styled diff --git a/website/docs/controls/radiogroup.md b/website/docs/controls/radiogroup.md index ca9222c95d..184dd40754 100644 --- a/website/docs/controls/radiogroup.md +++ b/website/docs/controls/radiogroup.md @@ -5,8 +5,4 @@ title: "RadioGroup" import {ClassAll} from '@site/src/components/crocodocs'; -## Examples - -See [these](radio.md#examples). - diff --git a/website/docs/controls/rangeslider.md b/website/docs/controls/rangeslider.md index 6547a30bd3..d80f6d11f7 100644 --- a/website/docs/controls/rangeslider.md +++ b/website/docs/controls/rangeslider.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### RangeSlider - basic -### RangeSlider with events - handling_events diff --git a/website/docs/controls/reorderabledraghandle.md b/website/docs/controls/reorderabledraghandle.md index 11885cb044..ba225d31b8 100644 --- a/website/docs/controls/reorderabledraghandle.md +++ b/website/docs/controls/reorderabledraghandle.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### ReorderableDragHandle - basic diff --git a/website/docs/controls/reorderablelistview.md b/website/docs/controls/reorderablelistview.md index 0458b78456..b02609b902 100644 --- a/website/docs/controls/reorderablelistview.md +++ b/website/docs/controls/reorderablelistview.md @@ -12,14 +12,12 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Horizontal and Vertical - horizontal-and-vertical -### Custom drag handle + -See [this](reorderabledraghandle.md#examples). +custom-drag-handle diff --git a/website/docs/controls/responsiverow.md b/website/docs/controls/responsiverow.md index 2857c2b6a4..c8b8230917 100644 --- a/website/docs/controls/responsiverow.md +++ b/website/docs/controls/responsiverow.md @@ -11,20 +11,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### ResponsiveRow - -### Custom breakpoints - -### Scrollable content - - + diff --git a/website/docs/controls/router.md b/website/docs/controls/router.md index 60148d6aab..23b98a1cf7 100644 --- a/website/docs/controls/router.md +++ b/website/docs/controls/router.md @@ -15,67 +15,26 @@ Navigation is done via [page.navigate()](../controls/page.md#flet.Page.navigate) ## Examples -### Basic - -### Layout with outlet - -### Dynamic segments - -### Loaders - -### Active links - -### Featured - -### Managed views — nested routes - -Each route component returns a [View](../controls/view.md) with its own [AppBar](../controls/appbar.md). -Navigating deeper pushes views onto the stack; swipe-back and AppBar back button pop them. - -### Managed views — shared layout with outlet - -A layout route with `outlet=True` wraps child routes in a shared [View](../controls/view.md). -Leaf components return regular controls; the layout provides the View. - -### Managed views — full app with NavigationRail - -Complete app with [NavigationRail](../controls/navigationrail), stacked project views, -and tabbed settings — all using `manage_views=True`. - -### Modal routes - -Routes marked `modal=True` are rendered as a fullscreen-dialog overlay on top -of the previous (non-modal) location's view stack. A *global* modal is declared -at the top level (the URL works from anywhere); a *local* modal is declared as -a child of a non-modal parent (the URL embeds the parent's segment, so -deep-link works without any state). - -### Recursive routes - -A route marked `recursive=True` can match itself as its own descendant — one -View is emitted per consumed URL segment. Use this for tree-shaped URLs -with unbounded depth (e.g. a file browser at `/folder/a/b/c`). - diff --git a/website/docs/controls/row.md b/website/docs/controls/row.md index e6ec3cf7d4..4dacb66953 100644 --- a/website/docs/controls/row.md +++ b/website/docs/controls/row.md @@ -11,26 +11,18 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Spacing children - spacing -### Wrapping children - wrap -### Setting horizontal alignment - alignment -### Setting vertical alignment - vertical-alignment diff --git a/website/docs/controls/safearea.md b/website/docs/controls/safearea.md index 65c4dea2a7..4912b0e8c8 100644 --- a/website/docs/controls/safearea.md +++ b/website/docs/controls/safearea.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Example -### SafeArea - diff --git a/website/docs/controls/screenshot.md b/website/docs/controls/screenshot.md index 3e0be32a61..0d8736b7b8 100644 --- a/website/docs/controls/screenshot.md +++ b/website/docs/controls/screenshot.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Taking control screenshot - diff --git a/website/docs/controls/searchbar.md b/website/docs/controls/searchbar.md index 11f3a23249..837a522a08 100644 --- a/website/docs/controls/searchbar.md +++ b/website/docs/controls/searchbar.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### SearchBar - basic diff --git a/website/docs/controls/segmentedbutton/index.md b/website/docs/controls/segmentedbutton/index.md index d89f604260..75d8cf92e7 100644 --- a/website/docs/controls/segmentedbutton/index.md +++ b/website/docs/controls/segmentedbutton/index.md @@ -13,8 +13,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### SegmentedButton - diff --git a/website/docs/controls/selectionarea.md b/website/docs/controls/selectionarea.md index 675f0edbd4..05a596daba 100644 --- a/website/docs/controls/selectionarea.md +++ b/website/docs/controls/selectionarea.md @@ -12,8 +12,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### SelectionArea - basic diff --git a/website/docs/controls/semantics.md b/website/docs/controls/semantics.md index 7514ce968a..24df4d934c 100644 --- a/website/docs/controls/semantics.md +++ b/website/docs/controls/semantics.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Semantics - diff --git a/website/docs/controls/shadermask.md b/website/docs/controls/shadermask.md index 490a28da14..d7dc38b2b2 100644 --- a/website/docs/controls/shadermask.md +++ b/website/docs/controls/shadermask.md @@ -11,20 +11,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Pink glow around image edges - pink-radial-glow -### Fade out bottom edge of an image - fade-out-image-bottom -### Applying linear and radial gradients/shaders - fade-out-image-bottom diff --git a/website/docs/controls/shimmer.md b/website/docs/controls/shimmer.md index a97f9ec2f0..d08fdadd67 100644 --- a/website/docs/controls/shimmer.md +++ b/website/docs/controls/shimmer.md @@ -11,20 +11,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Basic - custom-label -### Skeleton list placeholders - custom-label -### Custom gradients and directions - custom-label diff --git a/website/docs/controls/slider.md b/website/docs/controls/slider.md index a9758375b9..cdda69ce5d 100644 --- a/website/docs/controls/slider.md +++ b/website/docs/controls/slider.md @@ -12,26 +12,18 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Slider - basic -### Setting a custom label - custom-label -### Handling events - handling-events -### Random values - random-values diff --git a/website/docs/controls/snackbar.md b/website/docs/controls/snackbar.md index afc9dd0e83..d8fb139886 100644 --- a/website/docs/controls/snackbar.md +++ b/website/docs/controls/snackbar.md @@ -12,20 +12,14 @@ import {ClassAll, ClassMembers, ClassSummary, CodeExample, Image} from '@site/sr ## Examples -### SnackBar - basic -### Counter - Snack bar with counter -### Action - Snack bar with a simple action diff --git a/website/docs/controls/stack.md b/website/docs/controls/stack.md index 1930545977..796f7a8b48 100644 --- a/website/docs/controls/stack.md +++ b/website/docs/controls/stack.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Avatar with online status - online-avatar -### Absolute positioning - absolute-positioning diff --git a/website/docs/controls/submenubutton.md b/website/docs/controls/submenubutton.md index d335ef9928..e754e14f07 100644 --- a/website/docs/controls/submenubutton.md +++ b/website/docs/controls/submenubutton.md @@ -12,14 +12,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### SubmenuButton - basic -### Standalone Example - standalone diff --git a/website/docs/controls/switch.md b/website/docs/controls/switch.md index 9d067e8236..99a9993f60 100644 --- a/website/docs/controls/switch.md +++ b/website/docs/controls/switch.md @@ -11,14 +11,10 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Switch - basic -### Handling change events - handling-events diff --git a/website/docs/controls/tabs/index.md b/website/docs/controls/tabs/index.md index 25a0ceabdf..1e9151e847 100644 --- a/website/docs/controls/tabs/index.md +++ b/website/docs/controls/tabs/index.md @@ -14,26 +14,16 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Tabs - -### Nesting tabs - -### Dynamic tab addition - -### Custom indicator - -### Programmatical Tab switch - diff --git a/website/docs/controls/text.md b/website/docs/controls/text.md index 4b27fd87d1..246e513592 100644 --- a/website/docs/controls/text.md +++ b/website/docs/controls/text.md @@ -12,38 +12,26 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Custom text styles - -### Pre-defined theme text styles - -### Font with variable weight - -### Basic rich text example - -### Rich text with borders and stroke - -### Rich text with gradient - diff --git a/website/docs/controls/textbutton.md b/website/docs/controls/textbutton.md index 612a2848a4..cc1eb3c84b 100644 --- a/website/docs/controls/textbutton.md +++ b/website/docs/controls/textbutton.md @@ -11,26 +11,18 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### TextButton - basic -### Icons - icons -### Handling clicks - handling-clicks -### Custom content - custom-content diff --git a/website/docs/controls/textfield.md b/website/docs/controls/textfield.md index 52b3d4bb2c..acee47ee4b 100644 --- a/website/docs/controls/textfield.md +++ b/website/docs/controls/textfield.md @@ -12,56 +12,38 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### TextField - basic -### Handling change events - handling-change-events -### Handling selection changes - selection-change -### Password with reveal button - password -### Multiline fields - multiline -### Underlined and borderless TextFields - underlined-and-borderless -### Setting prefixes and suffixes - prefix-and-suffix -### Styled TextField - styled -### Custom label, hint, helper, and counter texts and styles - label-hint-helper-counter diff --git a/website/docs/controls/timepicker.md b/website/docs/controls/timepicker.md index a6b714f018..6285e05dc5 100644 --- a/website/docs/controls/timepicker.md +++ b/website/docs/controls/timepicker.md @@ -11,20 +11,14 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### TimePicker - -### Hour Formats - -### Custom Locale - diff --git a/website/docs/controls/verticaldivider.md b/website/docs/controls/verticaldivider.md index a4b63db0b7..17bc5cd2f2 100644 --- a/website/docs/controls/verticaldivider.md +++ b/website/docs/controls/verticaldivider.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### VerticalDivider - basic diff --git a/website/docs/controls/video/index.md b/website/docs/controls/video/index.md index 78f8977bba..777329f654 100644 --- a/website/docs/controls/video/index.md +++ b/website/docs/controls/video/index.md @@ -97,66 +97,22 @@ sudo ln -s /usr/lib/x86_64-linux-gnu/libmpv.so /usr/lib/libmpv.so.1 ## Examples -### Video - -### Playback - -Drive playback programmatically with methods like -[`play()`][flet_video.Video.play], [`pause()`][flet_video.Video.pause], [`stop()`][flet_video.Video.stop], [`seek()`][flet_video.Video.seek], [`next()`][flet_video.Video.next], and [`previous()`][flet_video.Video.previous], -and inspect status with methods like [`is_playing()`][flet_video.Video.is_playing], [`get_current_position()`][flet_video.Video.get_current_position], and [`get_duration()`][flet_video.Video.get_duration]. - -### Screenshot - -Shows how to capture the current video frame with -[`take_screenshot()`][flet_video.Video.take_screenshot] and display it as an image. - -### Playlist - -Mutate [`playlist`][flet_video.Video.playlist] directly to add, -remove, or replace items, and navigate between tracks. - -### Events - -Listen for player [events](#flet_video.Video-events) like -[`on_load`][flet_video.Video.on_load], [`on_complete`][flet_video.Video.on_complete], [`on_track_change`][flet_video.Video.on_track_change], etc. - -### Subtitles - -Attach a [`VideoSubtitleTrack`][flet_video.VideoSubtitleTrack] (here, raw VTT text) -and customize its appearance with [`VideoSubtitleConfiguration`][flet_video.VideoSubtitleConfiguration]. - -### Controls - -Switch between [`AdaptiveVideoControls`][flet_video.AdaptiveVideoControls], [`MaterialVideoControls`][flet_video.MaterialVideoControls], [`MaterialDesktopVideoControls`][flet_video.MaterialDesktopVideoControls], custom, and hidden control sets at runtime. - -### Mode-specific Controls - -Show different controls in normal vs. fullscreen mode by mapping each -[`VideoControlsMode`][flet_video.VideoControlsMode] to its own [`controls`][flet_video.Video.controls] value. - -### Button Bars - -Customize the [`primary_button_bar`][flet_video.MaterialDesktopVideoControls.primary_button_bar], -[`top_button_bar`][flet_video.MaterialDesktopVideoControls.top_button_bar], and -[`bottom_button_bar`][flet_video.MaterialDesktopVideoControls.bottom_button_bar] of -[`MaterialDesktopVideoControls`][flet_video.MaterialDesktopVideoControls] with built-in and custom items. - ## Description diff --git a/website/docs/controls/windowdragarea.md b/website/docs/controls/windowdragarea.md index 3d038f87df..d9e2d06c13 100644 --- a/website/docs/controls/windowdragarea.md +++ b/website/docs/controls/windowdragarea.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### No frame window - no-frame-window diff --git a/website/docs/services/audio/index.md b/website/docs/services/audio/index.md index bdc119e1a2..003012bba1 100644 --- a/website/docs/services/audio/index.md +++ b/website/docs/services/audio/index.md @@ -67,8 +67,6 @@ for installing on other Linux distributions. ## Examples -### Audio - ## Description diff --git a/website/docs/services/audiorecorder/index.md b/website/docs/services/audiorecorder/index.md index 1426c9105e..a3167aa4ac 100644 --- a/website/docs/services/audiorecorder/index.md +++ b/website/docs/services/audiorecorder/index.md @@ -162,8 +162,6 @@ permissions = ["microphone"] ## Examples -### Basic recording - ### Stream chunks and save/download \{#stream-chunks-and-save-download} diff --git a/website/docs/services/clipboard.md b/website/docs/services/clipboard.md index 0cb0cd244c..78e244d84c 100644 --- a/website/docs/services/clipboard.md +++ b/website/docs/services/clipboard.md @@ -10,16 +10,10 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Text - -### Images - -### Files - diff --git a/website/docs/services/filepicker.md b/website/docs/services/filepicker.md index b5a67f0350..6173d86765 100644 --- a/website/docs/services/filepicker.md +++ b/website/docs/services/filepicker.md @@ -86,8 +86,6 @@ ft.Image(src="/uploads/") ## Examples -### Pick, save, and get directory paths - diff --git a/website/docs/services/hapticfeedback.md b/website/docs/services/hapticfeedback.md index 7a226dd05a..ebf93fed24 100644 --- a/website/docs/services/hapticfeedback.md +++ b/website/docs/services/hapticfeedback.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Haptic feedback - diff --git a/website/docs/services/semanticsservice.md b/website/docs/services/semanticsservice.md index 8bc11eec02..02825d344a 100644 --- a/website/docs/services/semanticsservice.md +++ b/website/docs/services/semanticsservice.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Retrieve accessibility features - diff --git a/website/docs/services/shakedetector.md b/website/docs/services/shakedetector.md index 23f482e9ec..3ee376e267 100644 --- a/website/docs/services/shakedetector.md +++ b/website/docs/services/shakedetector.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### ShakeDetector - diff --git a/website/docs/services/sharedpreferences.md b/website/docs/services/sharedpreferences.md index 53803b7f9a..f4123db8f0 100644 --- a/website/docs/services/sharedpreferences.md +++ b/website/docs/services/sharedpreferences.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Shared preferences - diff --git a/website/docs/services/storagepaths.md b/website/docs/services/storagepaths.md index 2aecaf2811..70d5c3b508 100644 --- a/website/docs/services/storagepaths.md +++ b/website/docs/services/storagepaths.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Storage paths - diff --git a/website/docs/services/urllauncher.md b/website/docs/services/urllauncher.md index bfa6ab6364..a89313e4b4 100644 --- a/website/docs/services/urllauncher.md +++ b/website/docs/services/urllauncher.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### URL launcher - diff --git a/website/docs/types/alignment.md b/website/docs/types/alignment.md index a6163ea06f..39003c41f3 100644 --- a/website/docs/types/alignment.md +++ b/website/docs/types/alignment.md @@ -10,8 +10,6 @@ import {ClassAll, CodeExample, Image} from '@site/src/components/crocodocs'; ## Examples -### Example 1 - diff --git a/website/docs/types/animatedswitchertransition.md b/website/docs/types/animatedswitchertransition.md index bfd9a8094b..3add4a1fb1 100644 --- a/website/docs/types/animatedswitchertransition.md +++ b/website/docs/types/animatedswitchertransition.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/animationcurve.md b/website/docs/types/animationcurve.md index 80ce999868..f238518452 100644 --- a/website/docs/types/animationcurve.md +++ b/website/docs/types/animationcurve.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/applifecyclestate.md b/website/docs/types/applifecyclestate.md index 556ab0dab6..a28c868994 100644 --- a/website/docs/types/applifecyclestate.md +++ b/website/docs/types/applifecyclestate.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/assertiveness.md b/website/docs/types/assertiveness.md index c72d579069..62f4780972 100644 --- a/website/docs/types/assertiveness.md +++ b/website/docs/types/assertiveness.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/axis.md b/website/docs/types/axis.md index a65783f2c3..84b3b56cdc 100644 --- a/website/docs/types/axis.md +++ b/website/docs/types/axis.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/badge.md b/website/docs/types/badge.md index f75ac87ac8..02f56ba6f3 100644 --- a/website/docs/types/badge.md +++ b/website/docs/types/badge.md @@ -11,8 +11,6 @@ import {ClassMembers, ClassSummary, CodeExample, Image} from '@site/src/componen ## Examples -### Badge decorating an icon on a NavigationBar - diff --git a/website/docs/types/blendmode.md b/website/docs/types/blendmode.md index 3cd941464e..b7da5e527f 100644 --- a/website/docs/types/blendmode.md +++ b/website/docs/types/blendmode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/blurstyle.md b/website/docs/types/blurstyle.md index 60f7a7cd6b..2b87ac0af7 100644 --- a/website/docs/types/blurstyle.md +++ b/website/docs/types/blurstyle.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/blurtilemode.md b/website/docs/types/blurtilemode.md index d912193195..09f3813515 100644 --- a/website/docs/types/blurtilemode.md +++ b/website/docs/types/blurtilemode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/bordersidestrokealign.md b/website/docs/types/bordersidestrokealign.md index 4db62b4a42..84c8844cba 100644 --- a/website/docs/types/bordersidestrokealign.md +++ b/website/docs/types/bordersidestrokealign.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/borderstyle.md b/website/docs/types/borderstyle.md index 7014a35447..66213ed0c3 100644 --- a/website/docs/types/borderstyle.md +++ b/website/docs/types/borderstyle.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/boxfit.md b/website/docs/types/boxfit.md index d706d7e008..6005f160b8 100644 --- a/website/docs/types/boxfit.md +++ b/website/docs/types/boxfit.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/boxshape.md b/website/docs/types/boxshape.md index b7c58940ea..1a42c32eec 100644 --- a/website/docs/types/boxshape.md +++ b/website/docs/types/boxshape.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/cardvariant.md b/website/docs/types/cardvariant.md index 9ed6f37eec..dea631c491 100644 --- a/website/docs/types/cardvariant.md +++ b/website/docs/types/cardvariant.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/clipbehavior.md b/website/docs/types/clipbehavior.md index 87f8deec34..cfa747de61 100644 --- a/website/docs/types/clipbehavior.md +++ b/website/docs/types/clipbehavior.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/contextmenutrigger.md b/website/docs/types/contextmenutrigger.md index 9c21a6dea7..2f8e6b5046 100644 --- a/website/docs/types/contextmenutrigger.md +++ b/website/docs/types/contextmenutrigger.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/crossaxisalignment.md b/website/docs/types/crossaxisalignment.md index d37c4e03ac..8c150b3c92 100644 --- a/website/docs/types/crossaxisalignment.md +++ b/website/docs/types/crossaxisalignment.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/cupertinobuttonsize.md b/website/docs/types/cupertinobuttonsize.md index c03b70e5fd..09bcb33562 100644 --- a/website/docs/types/cupertinobuttonsize.md +++ b/website/docs/types/cupertinobuttonsize.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/cupertinodatepickerdateorder.md b/website/docs/types/cupertinodatepickerdateorder.md index 5dd29f6592..9291504bff 100644 --- a/website/docs/types/cupertinodatepickerdateorder.md +++ b/website/docs/types/cupertinodatepickerdateorder.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/cupertinodatepickermode.md b/website/docs/types/cupertinodatepickermode.md index 9c9952860a..ee02c7961c 100644 --- a/website/docs/types/cupertinodatepickermode.md +++ b/website/docs/types/cupertinodatepickermode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/cupertinotimerpickermode.md b/website/docs/types/cupertinotimerpickermode.md index d43dfbb406..a1ad7caac8 100644 --- a/website/docs/types/cupertinotimerpickermode.md +++ b/website/docs/types/cupertinotimerpickermode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/datepickerentrymode.md b/website/docs/types/datepickerentrymode.md index 7ca12bf60e..d20983ea87 100644 --- a/website/docs/types/datepickerentrymode.md +++ b/website/docs/types/datepickerentrymode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/datepickermode.md b/website/docs/types/datepickermode.md index 67b681826d..1d32e82c2d 100644 --- a/website/docs/types/datepickermode.md +++ b/website/docs/types/datepickermode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/dismissdirection.md b/website/docs/types/dismissdirection.md index 8e769363e5..1ea6420893 100644 --- a/website/docs/types/dismissdirection.md +++ b/website/docs/types/dismissdirection.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/filterquality.md b/website/docs/types/filterquality.md index 8faf828b7d..9ca9d32e09 100644 --- a/website/docs/types/filterquality.md +++ b/website/docs/types/filterquality.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/floatingactionbuttonlocation.md b/website/docs/types/floatingactionbuttonlocation.md index 65e9219167..0526471ecf 100644 --- a/website/docs/types/floatingactionbuttonlocation.md +++ b/website/docs/types/floatingactionbuttonlocation.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/fontweight.md b/website/docs/types/fontweight.md index 00de084014..0231498238 100644 --- a/website/docs/types/fontweight.md +++ b/website/docs/types/fontweight.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/gradienttilemode.md b/website/docs/types/gradienttilemode.md index 4c81a73c45..48b41d702d 100644 --- a/website/docs/types/gradienttilemode.md +++ b/website/docs/types/gradienttilemode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/imagerepeat.md b/website/docs/types/imagerepeat.md index 03dd068450..2d6cf1ea07 100644 --- a/website/docs/types/imagerepeat.md +++ b/website/docs/types/imagerepeat.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/labelposition.md b/website/docs/types/labelposition.md index 9164915cc0..622c48b6cf 100644 --- a/website/docs/types/labelposition.md +++ b/website/docs/types/labelposition.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/launchmode.md b/website/docs/types/launchmode.md index acc76a0c2e..dead7c0376 100644 --- a/website/docs/types/launchmode.md +++ b/website/docs/types/launchmode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/listtilestyle.md b/website/docs/types/listtilestyle.md index c69bdd3bd4..bdfa7a4edb 100644 --- a/website/docs/types/listtilestyle.md +++ b/website/docs/types/listtilestyle.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/listtiletitlealignment.md b/website/docs/types/listtiletitlealignment.md index f29883675b..6e62963f2d 100644 --- a/website/docs/types/listtiletitlealignment.md +++ b/website/docs/types/listtiletitlealignment.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/mainaxisalignment.md b/website/docs/types/mainaxisalignment.md index fdb4ec6745..25051f18ba 100644 --- a/website/docs/types/mainaxisalignment.md +++ b/website/docs/types/mainaxisalignment.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/mousecursor.md b/website/docs/types/mousecursor.md index 8b4140766e..25d6632db0 100644 --- a/website/docs/types/mousecursor.md +++ b/website/docs/types/mousecursor.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/navigationbarlabelbehavior.md b/website/docs/types/navigationbarlabelbehavior.md index a6d7eb9b48..336497c536 100644 --- a/website/docs/types/navigationbarlabelbehavior.md +++ b/website/docs/types/navigationbarlabelbehavior.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/navigationraillabeltype.md b/website/docs/types/navigationraillabeltype.md index 1f70d7edef..32839e75f3 100644 --- a/website/docs/types/navigationraillabeltype.md +++ b/website/docs/types/navigationraillabeltype.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/orientation.md b/website/docs/types/orientation.md index eae6e622e9..aa15195bbb 100644 --- a/website/docs/types/orientation.md +++ b/website/docs/types/orientation.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/overlayvisibilitymode.md b/website/docs/types/overlayvisibilitymode.md index 6a93296f90..0c1d7bec97 100644 --- a/website/docs/types/overlayvisibilitymode.md +++ b/website/docs/types/overlayvisibilitymode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/paintingstyle.md b/website/docs/types/paintingstyle.md index b734d7b80d..fa73094528 100644 --- a/website/docs/types/paintingstyle.md +++ b/website/docs/types/paintingstyle.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/pointmode.md b/website/docs/types/pointmode.md index 89a4342545..143537b569 100644 --- a/website/docs/types/pointmode.md +++ b/website/docs/types/pointmode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/popupmenuposition.md b/website/docs/types/popupmenuposition.md index 3192f9ab3f..36adc3f300 100644 --- a/website/docs/types/popupmenuposition.md +++ b/website/docs/types/popupmenuposition.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/scrollbar.md b/website/docs/types/scrollbar.md index 7f12e234a4..e6c57b204a 100644 --- a/website/docs/types/scrollbar.md +++ b/website/docs/types/scrollbar.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/scrollbarorientation.md b/website/docs/types/scrollbarorientation.md index 99da18d614..895e826d2c 100644 --- a/website/docs/types/scrollbarorientation.md +++ b/website/docs/types/scrollbarorientation.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/scrolldirection.md b/website/docs/types/scrolldirection.md index acaacd2f5f..8496ee6d2e 100644 --- a/website/docs/types/scrolldirection.md +++ b/website/docs/types/scrolldirection.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/scrollmode.md b/website/docs/types/scrollmode.md index a5c63b05f3..271a9d0b83 100644 --- a/website/docs/types/scrollmode.md +++ b/website/docs/types/scrollmode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/scrolltype.md b/website/docs/types/scrolltype.md index acc9053604..c3892b7615 100644 --- a/website/docs/types/scrolltype.md +++ b/website/docs/types/scrolltype.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/sliderinteraction.md b/website/docs/types/sliderinteraction.md index 62f3a0f0f6..e3a97d817a 100644 --- a/website/docs/types/sliderinteraction.md +++ b/website/docs/types/sliderinteraction.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/snackbarbehavior.md b/website/docs/types/snackbarbehavior.md index 06e0193610..a4e2ee94d9 100644 --- a/website/docs/types/snackbarbehavior.md +++ b/website/docs/types/snackbarbehavior.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/strokecap.md b/website/docs/types/strokecap.md index 54314a27d0..aeddcc81c7 100644 --- a/website/docs/types/strokecap.md +++ b/website/docs/types/strokecap.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/strokejoin.md b/website/docs/types/strokejoin.md index bb68bd89a8..d7de1e8763 100644 --- a/website/docs/types/strokejoin.md +++ b/website/docs/types/strokejoin.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/tabalignment.md b/website/docs/types/tabalignment.md index 27984940cc..ceb7717e53 100644 --- a/website/docs/types/tabalignment.md +++ b/website/docs/types/tabalignment.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/tabbarindicatorsize.md b/website/docs/types/tabbarindicatorsize.md index d0b856cc46..2008ea9e1f 100644 --- a/website/docs/types/tabbarindicatorsize.md +++ b/website/docs/types/tabbarindicatorsize.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/tabindicatoranimation.md b/website/docs/types/tabindicatoranimation.md index 4d5f4ffe29..b519c1a31b 100644 --- a/website/docs/types/tabindicatoranimation.md +++ b/website/docs/types/tabindicatoranimation.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/textalign.md b/website/docs/types/textalign.md index 4a6ea28135..067dceed2e 100644 --- a/website/docs/types/textalign.md +++ b/website/docs/types/textalign.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/textcapitalization.md b/website/docs/types/textcapitalization.md index bb3952ea4a..ee41894281 100644 --- a/website/docs/types/textcapitalization.md +++ b/website/docs/types/textcapitalization.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/textdecorationstyle.md b/website/docs/types/textdecorationstyle.md index f841742a3f..4c02b2ee79 100644 --- a/website/docs/types/textdecorationstyle.md +++ b/website/docs/types/textdecorationstyle.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/textoverflow.md b/website/docs/types/textoverflow.md index a964438fda..37acc02f44 100644 --- a/website/docs/types/textoverflow.md +++ b/website/docs/types/textoverflow.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/thememode.md b/website/docs/types/thememode.md index 13b124684b..30bade78fd 100644 --- a/website/docs/types/thememode.md +++ b/website/docs/types/thememode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/tileaffinity.md b/website/docs/types/tileaffinity.md index 31a30cd368..1e0740b1af 100644 --- a/website/docs/types/tileaffinity.md +++ b/website/docs/types/tileaffinity.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/timepickerentrymode.md b/website/docs/types/timepickerentrymode.md index 1ba7a45b6e..ac8a363369 100644 --- a/website/docs/types/timepickerentrymode.md +++ b/website/docs/types/timepickerentrymode.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/timepickerhourformat.md b/website/docs/types/timepickerhourformat.md index 04c4058bfd..ba0d25e6f8 100644 --- a/website/docs/types/timepickerhourformat.md +++ b/website/docs/types/timepickerhourformat.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/urltarget.md b/website/docs/types/urltarget.md index 2aa2c12d24..a0ee30529f 100644 --- a/website/docs/types/urltarget.md +++ b/website/docs/types/urltarget.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/visualdensity.md b/website/docs/types/visualdensity.md index c6ae826f7c..db797d8ae8 100644 --- a/website/docs/types/visualdensity.md +++ b/website/docs/types/visualdensity.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docs/types/windoweventtype.md b/website/docs/types/windoweventtype.md index 79d6f2d656..ca22581cd3 100644 --- a/website/docs/types/windoweventtype.md +++ b/website/docs/types/windoweventtype.md @@ -10,8 +10,6 @@ import {ClassMembers, ClassSummary, CodeExample} from '@site/src/components/croc ## Examples -### Showcase - diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index dfcb1e3010..2b6d53c7ae 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -202,6 +202,7 @@ module.exports = { docs: { // It is recommended to set document id as docs home page (`docs/` path). sidebarPath: require.resolve('./sidebars.js'), + beforeDefaultRemarkPlugins: [require('./plugins/remark-inject-example-headings')], remarkPlugins: [require('./plugins/remark-api-links'), require('./plugins/remark-code-annotations')], editUrl: 'https://github.com/flet-dev/flet/website/edit/main/', diff --git a/website/plugins/remark-inject-example-headings.js b/website/plugins/remark-inject-example-headings.js new file mode 100644 index 0000000000..b7bab3f1d7 --- /dev/null +++ b/website/plugins/remark-inject-example-headings.js @@ -0,0 +1,147 @@ +/** + * Remark plugin that injects a ### heading (and optional description) before + * each element, sourcing content from examples-metadata.json + * (built from [tool.flet.metadata] in pyproject.toml files). + * + * Relies on the MDX file having an `examples` frontmatter field (e.g. + * "controls/material/app_bar") and CodeExample path expressions of one of: + * path={frontMatter.examples + '/subfolder/main.py'} ← relative to frontmatter + * path={'controls/material/some_group/subfolder/main.py'} ← absolute hardcoded + * + * Add `displayTitle={false}` to a tag to suppress injection + * for that specific example (use when the doc page has a hand-written heading). + */ + +const fs = require("fs"); +const path = require("path"); + +// Matches: frontMatter.examples + '/subfolder/...', captures subfolder name. +const SUBFOLDER_RE = /frontMatter\.examples\s*\+\s*'\/([^/]+)\//; +// Matches: 'controls/.../subfolder/file.py', captures the directory path. +const HARDCODED_PATH_RE = /^'(controls\/.+)\/[^/']+\.py'$/; + +// Matches (in priority order): +// 1. [`code`][ref_id] — API cross-reference with code label +// 2. [text](url) or [`code`](url) — regular link +// 3. `code` — inline code +const INLINE_RE = /\[(`[^`]+`)\]\[([^\]]+)\]|\[(`[^`]+`|[^\]]*)\]\(([^)]+)\)|`([^`]+)`/g; + +// Parse a single line of inline markdown into AST children. +// Handles: [`code`][ref_id], [text](url), [`code`](url), `code`, plain text. +// +// For [`code`][ref_id], emits the text+inlineCode+text triplet that +// remark-api-links expects so it can resolve the ref to a real URL. +function parseInline(text) { + const nodes = []; + let lastIndex = 0; + let match; + INLINE_RE.lastIndex = 0; + while ((match = INLINE_RE.exec(text)) !== null) { + if (match.index > lastIndex) { + nodes.push({ type: "text", value: text.slice(lastIndex, match.index) }); + } + if (match[1] !== undefined) { + // [`code`][ref_id] — append "[" to preceding text node, then emit + // inlineCode + "][ref_id]" so remark-api-links can resolve the link. + if (nodes.length > 0 && nodes[nodes.length - 1].type === "text") { + nodes[nodes.length - 1].value += "["; + } else { + nodes.push({ type: "text", value: "[" }); + } + nodes.push({ type: "inlineCode", value: match[1].slice(1, -1) }); + nodes.push({ type: "text", value: `][${match[2]}]` }); + } else if (match[3] !== undefined) { + // Link: [text](url) or [`code`](url) + const linkText = match[3]; + const url = match[4]; + const child = + linkText.startsWith("`") && linkText.endsWith("`") + ? { type: "inlineCode", value: linkText.slice(1, -1) } + : { type: "text", value: linkText }; + nodes.push({ type: "link", url, children: [child] }); + } else { + // Inline code: `code` + nodes.push({ type: "inlineCode", value: match[5] }); + } + lastIndex = match.index + match[0].length; + } + if (lastIndex < text.length) { + nodes.push({ type: "text", value: text.slice(lastIndex) }); + } + return nodes; +} + +// Parse a (possibly multi-paragraph) markdown description string into an array +// of paragraph AST nodes. Paragraphs are separated by blank lines. +function parseDescription(text) { + return text + .trim() + .split(/\n\n+/) + .map((para) => ({ + type: "paragraph", + children: parseInline(para.replace(/\n/g, " ")), + })); +} + +module.exports = function remarkInjectExampleHeadings() { + const metadataPath = path.join(__dirname, "..", ".crocodocs", "examples-metadata.json"); + let metadata = {}; + if (fs.existsSync(metadataPath)) { + metadata = JSON.parse(fs.readFileSync(metadataPath, "utf8")); + } + + return (tree, file) => { + const examplesPath = file.data?.frontMatter?.examples; + if (!examplesPath) return; + + const insertions = []; + + for (let i = 0; i < tree.children.length; i++) { + const node = tree.children[i]; + if (node.type !== "mdxJsxFlowElement" || node.name !== "CodeExample") continue; + + const pathAttr = node.attributes?.find((a) => a.name === "path"); + if (!pathAttr) continue; + + const attrValue = pathAttr.value; + const exprValue = + attrValue?.type === "mdxJsxAttributeValueExpression" + ? attrValue.value + : typeof attrValue === "string" + ? attrValue + : ""; + + let metaKey; + const subfolderMatch = SUBFOLDER_RE.exec(exprValue); + if (subfolderMatch) { + metaKey = `${examplesPath}/${subfolderMatch[1]}`; + } else { + const hardcodedMatch = HARDCODED_PATH_RE.exec(exprValue); + if (hardcodedMatch) metaKey = hardcodedMatch[1]; + } + if (!metaKey) continue; + + const displayTitleAttr = node.attributes?.find((a) => a.name === "displayTitle"); + if (displayTitleAttr) { + const v = displayTitleAttr.value; + if (v?.type === "mdxJsxAttributeValueExpression" && v.value?.trim() === "false") continue; + } + + const entry = metadata[metaKey]; + const title = entry?.title; + if (!title) continue; + + insertions.push({ index: i, title, docsIntro: entry?.docs_intro ?? null }); + } + + // Insert in reverse order so earlier indices stay valid. + for (let i = insertions.length - 1; i >= 0; i--) { + const { index, title, docsIntro } = insertions[i]; + const nodes = [ + { type: "heading", depth: 3, children: [{ type: "text", value: title }] }, + ...(docsIntro ? parseDescription(docsIntro) : []), + ]; + tree.children.splice(index, 0, ...nodes); + } + }; +};