Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Flet platform assets

python docstring coverage

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

flet_platform_assets-1.0.0.dev2.tar.gz (35.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flet_platform_assets-1.0.0.dev2-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file flet_platform_assets-1.0.0.dev2.tar.gz.

File metadata

  • Download URL: flet_platform_assets-1.0.0.dev2.tar.gz
  • Upload date:
  • Size: 35.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.12 {"installer":{"name":"uv","version":"0.12.12","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

Hashes for flet_platform_assets-1.0.0.dev2.tar.gz
Algorithm Hash digest
SHA256 1353cc0632d3c2a805a6c1861e3a08ca9ad50a183016edbd28e1444bb093ccca
MD5 42e52a08104a0ce62829b97f6e6676ff
BLAKE2b-256 fceb86da93e5a4e59bd54faafd3289ae93c0e6a688e70865f811fdffcee7457d

See more details on using hashes here.

File details

Details for the file flet_platform_assets-1.0.0.dev2-py3-none-any.whl.

File metadata

  • Download URL: flet_platform_assets-1.0.0.dev2-py3-none-any.whl
  • Upload date:
  • Size: 25.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.12 {"installer":{"name":"uv","version":"0.12.12","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

Hashes for flet_platform_assets-1.0.0.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 66289032256ef069f1a319b3ef6ab8481de43dcfb4e60cfb4d7b31b28036d14c
MD5 9d9b58151140a3669bc03e54b5af3270
BLAKE2b-256 42d70a88b661313d277d72c4cc12131115282eae722644f2ed2663d445979412

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.0

2 files

This release

1.0.0.dev2 This release

2 files

0.1.0

2 files

0.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page