PaginatedModels class
This class lets you get a paginated list of models, with the ability to fetch the next and previous pages if they exist.
Constructors
-
PaginatedModels({String? previousApiUrl, String? nextApiUrl, required List<
PaginationModel> results}) - This class lets you get a paginated list of models, with the ability to fetch the next and previous pages if they exist.
-
PaginatedModels.fromJson(Map<
String, dynamic> json) -
This method lets you get a paginated list of models, with the ability to fetch the next and previous pages if they exist.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- hasNextPage → bool
-
This can be used to check if there is a next page before calling next.
no setter
- hasPreviousPage → bool
-
This can be used to check if there is a previous page before calling previous.
no setter
- nextApiUrl ↔ String?
-
The API URL for the next page of results.
getter/setter pair
- previousApiUrl ↔ String?
-
The API URL for the previous page of results.
getter/setter pair
-
results
↔ List<
PaginationModel> -
The list of models.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
next(
) → Future< PaginatedModels> - This method lets you get the next page of models. If there is no next page, it will throw a NoNextPageException. If you want to check if there is a next page before calling this method, use hasNextPage.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
previous(
) → Future< PaginatedModels> - This method lets you get the previous page of models. If there is no previous page, it will throw a NoPreviousPageException. If you want to check if there is a previous page before calling this method, use hasPreviousPage.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override