PaginatedResponse<T> class
表示一个带分页信息的API响应
Constructors
-
PaginatedResponse({String? next, String? previous, required bool hasNext, required bool hasPrevious, required int totalPages, required int currentPage, required List<
T> results}) - 创建一个PaginatedResponse实例
-
PaginatedResponse.fromMap(Map<
String, dynamic> map, T fromMap(Map<String, dynamic> )) -
从Map创建PaginatedResponse实例
factory
Properties
- currentPage → int
-
当前页码
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasNext → bool
-
是否有下一页
final
- hasPrevious → bool
-
是否有上一页
final
- next → String?
-
下一页的URL
final
- previous → String?
-
上一页的URL
final
-
results
→ List<
T> -
结果列表
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- totalPages → int
-
总页数
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited