StateProvider<T extends StateNotifier<S>, S> class

Inheritance
Implemented types
Available extensions

Constructors

StateProvider(_LazyCallback<T> creator, {bool autoDispose = true, void onDisposed()?})

Properties

hashCode int
The hash code for this object.
no setterinherited
mounted bool
no setterinherited
read → T
returs always the same instance of T, if it is not created yet this will create it.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose({bool avoidOnDisposeCallback = false}) → void
dispose the notifier linked to this provider
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
overrideProvider(_LazyCallback<T> creator, {bool? autoDispose}) → void
overrides the creator function of this provider useful for unit test.
inherited
select<Result>(_BuildBySelect<S, Result> callback, {bool booleanCallback = false}) Target<Notifier, Result>

Available on StateProvider<Notifier, S>, provided by the StateProviderExt extension

use this method to rebuild your Consumer when a value in the state has changed or you can use a boolean condition. Check the documentation for more info.
setArguments(dynamic arguments) → void
set the arguments to be available in the ProviderReference
inherited
toString() String
A string representation of this object.
inherited
when(_BuildWhen<S> callback) Target<Notifier, bool>

Available on StateProvider<Notifier, S>, provided by the StateProviderExt extension

use this method to rebuild your Consumer using the previous state and the current state to return a boolean

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

withTag<T extends StateNotifier<S>, S>(_LazyCallback<T> creator, {bool autoDispose = true}) StateTagProvider<T, S>