ServerpodClientShared constructor

ServerpodClientShared(
  1. String host,
  2. SerializationManager serializationManager, {
  3. dynamic context,
  4. AuthenticationKeyManager? authenticationKeyManager,
  5. bool logFailedCalls = true,
  6. Duration streamingConnectionTimeout = const Duration(seconds: 5),
})

Creates a new ServerpodClient.

Implementation

ServerpodClientShared(
  this.host,
  this.serializationManager, {
  dynamic context,
  this.authenticationKeyManager,
  this.logFailedCalls = true,
  this.streamingConnectionTimeout = const Duration(seconds: 5),
}) {
  assert(host.endsWith('/'),
      'host must end with a slash, eg: https://example.com/');
  assert(host.startsWith('http://') || host.startsWith('https://'),
      'host must include protocol, eg: https://example.com/');
}