Skip to content

Commit 5f5fcf4

Browse files
Format example (#393)
1 parent eaea2b8 commit 5f5fcf4

File tree

1 file changed

+31
-12
lines changed

1 file changed

+31
-12
lines changed

docs/controls/overview.md

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,23 +103,42 @@ When a child Control is placed into a [`Column`](/docs/controls/column) or a [`R
103103

104104
For more information and examples about `expand` property see "Expanding children" sections in [`Column`](/docs/controls/column#expanding-children) or [`Row`](/docs/controls/row#expanding-children).
105105

106-
Here is an example of expand being used in action for both [`Column`](/docs/controls/column) and [`Row`](/docs/controls/row) .
106+
Here is an example of expand being used in action for both [`Column`](/docs/controls/column) and [`Row`](/docs/controls/row):
107+
107108
```pyhton
108109
import flet as ft
109110
110-
111111
def main(page: ft.Page):
112-
page.spacing=0
113-
page.padding=0
112+
page.spacing = 0
113+
page.padding = 0
114114
page.add(
115-
ft.Column(controls=[
116-
ft.Row(
117-
[
118-
ft.Card(content=ft.Text("Card_1"),color=ft.Colors.ORANGE_300,expand=True,height=page.height,margin=0),
119-
ft.Card(content=ft.Text("Card_2"),color=ft.Colors.GREEN_100,expand=True,height=page.height,margin=0)
120-
],expand=True,spacing=0),
121-
],expand=True,spacing=0),
122-
)
115+
ft.Column(
116+
controls=[
117+
ft.Row(
118+
[
119+
ft.Card(
120+
content=ft.Text("Card_1"),
121+
color=ft.Colors.ORANGE_300,
122+
expand=True,
123+
height=page.height,
124+
margin=0,
125+
),
126+
ft.Card(
127+
content=ft.Text("Card_2"),
128+
color=ft.Colors.GREEN_100,
129+
expand=True,
130+
height=page.height,
131+
margin=0,
132+
),
133+
],
134+
expand=True,
135+
spacing=0,
136+
),
137+
],
138+
expand=True,
139+
spacing=0,
140+
),
141+
)
123142
124143
ft.app(main)
125144
```

0 commit comments

Comments
 (0)