PaginatedAction<Input , Output extends Entity > class
abstract
Properties
errorProvider
→ AutoDisposeStateProvider<DomainException ? >
Used to catch errors, events can override this getter
to redirect errors where they want them. The default
is a global error handler that puts up a toast
no setter inherited
hashCode
→ int
The hash code for this object.
no setter inherited
loadingProvider
→ AutoDisposeStateProvider<bool >
Used to enable and disable loading. With a global default
no setter inherited
mounted
→ bool
no setter inherited
provider
→ AutoDisposeStateProvider<DataState <Paginated <Output > > >
final
ref
→ WidgetRef
Used to access providers and modify all app state
final inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
apiCall (int page )
→ Future <Either<DomainException , Input? > >
inherited
call ()
→ Future <void >
Makes this class callable Event(ref)() or Event(ref).call()
or Event(ref).call() will call the logic contained in this action
This way we can use events directly in onTap / onPressed
inherited
catchError <Error extends DomainException , Success > (Either<Error , Success? > result , [void success (Success success )? ])
→ Success?
Unwraps the error and guides it to the errorProvider after converting Data to Domain errors
inherited
change <T > (AutoDisposeStateProvider<T > provider , T cb (T previous ) )
→ T?
inherited
clearError ()
→ void
inherited
convert (Input input )
→ Paginated <Output >
inherited
dispose ()
→ void
inherited
execute ()
→ Future <void >
override
loadNext ()
→ Future <void >
inherited
loadPage (int page )
→ Future <void >
inherited
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read <T > (ProviderListenable<T > provider )
→ T?
inherited
setError (DomainException error )
→ void
Broadcast the error to the error provider
inherited
setLoading (bool loading )
→ void
Easily set loading via the loadingProvider and if that is
overridden via the child it will call that one via the getter
inherited
toString ()
→ String
A string representation of this object.
inherited
tryOrSetError (Future <void > cb () )
→ Future <void >
inherited
update <T > (AutoDisposeStateProvider<T > provider , T state )
→ void
inherited