WaveAnimation constructor
WaveAnimation({
- Key? key,
- required Duration duration,
- required Duration delay,
- required Widget child,
- ValueSetter<
AnimationController> ? onComplete, - required double begin,
- required double end,
- double idleValue = 0,
Implementation
WaveAnimation({
super.key,
required super.duration,
required super.delay,
required super.child,
super.onComplete,
required double begin,
required double end,
super.idleValue = 0,
}) : super(
builder: (context, value, child) => Transform(
transform: Matrix4.translationValues(
0.0,
20.0 * sin(value * pi * 2),
0.0,
),
child: child,
),
tween: Tween<double>(begin: begin, end: end),
);