v1.0
This commit is contained in:
parent
70a494567a
commit
2979bc8184
5 changed files with 32 additions and 0 deletions
9
README copy.md
Normal file
9
README copy.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# A doner Flet app
|
||||
|
||||
An example of a minimal Flet app.
|
||||
|
||||
To run the app:
|
||||
|
||||
```
|
||||
flet run [app_directory]
|
||||
```
|
BIN
assets/icon.png
Normal file
BIN
assets/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
2
code.sh
Normal file
2
code.sh
Normal file
|
@ -0,0 +1,2 @@
|
|||
cd ./doner
|
||||
source .venv/bin/activate
|
20
main.py
Normal file
20
main.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
import flet as ft
|
||||
|
||||
def main(page: ft.Page):
|
||||
page.title = "Döner Rechner"
|
||||
def d_to_g(e):
|
||||
tgeld.value = str(int(tdoner.value)*int(tpreis.value))
|
||||
page.update()
|
||||
def g_to_d(e):
|
||||
tdoner.value = str(int(tgeld.value)/int(tpreis.value))
|
||||
page.update()
|
||||
|
||||
tpreis = ft.TextField(value=5,keyboard_type="NUMBER",scale=0.5)
|
||||
tdoner = ft.TextField(on_change=d_to_g,keyboard_type="NUMBER")
|
||||
tgeld = ft.TextField(on_change=g_to_d,keyboard_type="NUMBER")
|
||||
page.add(ft.SafeArea(ft.Row([tpreis,ft.Text("Preis")])),
|
||||
ft.Row([tdoner,ft.Text("Döner")]),
|
||||
ft.Text("zu"),
|
||||
ft.Row([tgeld,ft.Text("Euro")]))
|
||||
|
||||
ft.app(main)
|
1
requirements.txt
Normal file
1
requirements.txt
Normal file
|
@ -0,0 +1 @@
|
|||
flet==0.22.*
|
Loading…
Reference in a new issue