two
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
# FletTry1 app
|
||||
|
||||
## Run the app
|
||||
|
||||
### uv
|
||||
|
||||
Run as a desktop app:
|
||||
|
||||
```
|
||||
uv run flet run
|
||||
```
|
||||
|
||||
Run as a web app:
|
||||
|
||||
```
|
||||
uv run flet run --web
|
||||
```
|
||||
|
||||
### Poetry
|
||||
|
||||
Install dependencies from `pyproject.toml`:
|
||||
|
||||
```
|
||||
poetry install
|
||||
```
|
||||
|
||||
Run as a desktop app:
|
||||
|
||||
```
|
||||
poetry run flet run
|
||||
```
|
||||
|
||||
Run as a web app:
|
||||
|
||||
```
|
||||
poetry run flet run --web
|
||||
```
|
||||
|
||||
For more details on running the app, refer to the [Getting Started Guide](https://flet.dev/docs/getting-started/).
|
||||
|
||||
## Build the app
|
||||
|
||||
### Android
|
||||
|
||||
```
|
||||
flet build apk -v
|
||||
```
|
||||
|
||||
For more details on building and signing `.apk` or `.aab`, refer to the [Android Packaging Guide](https://flet.dev/docs/publish/android/).
|
||||
|
||||
### iOS
|
||||
|
||||
```
|
||||
flet build ipa -v
|
||||
```
|
||||
|
||||
For more details on building and signing `.ipa`, refer to the [iOS Packaging Guide](https://flet.dev/docs/publish/ios/).
|
||||
|
||||
### macOS
|
||||
|
||||
```
|
||||
flet build macos -v
|
||||
```
|
||||
|
||||
For more details on building macOS package, refer to the [macOS Packaging Guide](https://flet.dev/docs/publish/macos/).
|
||||
|
||||
### Linux
|
||||
|
||||
```
|
||||
flet build linux -v
|
||||
```
|
||||
|
||||
For more details on building Linux package, refer to the [Linux Packaging Guide](https://flet.dev/docs/publish/linux/).
|
||||
|
||||
### Windows
|
||||
|
||||
```
|
||||
flet build windows -v
|
||||
```
|
||||
|
||||
For more details on building Windows package, refer to the [Windows Packaging Guide](https://flet.dev/docs/publish/windows/).
|
||||
@@ -0,0 +1,41 @@
|
||||
[project]
|
||||
name = "flet-try1"
|
||||
version = "0.1.0"
|
||||
description = ""
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "Flet developer", email = "you@example.com" }
|
||||
]
|
||||
dependencies = [
|
||||
"flet==0.27.6"
|
||||
]
|
||||
|
||||
[tool.flet]
|
||||
# org name in reverse domain name notation, e.g. "com.mycompany".
|
||||
# Combined with project.name to build bundle ID for iOS and Android apps
|
||||
org = "com.mycompany"
|
||||
|
||||
# project display name that is used as an app title on Android and iOS home screens,
|
||||
# shown in window titles and about app dialogs on desktop.
|
||||
product = "flet-try1"
|
||||
|
||||
# company name to display in about app dialogs
|
||||
company = "Flet"
|
||||
|
||||
# copyright text to display in about app dialogs
|
||||
copyright = "Copyright (C) 2025 by Flet"
|
||||
|
||||
[tool.flet.app]
|
||||
path = "src"
|
||||
|
||||
[tool.uv]
|
||||
dev-dependencies = [
|
||||
"flet[all]==0.27.6",
|
||||
]
|
||||
|
||||
[tool.poetry]
|
||||
package-mode = false
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
flet = {extras = ["all"], version = "0.27.6"}
|
||||
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