flutter-lazy-performance
flutter-lazy-performance copied to clipboard
Experimenting : MiniMap
@justinmc
Since this repository is a good starting point for demoing , understanding and experimenting on the Interactive viewer. A very very good starting point BTW :-)
They idea is to provide an example of how to handle moving to the desire location using a click in the MiniMap. Eventually adding a rectangle in the pan to see what is the portion of the univers you are looking too. This is not trivial to implement it with the current InteractiveViewer api / TransformationController api.
By default, the "unvisited zone" can be grayed out in the MiniMap. We can also add two buttons (+ and -) to change the zooming level programmatically.
After experimenting, I can imagine adding a PanViewer to the InteractiveViewer.builder api.
InteractiveViewer.builder(pan: (_)=> MiniMap(controller: transformationController, builder : () => TheThingsToShow(), showZoomLevel : true ),...);
Like this image, just add a red rectangle to show the pan area.
