two
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 |
+25
@@ -0,0 +1,25 @@
|
||||
import flet as ft
|
||||
import time
|
||||
|
||||
|
||||
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(counter)
|
||||
t2 = ft.Text("-", size=40)
|
||||
page.add(t2)
|
||||
for i in range(10):
|
||||
t2.value = f"Step {i}"
|
||||
page.update()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
ft.app(main)
|
||||
Reference in New Issue
Block a user