clear method

Future<void> clear()

Stops the underlying DataStore's synchronization with a remote system, if DataStore is configured to support remote synchronization, resetting the plugin to the initialized state, and deletes all data from the local device.

Any items pending synchronization in the outbound queue will be lost. Remotely synced data can be re-synced back when starting DataStore using start. Local-only data will be lost permanently.

Synchronization processes will be restarted on the next interaction with the DataStore, or can be restarted manually by calling start.

Implementation

Future<void> clear() {
  return plugins.length == 1
      ? plugins[0].clear()
      : throw _pluginNotAddedException('DataStore');
}