Flet platform assets
Turns one source image into every app icon and splash screen a platform expects —
iOS and macOS asset catalogs, Android mipmaps and adaptive layers, a multi-size
Windows .ico, the Linux hicolor tree, and web favicons, maskable icons and
splash images.
Used by flet build, and importable on its own. Pillow is the only dependency;
nothing here imports flet or flet-cli.
Rendering is separate from writing
render_*() is pure: it takes images and returns images, never touching the
filesystem and never printing. That makes it usable behind a UI that previews
icons before anything is built.
from flet_platform_assets import IconOptions, load_source, render_icons, write
source, _ = load_source("assets/icon.png")
result = render_icons(source, IconOptions())
for asset in result.assets: # preview
print(asset.relative_path, asset.image.size, asset.image.mode)
for warning in result.warnings: # diagnostics are data, not log output
print(warning)
write(result, "build/flutter") # the only step that touches disk
What it will not do
It never re-frames your artwork. The padding inside your icon is a design
decision, so only transforms the platform actually requires are applied —
flattening where alpha is rejected, the macOS icon grid, multi-size .ico,
opaque maskable icons.
The one exception is the Android 12 splash icon, whose canvas is a platform frame with a guaranteed-cropped outer third; there the artwork is fitted to the visible circle rather than silently clipped.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flet_platform_assets-1.0.0.tar.gz.
File metadata
- Download URL: flet_platform_assets-1.0.0.tar.gz
- Upload date:
- Size: 35.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4d3931dec8c279310e35a18f19eb824cda810bb689b6cf4ce5fe07e9fb47d04
|
|
| MD5 |
2b5e456fdcb8da9bad1a7f433a7f5cd8
|
|
| BLAKE2b-256 |
784b24173bc95d2224b8103bb7739cec2bdbfadd4c56dda8517a5676c9683be3
|
File details
Details for the file flet_platform_assets-1.0.0-py3-none-any.whl.
File metadata
- Download URL: flet_platform_assets-1.0.0-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de06ce4861addb03adc56162641fff0d080199eeee997fb9e02f7612120cec91
|
|
| MD5 |
53bea1a703eb0be80521cf561d36878a
|
|
| BLAKE2b-256 |
28c8b8a39b25d11c9a4f1add2e795e99613867cb04c022e6cceb6a2da93748d1
|