flush method

  1. @override
void flush()
override

Clears all bindings and instances.

Resets the container to its initial state, removing all registered bindings, cached instances, and contextual bindings. Useful for testing or reinitializing the container.

Implementation

@override
void flush() {
  _bindings.clear();
  _instances.clear();
  _contextualBindings.clear();
}