PaginationViewModel<T extends Object> mixin
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
paginationParams
↔ PaginationParams<
T> -
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
→ Stream<
PaginationState< List< >T> > -
no setter
Methods
-
appendAtFirst(
List< T> data) → void - push new items to start of items-list
-
areItemsTheSame(
T a, T b) → bool - decide whether two object represent the same Item
-
clear(
) → void - empty list
-
deleteItem(
int index) → void - remove item from list
-
dispose(
) → void - call this method when your Widget dispose
-
fetchData(
int page) → Future< void> - called by child to fetch data from repository
-
getPaginationList(
{int? page}) → Future< void> - fetch new items list from your repository
-
incrementPage(
) → void - increment pagination current page
-
insertItem(
int index, T item, int page) → void - insert new item to list
-
listen(
) → void - listen for new data from your repository
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refresh(
) → void - refresh items-list, reload items from first page.
-
setTotal(
int total) → void - set items total count
-
streamSubscription(
) → Stream< PaginationState< List< >T> > - pagination viewModel refresh items when streamController add new value.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited