createContentUpdater static method
- ContentType type
Create a ContentUpdater for the specified content type.
The created updater must be started with ContentUpdater.update. Updaters support resume across SDK sessions: to detect a pending update create an updater and inspect its ContentUpdater.status. If the status is not ContentUpdaterStatus.idle a pending update can be resumed.
Parameters
type: The ContentType for which to create an updater.
Returns
- A tuple
(ContentUpdater, GemError)where the first element is the created updater and the second is a GemError indicating success or failure (for example GemError.exist when an updater already exists).
Implementation
static (ContentUpdater, GemError) createContentUpdater(
final ContentType type,
) {
final OperationResult resultString = staticMethod(
'ContentStore',
'createContentUpdater',
args: type.id,
);
final dynamic result = resultString['result'];
return (
ContentUpdater.init(result['first'], 0),
GemErrorExtension.fromCode(result['second']),
);
}