cancel method Null safety

  1. @override
void cancel()

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.


void cancel() {

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