NotifierProviderImpl<NotifierT extends NotifierBase<T> , T> constructor
NotifierProviderImpl<NotifierT extends NotifierBase<T> , T> (
- NotifierT _createNotifier(), {
- String? name,
- Iterable<
ProviderOrFamily> ? dependencies, - @Deprecated('Will be removed in 3.0.0') Family<
Object?> ? from, - @Deprecated('Will be removed in 3.0.0') Object? argument,
- @Deprecated('Will be removed in 3.0.0') DebugGetCreateSourceHash? debugGetCreateSourceHash,
A Provider which exposes a Notifier and listens to it.
This is equivalent to a Provider that exposes ways to modify its state.
See also Notifier for more information.
When using autoDispose
or family
, your notifier type changes.
Instead of extending Notifier, you should extend either:
- AutoDisposeNotifier for
autoDispose
FamilyNotifier
forfamily
AutoDisposeFamilyNotifier
forautoDispose.family
Implementation
NotifierProviderImpl(
super._createNotifier, {
super.name,
super.dependencies,
@Deprecated('Will be removed in 3.0.0') super.from,
@Deprecated('Will be removed in 3.0.0') super.argument,
@Deprecated('Will be removed in 3.0.0') super.debugGetCreateSourceHash,
}) : super(
allTransitiveDependencies:
computeAllTransitiveDependencies(dependencies),
);