ServiceContext constructor

ServiceContext({
  1. Map<String, String>? headers,
  2. Protocol? protocol,
  3. String? service,
  4. String? relayService,
  5. Session? session,
  6. OAuthSessionManager? oAuthSessionManager,
  7. Duration? timeout,
  8. RetryStrategy? retryConfig,
  9. GetClient? getClient,
  10. PostClient? postClient,
  11. Future<Session> onRefreshSession(
    1. Session current
    )?,
})

Implementation

ServiceContext({
  Map<String, String>? headers,
  xrpc.Protocol? protocol,
  String? service,
  String? relayService,
  Session? session,
  this.oAuthSessionManager,
  Duration? timeout,
  RetryStrategy? retryConfig,
  final xrpc.GetClient? getClient,
  final xrpc.PostClient? postClient,
  this.onRefreshSession,
}) : _headers = headers,
     _protocol = protocol ?? defaultProtocol,
     _currentSession = session,
     _explicitService = service,
     relayService = relayService ?? defaultRelayService,
     _challenge = Challenge(retryConfig),
     _timeout = timeout ?? defaultTimeout,
     _getClient = getClient,
     _postClient = postClient;