resetInstance method

bool resetInstance({
  1. bool clearRouteConnections = 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 clearRouteConnections clears Instances associated with routes.

Implementation

bool resetInstance({bool clearRouteConnections = true}) {
  //  if (clearFactory) _factory.clear();
  // deleteAll(force: true);
  if (clearRouteConnections) RouterReportManager.instance.clearRouteKeys();
  Instant._singl.clear();

  return true;
}