setRequestUpdatesMode method

void setRequestUpdatesMode(
  1. SyncRequestUpdatesMode mode
)

Configures how sync updates are received from the server. If automatic updates are turned off, they will need to be requested manually.

Implementation

void setRequestUpdatesMode(SyncRequestUpdatesMode mode) {
  int cMode;
  switch (mode) {
    case SyncRequestUpdatesMode.manual:
      cMode = OBXRequestUpdatesMode.MANUAL;
      break;
    case SyncRequestUpdatesMode.auto:
      cMode = OBXRequestUpdatesMode.AUTO;
      break;
    case SyncRequestUpdatesMode.autoNoPushes:
      cMode = OBXRequestUpdatesMode.AUTO_NO_PUSHES;
      break;
    default:
      throw ArgumentError.value(mode, 'mode');
  }
  checkObx(C.sync_request_updates_mode(_ptr, cMode));
}