getStoreContentList static method
- 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
type: The ContentType to query.
Returns
- A tuple
(List<ContentStoreItem>, bool)where the first element is the cached list and the second element isisCached.
See also:
- asyncGetStoreContentList - Request the online content list for a specific type.
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);
}