liquid_reveal 0.1.1
liquid_reveal: ^0.1.1 copied to clipboard
A liquid page reveal that measures its own box instead of the screen, so it works inside a card, a list row or a full page. Render object, no rebuilds.
0.1.1 #
- The README's badge row, which 0.1.0 was published without. pub.dev renders the README of the version it holds, so the badges were on GitHub and nowhere else. No code changed.
0.1.0 #
First release.
LiquidRevealreveals the next page from any edge, driven by a drag or byLiquidRevealController.- Everything is measured against the widget's own box: the drag distance, the wave's depth and width, and the commit threshold. The same settings look and feel the same in a list row and on a full screen.
- Implemented as one
RenderBox. The drag and the settle animation only callmarkNeedsPaint, so nothing in the widget tree rebuilds while a reveal runs. Two pages are laid out at a time, whatever the item count. LiquidWaveis the boundary as a pure function of the box, the progress and the finger - testable without a widget tree.- Hit testing follows the reveal, so a button on the incoming page works as soon as it is uncovered.
- Both directions: a drag the other way reveals the previous page, growing
from the opposite edge, and
LiquidRevealController.previous()does it from code.allowReverseturns it off for a one-way flow. A gesture picks its direction on the first movement and keeps it until the reveal is back at zero, so turning round mid-drag undoes rather than swapping the page underneath. RevealSide.left,.right,.topand.bottom;LiquidRevealSettings.softand.sharppresets;dragEdgeFractionto keep a drag off the middle of the box.- A drag is measured from where the finger went down rather than by adding up
deltas. The gesture arena folds the movement that won it into
onStart, so the firstonUpdatenever carries it - summing deltas swallowed the opening of every drag, and more when something else was competing for the gesture.