reset method

bool reset(
  1. {bool clearFactory = true,
  2. bool clearRouteBindings = true}
)

Clears all registered instances (and/or tags). Even the persistent ones.

clearFactory clears the callbacks registered by lazyPut clearRouteBindings clears Instances associated with routes.

Implementation

bool reset({bool clearFactory = true, bool clearRouteBindings = true}) {
  if (clearFactory) _factory.clear();
  if (clearRouteBindings) _routesKey.clear();
  _singl.clear();
  return true;
}