detachInstanceFromOwners static method

void detachInstanceFromOwners(
  1. String key
)

Keeps an instance across a navigation reset without making it permanent. Existing route and Binder disposal callbacks no longer own this instance.

Implementation

static void detachInstanceFromOwners(String key) {
  final factory = _factoryForKey(key);
  if (factory != null) {
    factory.generation = Object();
    factory.isDirty = false;
  }
}