cancel method

  1. @override
void cancel()
override

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

Typically causes the ink to gradually disappear. By default this method does nothing.

Implementation

@override
void cancel() {
  _fadeInController.stop();
  // Watch out: setting _fadeOutController's value to 1.0 will
  // trigger a call to _handleAlphaStatusChanged() which will
  // dispose _fadeOutController.
  final double fadeOutValue = 1.0 - _fadeInController.value;
  _fadeOutController.value = fadeOutValue;
  if (fadeOutValue < 1.0) {
    _fadeOutController.animateTo(1.0, duration: _kCancelDuration);
  }
}