flet-m3-carousel
A Flet extension that wraps the Flutter m3_carousel package and exposes it as
the M3Carousel layout control.
The carousel layout and animation are delegated to the upstream package. This wrapper does not reimplement them.
Platform support
Tested on Linux desktop. Other platforms are supported by the upstream package but were not tested here.
| Platform | Status |
|---|---|
| Linux | Tested |
| Windows | Not tested |
| macOS | Not tested |
| Web | Not tested |
| iOS | Not tested |
| Android | Not tested |
Installation
Install the Python package:
pip install flet-m3-carousel
The Flutter side is built into the Flet client. After changing Dart code, rebuild the client.
Quick start
import flet as ft
from flet_m3_carousel import M3Carousel, M3CarouselItem
def main(page: ft.Page):
page.add(
M3Carousel(
height=320,
layout="hero",
axis="horizontal",
hero_alignment="center",
items=[
M3CarouselItem(key="mountains", image="assets/mountains.jpg", title="Mountains"),
M3CarouselItem(key="city", image="assets/city.jpg", title="City"),
M3CarouselItem(key="ocean", image="assets/ocean.jpg", title="Ocean"),
],
on_tap=lambda e: print(e.index, e.item_key),
)
)
ft.run(main)
Layouts
| Value | Upstream type | Description |
|---|---|---|
hero |
M3CarouselType.hero |
One large item with small peeking neighbors. |
contained |
M3CarouselType.contained |
Items stay contained in the content area. |
uncontained |
M3CarouselType.uncontained |
Items scroll to the container edge. |
uncontainedMultiAspect |
M3CarouselType.uncontainedMultiAspect |
Uncontained items with their own widths. |
fullScreen |
M3CarouselType.fullScreen |
One edge to edge item, scrolled vertically. |
Events
on_tap: fires when an item is tapped. Payload hasindex(zero based) anditem_key.on_change: fires when the focal item changes after scrolling. Payload hasindexanditem_key.
Demo
A runnable example is in examples/flet_m3_carousel_example. Build and run it with:
cd examples/flet_m3_carousel_example
flet build linux
flet run
Compatibility
This package follows Flet's extension model. Build the client after changing Dart code. Python-only changes do not require a rebuild.
Known limitations
- Item content is image-based. Arbitrary Flet controls are not supported as item content.
- Autoplay, infinite looping, custom physics, and custom spring curves are not exposed by the upstream package.
- Asset images must be declared in the app
pubspec.yaml. A Python relative path is not a Flutter asset path.
License
MIT for this wrapper. The upstream package is also MIT licensed.
Metadata
Release files for flet-m3-carousel 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| flet_m3_carousel-0.1.0.tar.gz | 11.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flet_m3_carousel-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.3 kB
Release files / flet_m3_carousel-0.1.0.tar.gz
| Download URL | flet_m3_carousel-0.1.0.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3458a1f375eec2f06d6c4c74694332e6e8ee407049a0c4e8e521226f8c8579f7
|
|
BLAKE2b-256 checksum How to use checksums |
d95ce71c5d3fd5362b0028875bebb703ed3460ce5aa2a8da3977252a90a6a695
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logRelease files / flet_m3_carousel-0.1.0-py3-none-any.whl
| Download URL | flet_m3_carousel-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e5c58f8a3c1d7dc45883a75b22ec91f4cc9377ec9ef11bac4ba9e7ae4032040
|
|
BLAKE2b-256 checksum How to use checksums |
bc33ea8be6992c0fb118f5795fdec78b96e3aeed1643fd81bd5e20b6b7695968
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logSecurity for flet-m3-carousel 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for flet_m3_carousel-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.