RestListing class
Simple utility which allows to load pages of results for a given API endpoint
To load the results it requires configured RestClient.
It accepts RestListingDriver which handles paging for requests and unpacking final List of data from returned response
Constructors
- RestListing(RestClient restBase, RestListingDriver driver)
Properties
- finishedWithError → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasNext → bool?
-
no setter
- list ↔ List
-
getter/setter pair
- page ↔ int
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- working → bool
-
no setter
Methods
-
isEmpty(
) → bool -
loadNextPage(
{dynamic clearPrevious = false}) → Future< bool> - Use this to indicate that next page should be loaded.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refresh(
) → Future< bool> - Clears accumulated data and starts fetching page 0
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited