ShakeAnimatedWidget constructor
ShakeAnimatedWidget({})
A shake animation
duration : the duration of the animation, including intermediate values enabled : determine if the animation is stopped or fired curve : An easing curve, see Curve alignment : The center of the shake
shakeAngle : oscilate between 0, -shakeAngle, 0, shakeAngle, 0
- can be in radians or degrees (see Rotation)
animationFinished : a callback called when the animation is finished
Implementation
ShakeAnimatedWidget({
this.duration = const Duration(milliseconds: 2000),
this.shakeAngle = const Rotation.radians(z: 0.015),
this.curve = Curves.linear,
this.enabled = true,
this.alignment = Alignment.center,
required this.child,
});