r/FlutterDev • u/ruinivist • Oct 18 '26
Plugin Infinite Lazy Grid
https://pub.dev/packages/infinite_lazy_gridThis is a package for building performant infinite canvases ( I know the naming isn't the best but it has stuck ).
Uses spatial hashing underneath to only mount widgets within the visible area ( + some configurable off screen extent ).
Supports most of the common needs like pan, zoom, rotation, draw ordering, inertial scrolling etc.
Web example: https://infinite-lazy-grid.ruiny.de/
Github repo: https://github.com/ruinivist/infinite_lazy_grid
I'm already using it in one of my other web apps https://elseplane.ruiny.de/ ( still in works ) so you have almost everything needed to get something like that working.
4
u/gambley Oct 18 '26
In any example, when you zoom out, at certain zoom level it crashes
3
u/pavanpodila Oct 18 '26
Take a look at a production grade infinite canvas that we are using for the last year or so: https://diagram.vyuh.tech
1
u/ObjectiveAddress3051 Oct 20 '26
Spatial hashing for culling is a nice approach. On the zoom-out crash someone mentioned: at low zoom the visible area covers a huge number of hash cells, so the mounted widget count explodes. Capping the minimum zoom, or switching to a simplified level-of-detail (painting placeholders with a CustomPainter instead of mounting real widgets below a zoom threshold), would probably fix it and help performance too.