FlViewModel<T> class
Constructors
Properties
- context ↔ BuildContext
-
getter/setter pair
- errorMessage → String?
-
no setter
-
future
→ Future<
T?> -
Obtains a Future that resolves with the first
state
value that is not AsyncLoading.no setterinherited - hasData → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
provider
→ AutoDisposeAsyncNotifierProvider<
AutoDisposeAsyncNotifier, dynamic> -
no setter
-
ref
→ AutoDisposeAsyncNotifierProviderRef<
T?> -
The
Ref
from the provider associated with thisAsyncNotifier
.no setterinherited - requireData → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldBuildError → bool
-
no setter
-
state
↔ AsyncValue<
T?> -
The value currently exposed by this
AsyncNotifier
.getter/setter pairinherited - value → T?
-
no setter
Methods
-
build(
) → FutureOr< T?> -
Initialize an
AsyncNotifier
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDispose(
) → void -
onInit(
) → void -
onStateDataChanged(
T? data) → void -
refresh(
) → void -
refreshState(
) → void -
setData(
T? data) → void -
setEmpty(
) → void -
setError(
Object error, [StackTrace? stackTrace]) → void -
setFutureData(
Future< T?> futureData, {bool withLoading = true}) → void -
setLoading(
) → void -
toString(
) → String -
A string representation of this object.
inherited
-
update(
FutureOr< T?> cb(T?), {FutureOr<T?> onError(Object err, StackTrace stackTrace)?}) → Future<T?> -
A function to update
state
from its previous value, while abstracting loading/error cases forstate
.inherited -
updateShouldNotify(
AsyncValue< T?> previous, AsyncValue<T?> next) → bool -
A method invoked when the state exposed by this
AsyncNotifier
changes.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited