resetInstance method

bool resetInstance({
  1. @deprecated bool clearFactory = true,
  2. bool clearRouteBindings = true,
})

Clears all registered instances (and/or tags). Even the persistent ones. This should be used at the end or tearDown of unit tests.

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

Implementation

bool resetInstance(
    {@deprecated bool clearFactory = true, bool clearRouteBindings = true}) {
  //  if (clearFactory) _factory.clear();
  // deleteAll(force: true);
  if (clearRouteBindings) RouterReportManager.clearRouteKeys();
  _singl.clear();

  return true;
}