getItemById static method
- int id
Retrieve the ContentStoreItem with the specified id, if it exists.
Parameters
id: The content item id (see ContentStoreItem.id).
Returns
- The ContentStoreItem when found, or
nullif no item with the given id exists.
Also see:
- ContentStoreItem.id - The unique identifier of a content store item.
Implementation
static ContentStoreItem? getItemById(final int id) {
final OperationResult resultString = staticMethod(
'ContentStore',
'getItemById',
args: id,
);
final int resultId = resultString['result'];
if (resultId == -1) {
return null;
}
return ContentStoreItem.init(resultId);
}