Skip to main content

Cacheimg and CacheCircleAvatar control for Flet

Project description

flet-cacheimg

Cacheimg and CacheCircleAvatar controls for Flet

Warning

Images will only be cached in built packages.

flet build ...

If you run project via

flet run

those controls will act exactly the same as basic ft.Image and ft.CircleAvatar.
This is limitation of the current Flet version (0.28.3).

Usage

import flet as ft
from flet_cacheimg import Cacheimg, CacheCircleAvatar


def main(page: ft.Page):
    page.add(
        Cacheimg(
            src="https://flet.dev/img/logo.svg",
            width=150,
            height=150,
            tooltip="Cached image",
            opacity=0.9,
        )
    )
    page.add(
        CacheCircleAvatar(
            radius=24,
            foreground_image_src='https://flet.dev/img/logo.svg',
        )
    )
    page.add(
        ft.CircleAvatar(
            radius=20,
            content=Cacheimg(
                src='https://flet.dev/img/logo.svg',
                width=40,
                height=40,
                fit=ft.ImageFit.COVER,
            ),
        )
    )


ft.app(main)

Installation

Add dependency to pyproject.toml of your Flet app:

  • Git dependency

Link to git repository:

dependencies = [
  "flet-cacheimg @ git+https://github.com/ReYaNOW/flet-cacheimg",
  "flet>=0.28.3",
]
  • PyPi dependency

If the package is published on pypi.org:

dependencies = [
  "flet-cacheimg",
  "flet>=0.28.3",
]

Build your app:

flet build apk -v

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flet_cacheimg-0.1.2.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

flet_cacheimg-0.1.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file flet_cacheimg-0.1.2.tar.gz.

File metadata

  • Download URL: flet_cacheimg-0.1.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.10.12 Linux/5.15.133.1-microsoft-standard-WSL2

File hashes

Hashes for flet_cacheimg-0.1.2.tar.gz
Algorithm Hash digest
SHA256 92b3e20f76491998677ca60a462e57a5dba727cd98ad1ca26df1af0bdf174b86
MD5 7492c4689b69dc0b6de8bbde1eb14279
BLAKE2b-256 c4b36b28ed88b9966a97ef9c1a90aa51c48fbf6568cd0b33be510a16cd87cf50

See more details on using hashes here.

File details

Details for the file flet_cacheimg-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: flet_cacheimg-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.10.12 Linux/5.15.133.1-microsoft-standard-WSL2

File hashes

Hashes for flet_cacheimg-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4faa410f4f6afe794b2954edb4a6a1003fc85ad4723448202282cf73d47c47cc
MD5 3cc64670f64db1ace2596dbd47a5b1e9
BLAKE2b-256 f50a3ae83f88819fe06fd661bc6c69308ede56b3ffb4813d06e1762b13c7d2f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page