createContentUpdater static method

Pair<ContentUpdater, GemError> createContentUpdater(
  1. ContentType type
)

Creates a content updater for the given content type.

After creation, the content updater must be started by calling the ContentUpdater.update The content updater supports operation resume between SDK running sessions.

To check if there is a pending update operation started in a previous SDK session, user must do the following steps:

Parameters

Returns

Throws

  • An exception if it fails to initialize.

Implementation

static Pair<ContentUpdater, GemError> createContentUpdater(
  final ContentType type,
) {
  final OperationResult resultString = objectMethod(
    0,
    'ContentStore',
    'createContentUpdater',
    args: type.id,
  );

  final dynamic result = resultString['result'];
  return Pair<ContentUpdater, GemError>(
    ContentUpdater.init(result['first'], 0),
    GemErrorExtension.fromCode(result['second']),
  );
}