replace<T> method
Implementation
void replace<T>({required T instance, required PillarScope scope}) {
discard(scope);
final PillarKey createdKey = _createKey<T>(null, null);
_map[createdKey] = PillarEntry(
key: createdKey,
factory: _replacedFactory<T>,
value: instance,
instanceScope: scope,
);
_scopeChanges[scope]?.notify();
}