ButtonAnimationStyle.clickable constructor
ButtonAnimationStyle.clickable({})
Duolingo-style 3D press effect with translateY and shadow Best for primary actions and game-like UX
Implementation
factory ButtonAnimationStyle.clickable({
Duration duration = const Duration(milliseconds: 100),
Curve curve = Curves.easeInOut,
bool enableHapticFeedback = true,
double translateY = 4.0,
double shadowOffset = 4.0,
}) {
return ButtonAnimationStyle._(
type: ButtonAnimationType.clickable,
duration: duration,
curve: curve,
enableHapticFeedback: enableHapticFeedback,
translateY: translateY,
shadowOffset: shadowOffset,
);
}