AutoDisposeNotifierProviderImpl<NotifierT extends NotifierBase<T>, T> constructor

AutoDisposeNotifierProviderImpl<NotifierT extends NotifierBase<T>, T>(
  1. NotifierT _createNotifier(), {
  2. String? name,
  3. Iterable<ProviderOrFamily>? dependencies,
  4. @Deprecated('Will be removed in 3.0.0') Family<Object?>? from,
  5. @Deprecated('Will be removed in 3.0.0') Object? argument,
  6. @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 for family
  • AutoDisposeFamilyNotifier for autoDispose.family

Implementation

AutoDisposeNotifierProviderImpl(
  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),
      );