infinity_canvas 0.10.0
infinity_canvas: ^0.10.0 copied to clipboard
High-performance infinite canvas for Flutter with layered rendering and controller-driven camera/item APIs.
0.10.0 #
New features
-
Auto-measured item sizes now emit change signals on
CanvasItemsApi(controller.items), so consumers can reflow layouts (e.g. stacking a column of unknown-height nodes) without post-frame retry/settle loops:ValueListenable<Size?>? measuredSizeListenable(String itemId)— per-item; value isnulluntil first layout, then fires on each measured-size change.ValueListenable<int> get measurementRevision— increments whenever any item's measured size changes; convenient for reflowing a group from one listener.
Guarantee: when either signal fires,
getMeasuredSize/getEffectiveSizealready return the new size (no stale one-frame lag).
Breaking changes
-
Added the two members above to the
CanvasItemsApiinterface. This is additive for code that only usescontroller.items, but a compile-time break for any code that implementsCanvasItemsApi(orCanvasApi).Migrate: implementers must add
measuredSizeListenableandmeasurementRevisionto their implementation.
0.9.0 #
Breaking changes
-
CanvasLayerControllerrenamed toCanvasApi.Migrate: replace every occurrence of
CanvasLayerControllerwithCanvasApi. -
CanvasTransformPainterBuildernow receives a secondCanvasApi controllerparameter, consistent withCanvasTransformWidgetBuilder.Migrate: add
_or a named parameter to everypainterBuilderlambda.// Before painterBuilder: (t) => MyPainter(transform: t) // After painterBuilder: (t, controller) => MyPainter(transform: t, controller: controller) -
CanvasApiis the single consistent interface passed to both builder callbacks, exposing the full canvas API via.camera,.items, and.layers.
0.8.1 #
Initial standalone release of infinity_canvas.
- Infinite canvas with layered rendering for positioned items, painters, and overlays
- Controller-driven camera APIs for pan, zoom, jump, animate, and fit operations
- Programmatic item APIs for world position updates, batch updates, transforms, and bring-to-front
- Input behaviors for desktop, touch, and locked interaction modes
- Culling and throttled render stats for larger scenes
- Support for hover, drag, diagnostics, and screen/world coordinate conversion