apiClient method

ApiClient apiClient({
  1. required ApiClientTransport apiClient,
  2. required ApiReader reader,
  3. bool logToFirebase = false,
})

Recreates an authentication state (usually done inside an isolate)

Implementation

ApiClient apiClient(
    {required ApiClientTransport apiClient,
    required ApiReader reader,
    bool logToFirebase = false}) {
  return ApiClient(
    transport: apiClient,
    basePaths: basePaths,
    serializer: reader,
    authentication: ApiKeyAuth('header', 'Authorization')
      ..apiKey = accessToken,
  );
}