build method
Widget
build({
- required Animation<
double> animation, - required Widget child,
- Map<
String, Object?> params = const {},
override
Builds the animated widget for the forward direction.
animation — 0.0 → 1.0 where 0.0 = invisible/start, 1.0 = visible/end.
child — the widget being animated.
params — optional configuration map (typed by each plugin).
Concrete subclasses must override this method.
Implementation
@override
Widget build({
required Animation<double> animation,
required Widget child,
Map<String, Object?> params = const {},
}) {
final waveHeight = (params['waveHeight'] as double?) ?? 20.0;
final waveCount = (params['waveCount'] as double?) ?? 1.5;
final fromBottom = (params['fromBottom'] as bool?) ?? true;
return AnimatedBuilder(
animation: animation,
builder: (_, c) => ClipPath(
clipper: _LiquidClipper(
t: animation.value,
waveHeight: waveHeight,
waveCount: waveCount,
fromBottom: fromBottom,
),
child: c,
),
child: child,
);
}