dispose method

void dispose()

Disposes all the scoped dependencies.

Implementation

void dispose() {
  for (var e in _cleanup) {
    e.call();
  }
  _cleanup.clear();
}