NotifierProvider<NotifierT extends Notifier<ValueT> , ValueT> class
final
Providers
A provider that exposes a synchronous Notifier.
NotifierProvider can be considered as a mutable Provider.
- Implemented types
-
- ProviderListenable<
StateT>
- ProviderListenable<
- Available extensions
Constructors
-
NotifierProvider(NotifierT _createNotifier(), {String? name, Iterable<
ProviderOrFamily> ? dependencies, bool isAutoDispose = false, Retry? retry}) - A provider that exposes a synchronous Notifier.
Properties
- argument → Object?
-
If this provider was created with the
.familymodifier,argumentis the variable that was used.finalinherited -
dependencies
→ Iterable<
ProviderOrFamily> ? -
The list of providers that this provider potentially depends on.
finalinherited
- from → Family?
-
If this provider was created with the
.familymodifier,fromis the.familyinstance.finalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- isAutoDispose → bool
-
Whether the state associated to this provider should be disposed
automatically when the provider stops being listened.
finalinherited
- name → String?
-
A custom label for providers.
finalinherited
-
notifier
→ Refreshable<
NotifierT> -
no setterinherited
-
origin
→ ProviderBase<
ValueT> -
The provider that is overridden.
no setterinherited
- retry → Retry?
-
The retry strategy to use when a provider fails.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
expand<
T> (WidgetRef ref, T selector(WidgetRef r, NotifierProvider< N, S> s)) → T -
Available on NotifierProvider<
N, S> , provided by the KNotifierX extension -
expandX<
T> (Ref ref, T selector(Ref r, NotifierProvider< N, S> s)) → T -
Available on NotifierProvider<
N, S> , provided by the KNotifierX extension -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
not(
WidgetRef ref) → N -
Available on NotifierProvider<
not stands for notifier here. It reads the notifier of the provider using WidgetRefN, S> , provided by the KNotifierX extension -
notX(
Ref ref) → N -
Available on NotifierProvider<
not stands for notifier here. It reads the notifier of the provider using RefN, S> , provided by the KNotifierX extension -
overrideWith(
NotifierT create()) → Override -
Override the provider with a new initialization function.
inherited
-
overrideWithBuild(
RunNotifierBuild< NotifierT, ValueT> build) → Override -
Overrides the
buildmethod of a notifier, allowing you to replace the default implementation with a custom one for testing or specific use cases.inherited -
read(
WidgetRef ref) → StateT -
Available on ProviderListenable<
StateT> , provided by the KProviderExtension extension -
readX(
Ref ref) → StateT -
Available on ProviderListenable<
StateT> , provided by the KProviderExtension extension -
select<
OutT> (OutT selector(InT value)) → ProviderListenable< OutT> -
Available on ProviderListenable<
Partially listen to a provider.InT> , provided by the ProviderListenableSelect extension -
toString(
) → String -
A string representation of this object.
inherited
-
watch(
WidgetRef ref) → StateT -
Available on ProviderListenable<
StateT> , provided by the KProviderExtension extension -
watchNot(
WidgetRef ref) → N -
Available on NotifierProvider<
N, S> , provided by the KNotifierX extension -
watchNotX(
Ref ref) → N -
Available on NotifierProvider<
N, S> , provided by the KNotifierX extension -
watchX(
Ref ref) → StateT -
Available on ProviderListenable<
StateT> , provided by the KProviderExtension extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- autoDispose → const AutoDisposeNotifierProviderBuilder
- Marks the provider as automatically disposed when no longer listened to.
- family → const NotifierProviderFamilyBuilder
- A group of providers that builds their value from an external parameter.