wrap method

  1. @override
Widget wrap(
  1. BuildContext context,
  2. Widget child,
  3. double progress
)
override

Wraps the child widget with this specific visual effect.

Implementation

@override
Widget wrap(BuildContext context, Widget child, double progress) {
  final double offset = math.sin(progress * 2 * math.pi) * dy;
  return Transform.translate(
    offset: Offset(0, offset),
    child: child,
  );
}