init
This commit is contained in:
166
.gitignore
vendored
Normal file
166
.gitignore
vendored
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
share/python-wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
MANIFEST
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.nox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
*.cover
|
||||||
|
*.py,cover
|
||||||
|
.hypothesis/
|
||||||
|
.pytest_cache/
|
||||||
|
cover/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
db.sqlite3
|
||||||
|
db.sqlite3-journal
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
.pybuilder/
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# IPython
|
||||||
|
profile_default/
|
||||||
|
ipython_config.py
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
# For a library or package, you might want to ignore these files since the code is
|
||||||
|
# intended to run in multiple environments; otherwise, check them in:
|
||||||
|
# .python-version
|
||||||
|
|
||||||
|
# pipenv
|
||||||
|
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||||
|
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||||
|
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||||
|
# install all needed dependencies.
|
||||||
|
#Pipfile.lock
|
||||||
|
|
||||||
|
# poetry
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||||
|
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||||
|
# commonly ignored for libraries.
|
||||||
|
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||||
|
*.lock
|
||||||
|
|
||||||
|
# pdm
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||||
|
#pdm.lock
|
||||||
|
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||||
|
# in version control.
|
||||||
|
# https://pdm.fming.dev/#use-with-ide
|
||||||
|
.pdm.toml
|
||||||
|
|
||||||
|
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||||
|
__pypackages__/
|
||||||
|
|
||||||
|
# Celery stuff
|
||||||
|
celerybeat-schedule
|
||||||
|
celerybeat.pid
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
*.sage.py
|
||||||
|
|
||||||
|
# Environments
|
||||||
|
.env
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
env.bak/
|
||||||
|
venv.bak/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
.spyproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
|
||||||
|
# mkdocs documentation
|
||||||
|
/site
|
||||||
|
|
||||||
|
# mypy
|
||||||
|
.mypy_cache/
|
||||||
|
.dmypy.json
|
||||||
|
dmypy.json
|
||||||
|
|
||||||
|
# Pyre type checker
|
||||||
|
.pyre/
|
||||||
|
|
||||||
|
# pytype static type analyzer
|
||||||
|
.pytype/
|
||||||
|
|
||||||
|
# Cython debug symbols
|
||||||
|
cython_debug/
|
||||||
|
|
||||||
|
# PyCharm
|
||||||
|
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||||
|
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||||
|
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||||
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
|
#.idea/
|
||||||
|
|
||||||
|
# Flet
|
||||||
|
storage/
|
||||||
|
|
||||||
|
# Custom
|
||||||
|
ingredients.json
|
||||||
81
README.md
Normal file
81
README.md
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
# Meal Picker 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/).
|
||||||
41
pyproject.toml
Normal file
41
pyproject.toml
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
[project]
|
||||||
|
name = "Meal Picker"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = "An app designed to build, store, and select meals for shopping purposes."
|
||||||
|
readme = "README.md"
|
||||||
|
requires-python = ">=3.9"
|
||||||
|
authors = [
|
||||||
|
{ name = "Nick Kalar", email = "nick@kalar.codes" }
|
||||||
|
]
|
||||||
|
dependencies = [
|
||||||
|
"flet==0.28.3"
|
||||||
|
]
|
||||||
|
|
||||||
|
[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 = "codes.kalar"
|
||||||
|
|
||||||
|
# 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 = "shopping"
|
||||||
|
|
||||||
|
# company name to display in about app dialogs
|
||||||
|
company = "Nick Kalar"
|
||||||
|
|
||||||
|
# copyright text to display in about app dialogs
|
||||||
|
copyright = "Copyright (C) 2025 by Nick Kalar"
|
||||||
|
|
||||||
|
[tool.flet.app]
|
||||||
|
path = "src"
|
||||||
|
|
||||||
|
[tool.uv]
|
||||||
|
dev-dependencies = [
|
||||||
|
"flet[all]==0.28.3",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.poetry]
|
||||||
|
package-mode = false
|
||||||
|
|
||||||
|
[tool.poetry.group.dev.dependencies]
|
||||||
|
flet = {extras = ["all"], version = "0.28.3"}
|
||||||
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
python-dotenv
|
||||||
|
flet[all]
|
||||||
BIN
src/assets/icon.png
Normal file
BIN
src/assets/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
BIN
src/assets/splash_android.png
Normal file
BIN
src/assets/splash_android.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
26
src/main.py
Normal file
26
src/main.py
Normal file
@@ -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