ApiBaseState<T> class abstract

Inheritance

Constructors

ApiBaseState()

Properties

data List<T>
getter/setter pair
enablePagination bool
getter/setter pairinherited
error ErrorResponse?
getter/setter pairinherited
hasError bool
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
hasMorePages bool
no setter
isDisposed bool
getter/setter pairinherited
isLoading bool
no setterinherited
isLoadingFirstData bool
no setter
paginationInfo PaginationInfo?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state → ViewState
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
apiCall<V>(CancellableApiCall<V> callback) Future<ApiResponse<V>>
convertError(dynamic error) ErrorResponse?
dispatch<E extends BaseStateEvent<BaseState>, T extends BaseState>(E event) Future<T>
inherited
dispatchLoadNewPage({int page = 1}) Future<ApiBaseState>
dispose() → void
Make sure to implement the super.dispose() when overriding this method
loadPageEvent({int page = 1}) LoadDataEvent<dynamic, PageResponse>?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
We allow calling the notifyListeners on our state objects. So we publicly expose it (in stead of relying on the parents @protected)
inherited
process<T>(ValueGetter<Future<T>> callback, [bool handleLoading = true]) Future<T?>
Asynchronously handle the callback and automatically set the state loading.
inherited
refreshData() Future<ApiBaseState>
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setState(ViewState viewState) → void
inherited
toString() String
A string representation of this object.
inherited

Operators

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