create static method
VitalsService
create(
- Client httpClient,
- Uri baseUrl,
- RequestInterceptor authInterceptor
)
Implementation
static VitalsService create(
http.Client httpClient, Uri baseUrl, RequestInterceptor authInterceptor) {
final client = ChopperClient(
client: httpClient,
baseUrl: baseUrl,
interceptors: [
HttpRequestLoggingInterceptor(),
authInterceptor,
],
converter: const JsonSerializableConverter({
Measurement: Measurement.fromJson,
BloodPressureMeasurement: BloodPressureMeasurement.fromJson,
}));
return _$VitalsService(client);
}