getStoreContentList static method

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

Return the last cached online store content list for the requested type.

The returned tuple contains the cached content list and a boolean flag that indicates whether the list was cached locally. When the flag is false the caller should use asyncGetStoreContentList to request a fresh list from the server.

Parameters

Returns

  • A tuple (List<ContentStoreItem>, bool) where the first element is the cached list and the second element is isCached.

See also:

Implementation

static (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 (ContentStoreItemList.init(listId).toList(), isCached);
}