Skip to main content

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.

Try Flet online in Flet Studio

Start your next Flet app in the browser, then use this package locally to prepare its icons and splash screens. Write your own Python code or get help from the AI agent.

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.

Metadata

Release files for flet-platform-assets 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flet-platform-assets 1.0.1
File Size Uploaded
flet_platform_assets-1.0.1.tar.gz 35.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flet-platform-assets 1.0.1
File Interpreter ABI Platform
flet_platform_assets-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 61.5 kB

Release files / flet_platform_assets-1.0.1.tar.gz

Download URL flet_platform_assets-1.0.1.tar.gz
Size 35.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c01e5fa1055d3fae72b8b783a4c9c5c393dede0fd575613097660c1a2d3598a9
BLAKE2b-256 checksum
How to use checksums
f3474be31ba9b2da9820e6b286f310b02c5462e293dd7ec76c143eac0a5b2a65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","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}

Release files / flet_platform_assets-1.0.1-py3-none-any.whl

Download URL flet_platform_assets-1.0.1-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5233bcc44fddc4315d4f2171eba76a7b36ee641a0c3fef31c7a9e8abe064ed4b
BLAKE2b-256 checksum
How to use checksums
8d11813c65fb1b05355125a5bd9d10c13cc74fe296de8acfc05393416984ffac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","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}

Release history Release notifications | RSS feed

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.1.0

2 release files

0.0.0

2 release 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