clientMultiUrls static method

SyncClient clientMultiUrls(
  1. Store store,
  2. List<String> serverUrls,
  3. SyncCredentials credentials
)

Like client, but accepts a list of URLs to work with multiple servers.

Implementation

static SyncClient clientMultiUrls(
    Store store, List<String> serverUrls, SyncCredentials credentials) {
  if (syncClientsStorage.containsKey(store)) {
    throw StateError('Only one sync client can be active for a store');
  }
  final client = SyncClient._(store, serverUrls, credentials);
  syncClientsStorage[store] = client;
  InternalStoreAccess.addCloseListener(store, client, client.close);
  return client;
}