PaginationParams<T extends Object> class
Properties
-
error
→ MutableLiveData<bool>
-
server error
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
idle
→ MutableLiveData<bool>
-
detect first response
final
-
isCached
↔ bool
-
detect if lastPage data is cached data or remote data
send to server new request to fetch new page-list when the lastPage data is not cached
getter/setter pair
-
isRefresh
↔ bool
-
check if user refresh data by
RefreshIndicator
, when true -> reset paginationParams to default value.
getter/setter pair
-
itemsList
→ MutableLiveData<List<PaginationModel<T>>>
-
displayed items List in UI
final
-
lastPage
→ bool
-
detect if current page is last page -> don't load more data if lastPage is true
no setter
-
loading
→ MutableLiveData<bool>
-
is request in loading status
final
-
noItemsFound
→ MediatorMutableLiveData<bool>
-
check if there is not items after fetch data
final
-
page
↔ int
-
current page
getter/setter pair
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
total
↔ int
-
the total items count (get from response list)
getter/setter pair
Methods
-
checkFetchedData()
→ void
-
check items after fetched
-
handleRefresh()
→ void
-
reset items-list when user refresh data
this operation called when new data fetched
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
refresh()
→ void
-
reset variables to default value
-
setError(bool error)
→ void
-
set error value, with hide loading
-
setLoading(bool loading)
→ void
-
set loading value, with hide error
-
toString()
→ String
-
A string representation of this object.
inherited