PageableData<V> class
interface
Base class to represent pageable data.
Constructors
-
PageableData({required bool loadedAll, required List<
V> items, String? meta}) -
Creates simple class to represent pageable data.
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
-
items
→ List<
V> -
All items that was already loaded.
final
- loadedAll → bool
-
Use this field to check if you need to call
SizePageableResource.loadNextPage. If loadedAll = true then
all items already loaded and request for next page will be ignored.
final
- meta → String?
-
Additional data that can be used by the client. For example, total count.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts PageableData to JSON. Used by storages that stores a value in JSON format.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
defaultJsonStorageDecoder<
V> (StorageDecoder< V> ? decode, [ResourceLogger? logger]) → StorageDecoder<PageableData< V> > -
fromJson<
V> (Map< String, dynamic> map, StorageDecoder<V> decode) → Future<PageableData< V> > - Converts PageableData from JSON. Used by storages that stores a value in JSON format.