state method

SyncState state()

Gets the current sync client state.

Implementation

SyncState state() {
  final state = C.sync_state(_ptr);
  switch (state) {
    case OBXSyncState.CREATED:
      return SyncState.created;
    case OBXSyncState.STARTED:
      return SyncState.started;
    case OBXSyncState.CONNECTED:
      return SyncState.connected;
    case OBXSyncState.LOGGED_IN:
      return SyncState.loggedIn;
    case OBXSyncState.DISCONNECTED:
      return SyncState.disconnected;
    case OBXSyncState.STOPPED:
      return SyncState.stopped;
    case OBXSyncState.DEAD:
      return SyncState.dead;
    default:
      return SyncState.unknown;
  }
}