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 angle = progress * 2 * math.pi * speed;
  return Transform.translate(
    offset: Offset(radius * math.cos(angle), radius * math.sin(angle)),
    child: child,
  );
}