detachByKey method

dynamic detachByKey(
  1. String key
)

Delegates the task of detaching and disposing of a touch ripple effect to ensure consistency with attachByKey function by a given key.

Implementation

detachByKey(String key) {
  assert(_stateMap.containsKey(key), "Already not exists a given ripple effect.");
  _stateMap.remove(key)?..removeListener(notifyListeners);
}