callSyncSecondary method

Future<void> callSyncSecondary(
  1. SyncOperation _syncOperation, {
  2. AtKey? atKey,
  3. String? notification,
  4. OperationEnum? operation,
  5. bool isDedicated = MixedConstants.isDedicated,
})

Called to sync with secondary _syncOperation either sync to secondary or notifyAll atKey, notification, operation needed for notifyAll

Implementation

Future<void> callSyncSecondary(
  SyncOperation _syncOperation, {
  AtKey? atKey,
  String? notification,
  OperationEnum? operation,
  bool isDedicated = MixedConstants.isDedicated,
}) async {
  _operations.insert(
    0,
    SyncOperationDetails(
      _syncOperation,
      atKey: atKey,
      notification: notification,
      operation: operation,
      isDedicated: isDedicated,
    ),
  );
  if (syncing) {
    return;
  } else {
    await _startSyncing();
  }
}