confirm method Null safety

  1. @override
void confirm()
override

Called when the user input that triggered this feature's appearance was confirmed.

Typically causes the ink to propagate faster across the material. By default this method does nothing.

Implementation

@override
void confirm() {
  // Accelerate things a bit from [_kUnconfirmedDuration]
  _radiusController
    ..duration = _kConfirmDuration
    ..forward();

  // This confirm may have been preceded by a cancel.
  _fadeInController.forward();
  _fadeOutController.animateTo(1.0,
      // If this 🏓 [BouncyBall] is around long enough to fully expand,
      // get it off the canvas more quickly.
      duration: _radiusController.isAnimating
          ? _kFadeOutDuration
          : _kFadeOutDuration * 0.6);
}