dispose method
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Implementation
@override
void dispose() {
for (var registration in _registrations) {
registration.dispose();
}
_registrations.clear();
}