overrideCreator method
- @protected
- @visibleForTesting
- CreatorCallback<
E, A> callback, { - bool? autoDispose,
For testing use this to override a provider behavior
Implementation
@protected
@visibleForTesting
void overrideCreator(
CreatorCallback<E, A> callback, {
bool? autoDispose,
}) {
// ignore: invalid_use_of_protected_member
_creator.overrideCreator(
callback,
autoDispose: autoDispose,
);
ProvidersContainer.instance.overriddenCreators.putIfAbsent(
_creator.hashCode,
() => _creator,
);
}