ButtonAnimationStyle.shake constructor
ButtonAnimationStyle.shake({})
Horizontal shake (programmatic trigger) Best for error states
Implementation
factory ButtonAnimationStyle.shake({
Duration duration = const Duration(milliseconds: 400),
Curve curve = Curves.easeInOut,
bool enableHapticFeedback = true,
double shakeOffset = 8.0,
int shakeCount = 3,
}) {
return ButtonAnimationStyle._(
type: ButtonAnimationType.shake,
duration: duration,
curve: curve,
enableHapticFeedback: enableHapticFeedback,
shakeOffset: shakeOffset,
shakeCount: shakeCount,
);
}