getStoreContentList static method

Pair<List<ContentStoreItem>, bool> getStoreContentList(
  1. ContentType type
)

Gets access to the store cached content list.

Parameters

Returns

  • Pair of <Content list, locally cached flag>. If the list is not cached locally (locally cached flag is false) a call to asyncGetStoreContentList must be performed in order to request it from store.

Implementation

static Pair<List<ContentStoreItem>, bool> getStoreContentList(
  final ContentType type,
) {
  final OperationResult contentStoreListString = staticMethod(
    'ContentStore',
    'getStoreContentList',
    args: type.id,
  );

  final int listId = contentStoreListString['result']['contentStoreListId'];
  final bool isCached = contentStoreListString['result']['isCached'];
  return Pair<List<ContentStoreItem>, bool>(
    ContentStoreItemList.init(listId, 0).toList(),
    isCached,
  );
}