replaceInstance<T> abstract method

void replaceInstance<T>(
  1. T instance, {
  2. String? key,
})

Replaces an instance record with a concrete instance.
This function should only be used for unit testing.
Any other use is discouraged.
When key is provided it will search the instance that have the same key

Implementation

void replaceInstance<T>(T instance, {String? key});