destroy method

void destroy({
  1. bool notify = true,
})

Destroys this instance.

Implementation

void destroy({bool notify = true}) {
  _isDestroyed = true;
  if (notify) {
    notifyListeners();
  }
}