Skip to content

Commit a4bd291

Browse files
committed
more demo
1 parent 8c8307c commit a4bd291

File tree

104 files changed

+334
-416
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+334
-416
lines changed

sdk/python/packages/flet/docs/apps/examples-gallery/pyproject.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[project]
2-
name = "poc"
2+
name = "examples-gallery"
33
version = "0.1.0"
44
description = ""
55
readme = "README.md"
@@ -17,9 +17,14 @@ prerelease = "allow"
1717
[tool.flet]
1818
# Docs: https://flet.dev/docs/publish
1919
org = "com.mycompany"
20-
product = "poc"
20+
product = "Examples Gallery"
2121
company = "Flet"
2222
copyright = "Copyright (C) 2025 by Flet"
2323

2424
[tool.flet.app]
2525
path = "src"
26+
27+
[tool.flet.web]
28+
base_url = "apps/examples-gallery/dist"
29+
renderer = "auto"
30+
route_url_strategy = "hash"

sdk/python/packages/flet/docs/controls/alertdialog.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ example_images: ../test-images/examples/material/golden/macos/alert_dialog
88

99
## Examples
1010

11-
[Live example](https://flet-controls-gallery.fly.dev/dialogs/alertdialog)
12-
1311
### Modal and non-modal dialogs
1412

1513
```python
1614
--8<-- "{{ examples }}/modal_and_non_modal.py"
1715
```
1816

19-
{{ image(example_images + "/alert_dialog_flow.gif", alt="Modal and non-modal dialogs", caption="Modal and non-modal dialogs",width="50%") }}
17+
{{ demo("alert_dialog/modal_and_non_modal", height="420", width="80%") }}
2018

2119

2220
{{ class_members(class_name) }}

sdk/python/packages/flet/docs/controls/animatedswitcher.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,29 @@ example_images: ../examples/controls/animated_switcher/media
88

99
## Examples
1010

11-
[Live example](https://flet-controls-gallery.fly.dev/animations/animated_switcher)
12-
1311
### Animated switching between two containers with scale effect
1412

1513
```python
1614
--8<-- "{{ examples }}/scale_effect.py"
1715
```
1816

19-
{{ image(example_images + "/scale_effect.gif", alt="scale-effect", width="80%") }}
20-
17+
{{ demo("animated_switcher/scale_effect", height="420", width="80%") }}
2118

2219
### Animate Image switch
2320

2421
```python
2522
--8<-- "{{ examples }}/image_switch.py"
2623
```
2724

25+
{{ demo("animated_switcher/image_switch", height="420", width="80%") }}
26+
2827
### Animate Image switch buffered
2928

3029
```python
3130
--8<-- "{{ examples }}/image_switch_buffered.py"
3231
```
3332

33+
{{ demo("animated_switcher/image_switch_buffered", height="420", width="80%") }}
34+
35+
3436
{{ class_members(class_name) }}

sdk/python/packages/flet/docs/controls/appbar.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@ example_media: ../examples/controls/app_bar/media
99

1010
## Examples
1111

12-
[Live example](https://flet-controls-gallery.fly.dev/navigation/appbar)
13-
1412
### Actions and Popup Menu
1513

1614
```python
1715
--8<-- "{{ examples }}/actions_and_popup_menu.py"
1816
```
1917

20-
{{ image(example_media + "/actions_and_popup_menu.gif", alt="actions-and-popup-menu", width="80%") }}
18+
{{ demo("app_bar/actions_and_popup_menu", height="420", width="80%") }}
2119

2220

2321
### Theme and Material Mode Toggles
@@ -26,4 +24,7 @@ example_media: ../examples/controls/app_bar/media
2624
--8<-- "{{ examples }}/theme_and_material_mode_toggles.py"
2725
```
2826

27+
{{ demo("app_bar/theme_and_material_mode_toggles", height="420", width="80%") }}
28+
29+
2930
{{ class_members(class_name) }}

sdk/python/packages/flet/docs/controls/autocomplete.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ example_images: ../examples/controls/auto_complete/media
88

99
## Examples
1010

11-
[Live example](https://flet-controls-gallery.fly.dev/input/autocomplete)
12-
1311
### Basic example
1412

1513
```python
1614
--8<-- "{{ examples }}/basic.py"
1715
```
1816

17+
{{ demo("auto_complete/basic", height="380", width="80%") }}
18+
1919

2020
{{ class_members(class_name) }}

sdk/python/packages/flet/docs/controls/autofillgroup.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ example_images: ../examples/controls/autofill_group/media
88

99
## Examples
1010

11-
[Live example](https://flet-controls-gallery.fly.dev/input/autofillgroup)
12-
1311
### Basic example
1412

1513
```python
1614
--8<-- "{{ examples }}/basic.py"
1715
```
1816

19-
{{ image(example_images + "/basic.gif", alt="basic", width="80%") }}
17+
{{ demo("autofill_group/basic", height="380", width="80%") }}
2018

2119

2220
{{ class_members(class_name) }}

sdk/python/packages/flet/docs/controls/banner.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@ example_media: ../examples/controls/banner/media
99

1010
## Examples
1111

12-
[Live example](https://flet-controls-gallery.fly.dev/dialogs/banner)
13-
1412
### Basic example
1513

1614
```python
1715
--8<-- "{{ examples }}/basic.py"
1816
```
1917

20-
{{ image(example_media + "/basic.gif", alt="basic", width="80%") }}
18+
{{ demo("banner/basic", height="380", width="80%") }}
2119

2220

2321
{{ class_members(class_name) }}

sdk/python/packages/flet/docs/controls/bottomappbar.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,21 @@ example_images: ../test-images/examples/material/golden/macos/bottom_app_bar
88

99
## Examples
1010

11-
[Live example](https://flet-controls-gallery.fly.dev/navigation/bottomappbar)
12-
1311
### Notched `FloatingActionButton`
1412

1513
```python
1614
--8<-- "{{ examples }}/notched_fab.py"
1715
```
1816

19-
{{ image(example_images + "/notched_fab.png", width="80%") }}
17+
{{ demo("bottom_app_bar/notched_fab", height="380", width="80%") }}
2018

2119
### Custom border radius
2220

2321
```python
2422
--8<-- "{{ examples }}/border_radius.py"
2523
```
2624

27-
{{ image(example_images + "/border_radius.png", width="80%") }}
25+
{{ demo("bottom_app_bar/border_radius", height="380", width="80%") }}
26+
2827

2928
{{ class_members(class_name) }}

sdk/python/packages/flet/docs/controls/bottomsheet.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,21 @@ example_images: ../test-images/examples/material/golden/macos/bottom_sheet
88

99
## Examples
1010

11-
[Live example](https://flet-controls-gallery.fly.dev/dialogs/bottomsheet)
12-
1311
### Basic example
1412

1513
```python
1614
--8<-- "{{ examples }}/basic.py"
1715
```
1816

19-
{{ image(example_images + "/basic.gif", width="60%") }}
17+
{{ demo("bottom_sheet/basic", height="380", width="80%") }}
2018

2119
### Fullscreen
2220

2321
```python
2422
--8<-- "{{ examples }}/fullscreen.py"
2523
```
2624

27-
{{ image(example_images + "/fullscreen.gif", width="60%") }}
25+
{{ demo("bottom_sheet/fullscreen", height="380", width="80%") }}
2826

2927

3028
{{ class_members(class_name) }}

sdk/python/packages/flet/docs/controls/button.md

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,75 +8,61 @@ example_images: ../test-images/examples/material/golden/macos/button
88

99
## Examples
1010

11-
[Live example](https://flet-controls-gallery.fly.dev/buttons/elevatedbutton)
12-
1311
### Button
1412

1513
```python
1614
--8<-- "{{ examples }}/basic.py"
1715
```
1816

19-
{{ image(example_images + "/basic.png", alt="Basic button", width="50%") }}
20-
17+
{{ demo("button/basic", height="340", width="80%") }}
2118

2219
### Icons
2320

2421
```python
2522
--8<-- "{{ examples }}/icons.py"
2623
```
2724

28-
{{ image(example_images + "/icons.png", alt="Basic button", width="50%") }}
29-
25+
{{ demo("button/icons", height="340", width="80%") }}
3026

3127
### Handling clicks
3228

3329
```python
3430
--8<-- "{{ examples }}/handling_clicks.py"
3531
```
3632

37-
{{ image(example_images + "/handling_clicks.png", alt="Handling clicks", width="50%") }}
38-
33+
{{ demo("button/handling_clicks", height="360", width="80%") }}
3934

4035
### Custom content
4136

4237
```python
4338
--8<-- "{{ examples }}/custom_content.py"
4439
```
4540

46-
{{ image(example_images + "/custom_content.png", alt="Buttons with custom content", width="50%") }}
47-
41+
{{ demo("button/custom_content", height="360", width="80%") }}
4842

4943
### Shapes
5044

5145
```python
5246
--8<-- "{{ examples }}/button_shapes.py"
5347
```
5448

55-
{{ image(example_images + "/button_shapes.png", alt="Buttons with different shapes", width="50%") }}
56-
49+
{{ demo("button/button_shapes", height="380", width="80%") }}
5750

5851
### Styling
5952

6053
```python
6154
--8<-- "{{ examples }}/styling.py"
6255
```
6356

64-
{{ image(example_images + "/styled_initial.png", alt="Styled button - default state", width="50%", caption="Default state") }}
65-
66-
67-
{{ image(example_images + "/styled_hovered.png", alt="Styled button - hovered state", width="50%", caption="Hovered state") }}
68-
57+
{{ demo("button/styling", height="420", width="80%") }}
6958

7059
### Animate on hover
7160

7261
```python
7362
--8<-- "{{ examples }}/animate_on_hover.py"
7463
```
7564

76-
{{ image(example_images + "/animate_on_hover_initial.png", alt="Unhovered button", width="50%", caption="Normal button") }}
77-
78-
79-
{{ image(example_images + "/animate_on_hover_hovered.png", alt="Hovered button", width="50%", caption="Hovered button") }}
65+
{{ demo("button/animate_on_hover", height="420", width="80%") }}
8066

8167

8268
{{ class_members(class_name) }}

0 commit comments

Comments
 (0)