piksel 0.2.1
piksel: ^0.2.1 copied to clipboard
A type-safe, extensible image loading and caching pipeline for Flutter — network, SVG, AVIF, GIF, video-frame and blurhash behind one API.
Changelog #
0.2.1 #
- Add the piksel logo and pub.dev thumbnail.
- All piksel packages now version in lockstep. No code changes.
0.2.0 #
PikselPrefetcher: viewport-ahead prefetch for lists and grids. Report the index being built fromitemBuilder; the prefetcher warms the next N tiles in the direction of travel under a bounded concurrency cap and cancels all pending work when the scroll direction reverses.- Lower steady-state build cost per tile: constraint-driven decode sizing now
uses a layout-time size probe instead of a
LayoutBuilderrebuild scope, and the crossfade wrapper unwraps once the fade completes, leaving settled tiles as a bareRawImage. - Warm memory hits on sizeless requests are now adopted during the first build, before layout constraints are known.
- Cold loads are deferred while the enclosing scrollable is in a fast fling (re-checked per frame), so tiles that fly past the viewport never fetch or decode at all.
- Download-progress events no longer rebuild the widget unless a custom
builderis present — the default placeholder never displays progress. - Fixed an unhandled
CancelledExceptionescaping the widget's load chain when an in-flight load was cancelled (dispose mid-scroll, request swap).
0.1.0 #
Initial release.
- Type-safe request model: sealed
LoadState/ImageResult,ImageRequest+copyWith, openImageSourcefor plugin sources. - Pipeline: Fetcher → Decoder → Transformation with OkHttp-style request and
decode interceptor chains and a
ComponentRegistryextension seam. - Three-tier cache: in-memory LRU (clone-on-read ref safety), result disk cache (decoded+transformed), download disk cache (raw bytes). File-backed on native/desktop, IndexedDB on web.
- Concurrency: bounded fetch/decode pools, in-flight request dedup, cooperative cancellation, size-aware decode downsampling.
- Retry: exponential backoff + jitter for transient failures (connection errors, HTTP 408/429/5xx); permanent failures fail fast.
- Animation: GIF and animated WebP play through the engine codec; plugin
formats animate via the
AnimatedDecoderseam.animate: falsepins the first frame. - Widgets:
PikselImagewith synchronous warm-memory rendering (a cached image paints in the widget's first build), crossfade, placeholder/error state images, progress, exhaustive-switch custom builders. ImageProviderinterop for stock Flutter widgets.- Transformations: rounded corners, circle crop, blur.
