init
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
+26
@@ -0,0 +1,26 @@
|
||||
import flet as ft
|
||||
|
||||
|
||||
def main(page: ft.Page):
|
||||
counter = ft.Text("0", size=50, data=0)
|
||||
|
||||
def increment_click(e):
|
||||
counter.data += 1
|
||||
counter.value = str(counter.data)
|
||||
counter.update()
|
||||
|
||||
page.floating_action_button = ft.FloatingActionButton(
|
||||
icon=ft.Icons.ADD, on_click=increment_click
|
||||
)
|
||||
page.add(
|
||||
ft.SafeArea(
|
||||
ft.Container(
|
||||
counter,
|
||||
alignment=ft.alignment.center,
|
||||
),
|
||||
expand=True,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
ft.app(main)
|
||||
Reference in New Issue
Block a user