PageData<T> class
Data model about the page results from any paginated API
Constructors
-
PageData({required List<
T> data, required int count, required String? next, required String? previous}) - PageData.empty()
-
factory
-
PageData.fromJson(Map<
String, dynamic> json, T callBack(Map<String, dynamic> json)) -
factory
-
PageData.fromList(List<
T> values, {bool thereAreMore = true}) -
factory
Properties
- count ↔ int
-
The status code results for this page
getter/setter pair
-
data
↔ List<
T> -
The list of data returned inside this page
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setteroverride
- next ↔ String?
-
Error message in case of error
getter/setter pair
- previous ↔ String?
-
Has a next page?
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{List< T> ? data, int? count, String? next, String? previous}) → PageData<T> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override