create static method

LinkService create(
  1. Client httpClient,
  2. String baseUrl,
  3. String apiKey
)

Implementation

static LinkService create(http.Client httpClient, String baseUrl, String apiKey) {
  final client = ChopperClient(
    client: httpClient,
    baseUrl: baseUrl,
    interceptors: [HttpRequestLoggingInterceptor(), HttpApiKeyInterceptor(apiKey)],
    converter: const JsonSerializableConverter({
      CreateLinkResponse: CreateLinkResponse.fromJson,
      OauthLinkResponse: OauthLinkResponse.fromJson,
      EmailProviderResponse: EmailProviderResponse.fromJson,
    }),
  );

  return _$LinkService(client);
}