Skip to content

Commit eaea2b8

Browse files
authored
Update overview.md (#392)
I have added an example of column and row being used with expand.
1 parent 47dd1af commit eaea2b8

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/controls/overview.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,27 @@ 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) .
107+
```pyhton
108+
import flet as ft
109+
110+
111+
def main(page: ft.Page):
112+
page.spacing=0
113+
page.padding=0
114+
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+
)
123+
124+
ft.app(main)
125+
```
126+
106127
### `expand_loose`
107128

108129
Effective only if `expand` is `True`.

0 commit comments

Comments
 (0)