|
| 1 | +from doctest import Example |
| 2 | + |
| 3 | +import flet |
| 4 | +from flet import ( |
| 5 | + Column, |
| 6 | + Container, |
| 7 | + Divider, |
| 8 | + Page, |
| 9 | + Row, |
| 10 | + Text, |
| 11 | + VerticalDivider, |
| 12 | + alignment, |
| 13 | + colors, |
| 14 | +) |
| 15 | + |
| 16 | + |
| 17 | +def main(page: Page): |
| 18 | + |
| 19 | + page.add( |
| 20 | + Row( |
| 21 | + [ |
| 22 | + Column( |
| 23 | + [ |
| 24 | + Container( |
| 25 | + bgcolor=colors.AMBER, |
| 26 | + alignment=alignment.center, |
| 27 | + expand=True, |
| 28 | + ), |
| 29 | + Divider(), |
| 30 | + Container( |
| 31 | + bgcolor=colors.PINK, alignment=alignment.center, expand=True |
| 32 | + ), |
| 33 | + Divider(height=1, color="white"), |
| 34 | + Container( |
| 35 | + bgcolor=colors.BLUE_300, |
| 36 | + alignment=alignment.center, |
| 37 | + expand=True, |
| 38 | + ), |
| 39 | + Divider(height=9, thickness=3), |
| 40 | + Container( |
| 41 | + bgcolor=colors.DEEP_PURPLE_200, |
| 42 | + alignment=alignment.center, |
| 43 | + expand=True, |
| 44 | + ), |
| 45 | + ], |
| 46 | + spacing=0, |
| 47 | + expand=True, |
| 48 | + ), |
| 49 | + Row( |
| 50 | + [ |
| 51 | + Container( |
| 52 | + bgcolor=colors.ORANGE_300, |
| 53 | + alignment=alignment.center, |
| 54 | + expand=True, |
| 55 | + ), |
| 56 | + VerticalDivider(), |
| 57 | + Container( |
| 58 | + bgcolor=colors.BROWN_400, |
| 59 | + alignment=alignment.center, |
| 60 | + expand=True, |
| 61 | + ), |
| 62 | + VerticalDivider(width=1, color="white"), |
| 63 | + Container( |
| 64 | + bgcolor=colors.BLUE_300, |
| 65 | + alignment=alignment.center, |
| 66 | + expand=True, |
| 67 | + ), |
| 68 | + VerticalDivider(width=9, thickness=3), |
| 69 | + Container( |
| 70 | + bgcolor=colors.GREEN_300, |
| 71 | + alignment=alignment.center, |
| 72 | + expand=True, |
| 73 | + ), |
| 74 | + ], |
| 75 | + spacing=0, |
| 76 | + expand=True, |
| 77 | + ), |
| 78 | + ], |
| 79 | + expand=True, |
| 80 | + ) |
| 81 | + ) |
| 82 | + |
| 83 | + |
| 84 | +flet.app(target=main, view=flet.WEB_BROWSER) |
0 commit comments