StreamNotifierProviderImpl<NotifierT extends AsyncNotifierBase<T>, T> constructor

StreamNotifierProviderImpl<NotifierT extends AsyncNotifierBase<T>, T>(
  1. NotifierT _createNotifier(), {
  2. String? name,
  3. Iterable<ProviderOrFamily>? dependencies,
})

A variant of AsyncNotifier which has build creating a Stream.

This can be considered as a StreamProvider that can mutate its value over time.

The syntax for using this provider is slightly different from the others in that the provider's function doesn't receive a "ref" (and in case of family, doesn't receive an argument either). Instead the ref (and argument) are directly accessible in the associated AsyncNotifier.

This can be considered as a StreamProvider that can mutate its value over time. When using autoDispose or family, your notifier type changes. Instead of extending StreamNotifier, you should extend either:

  • AutoDisposeStreamNotifier for autoDispose
  • FamilyStreamNotifier for family
  • AutoDisposeFamilyStreamNotifier for autoDispose.family

Implementation

StreamNotifierProviderImpl(
  super._createNotifier, {
  super.name,
  super.dependencies,
}) : super(
        allTransitiveDependencies:
            computeAllTransitiveDependencies(dependencies),
        from: null,
        argument: null,
        debugGetCreateSourceHash: null,
      );