resetInstance method
Clears all registered instances and/or tags. This method is particularly useful for cleaning up resources at the end or tearDown of unit tests.
clearRouteBindings
specifies whether to clear instances associated with routes.
If set to true
, instances associated with routes will be cleared.
Returns true
if the reset operation is successful.
Implementation
bool resetInstance({bool clearRouteBindings = true}) {
if (clearRouteBindings) {
RouterReportManager.instance.clearRouteKeys();
}
InstanceExtension._singl.clear();
return true;
}