computeState method
Computes the current LiquidMorphState for the given layout geometry.
Implementation
LiquidMorphState computeState({
required double finalDx,
required double finalDy,
double horizontalOffset = 0.0,
double verticalOffset = 0.0,
double scaleDelta = 1.0,
bool? adaptiveDamping,
bool? isClosing,
}) {
final bool effectiveClosing = isClosing ?? _isClosing;
final bool settled = !_animationController.isAnimating &&
(effectiveClosing
? _animationController.value <= 0.001
: _animationController.value >= 0.999);
return LiquidMorphPhysics.compute(
rawValue: _animationController.value,
finalDx: finalDx,
finalDy: finalDy,
horizontalOffset: horizontalOffset,
verticalOffset: verticalOffset,
scaleDelta: scaleDelta,
adaptiveDamping: adaptiveDamping,
isClosing: effectiveClosing,
elapsedSeconds: phaseElapsedSeconds,
hasHandedOff: _hasHandedOff,
isSettled: settled,
disableAnimations: _disableAnimations,
phaseStartTriggerWidth: _phaseStartTriggerWidth,
closeStartProgress: _closeStartProgress,
recoilHalfTravelPx: recoilHalfTravelPx,
verticalOnlyRecoil: verticalOnlyRecoil,
);
}