explode_widget 0.1.0
explode_widget: ^0.1.0 copied to clipboard
Shatters any widget into thousands of real pixel fragments on tap. Rasterises its own layer synchronously and draws every fragment in one drawAtlas call, so nothing rebuilds mid-flight.
0.1.0 #
First release.
ExplodeWidgetshatters any child into fragments of its own pixels, on tap or from anExplodeController.- Implemented as a single
RenderObject: it is its own repaint boundary, so it rasterises its layer withOffsetLayer.toImageSyncsynchronously, and draws every fragment in oneCanvas.drawRawAtlascall. Nothing in the widget tree rebuilds while the explosion runs. - The child is hidden rather than removed, so its state survives and
ExplodeController.reset()puts it back instantly. ExplodeSettingscovers the grid, the blast origin, speed, gravity, spin, shrink, stagger, fade, pixel ratio and a seed for a repeatable explosion.ExplodeSettings.dustand.shatterare presets.ExplodeGrid.autopicks a grid from the widget's aspect ratio, so fragments stay square.