Entity<T extends Object> class

Generated Riverpod family for a single normalized entity.

Inheritance
Annotations

Constructors

Entity()

Properties

enabled → bool
no setterinherited
fromGraph → EntityDecoder<T>
no setterinherited
future → Future<EntitySnapshot<T>>
Obtains a Future that resolves with the first state value that is not AsyncLoading.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
id → String?
no setterinherited
ref → Ref
The Ref associated with this notifier.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state ↔ AsyncValue<EntitySnapshot<T>>
The value currently exposed by this notifier.
getter/setter pairinherited
subscribe → bool
no setterinherited
toGraph → EntityEncoder<T>?
no setterinherited
type → String
no setterinherited

Methods

build({required String type, required String? id, required EntityDecoder<T> fromGraph, EntityEncoder<T>? toGraph, bool enabled = true, bool subscribe = true}) → Future<EntitySnapshot<T>>
listenSelf(void listener(AsyncValue<EntitySnapshot<T>>? previous, AsyncValue<EntitySnapshot<T>> next), {void onError(Object error, StackTrace stackTrace)?}) → RemoveListener
Listens to changes on the value exposed by this provider.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refetch() → Future<void>
Explicitly revalidate this entity with bounded transient retries.
runBuild() → WhenComplete?
Executes Notifier.build.
inherited
toString() → String
A string representation of this object.
inherited
update(FutureOr<EntitySnapshot<T>> cb(EntitySnapshot<T> previousState), {FutureOr<EntitySnapshot<T>> onError(Object err, StackTrace stackTrace)?}) → Future<EntitySnapshot<T>>
A function to update state from its previous value, while abstracting loading/error cases for state.
inherited
updateShouldNotify(AsyncValue<EntitySnapshot<T>> previous, AsyncValue<EntitySnapshot<T>> next) → bool
A method invoked when the state exposed by this Notifier changes. It compares the previous and new value, and return whether listeners should be notified.
inherited

Operators

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