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) {
  return Stack(
    alignment: Alignment.center,
    children: [
      // Backing ripple painter
      SizedBox(
        width: maxRadius * 2,
        height: maxRadius * 2,
        child: CustomPaint(
          painter: _RippleEffectPainter(
              progress: progress, color: color, maxRadius: maxRadius),
        ),
      ),
      child,
    ],
  );
}