fromJson<V> static method
Converts PageableData from JSON. Used by storages that stores a value in JSON format.
Implementation
static Future<PageableData<V>> fromJson<V>(
Map<String, dynamic> map,
StorageDecoder<V> decode,
) async {
final itemsMap = map['items'] as List<dynamic>;
final items = await Stream.fromIterable(itemsMap).asyncMap(decode).toList();
return PageableData<V>(
loadedAll: map['loadedAll'] as bool,
items: items,
meta: map['meta'] as String?,
);
}