Pagination class

A representation of the pagination response from the Notion API. Also list of objects.

Constructors

Pagination({String? nextCursor, bool hasMore = false, bool isEmpty = false, List<Block>? blocks, List<Database>? databases})
Main pagination constructor.
Pagination.fromJson(Map<String, dynamic> json, {ObjectTypes? staticType})
Map a new pagination instance from a json map.
factory

Properties

blocks List<Block>
The list of blocks for when the response is for blocks.
no setter
databases List<Database>
The list of databases for when the response is for databases.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasMore bool
The marker to know if has more pages.
getter/setter pair
isBlocksList bool
Returns true if the result is a list of blocks.
no setter
isDatabasesList bool
Returns true if the result is a list of databases.
no setter
isEmpty bool
The marker to know if is empty.
getter/setter pair
length int
The legth of the list.
no setter
list → dynamic
no setter
nextCursor String?
The cursor to the next page.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

filterBlocks({List<BlockTypes> exclude = const [], List<BlockTypes> include = const [], BlockTypes? onlyLeft, String? id}) List<Block>
Filter the list of blocks children.
filterDatabases({List<String> exclude = const [], List<String> include = const [], String? id}) List<Database>
Filter the list of databases children.
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