create static method
UserService
create(
- Client httpClient,
- Uri baseUrl,
- RequestInterceptor authInterceptor
)
Implementation
static UserService create(
http.Client httpClient, Uri baseUrl, RequestInterceptor authInterceptor) {
final client = ChopperClient(
client: httpClient,
baseUrl: baseUrl,
interceptors: [
HttpRequestLoggingInterceptor(),
authInterceptor,
],
converter: const JsonSerializableConverter({
User: User.fromJson,
UserFallbackTimeZone: UserFallbackTimeZone.fromJson,
RefreshResponse: RefreshResponse.fromJson,
ProvidersResponse: ProvidersResponse.fromJson,
CreateUserResponse: CreateUserResponse.fromJson,
DeleteUserResponse: DeleteUserResponse.fromJson,
DeregisterProviderResponse: DeregisterProviderResponse.fromJson,
GetAllUsersResponse: GetAllUsersResponse.fromJson,
CreateSignInTokenResponse: CreateSignInTokenResponse.fromJson,
}));
return _$UserService(client);
}