computeState method
Computes the current LiquidMorphState for the given layout geometry.
Call this once per frame from your AnimatedBuilder or addListener callback to get pre-calculated render values.
finalDx/finalDy— target displacement from trigger center to menu center, in logical pixels.horizontalOffset/verticalOffset— screen-edge clamping corrections from the menu positioning logic.
Implementation
LiquidMorphState computeState({
required double finalDx,
required double finalDy,
double horizontalOffset = 0.0,
double verticalOffset = 0.0,
}) {
return LiquidMorphPhysics.compute(
rawValue: _animationController.value,
finalDx: finalDx,
finalDy: finalDy,
horizontalOffset: horizontalOffset,
verticalOffset: verticalOffset,
);
}