RestAPI constructor

RestAPI({
  1. AdeptChopperClient? chopperClient,
  2. String? apiUrl,
  3. Uri? apiUri,
  4. Client? httpClient,
  5. List<Interceptor>? interceptors,
  6. Authenticator? authenticator,
  7. Converter? converter,
  8. ErrorConverter? errorConverter,
  9. Map<Type, ChopperService>? services,
  10. Duration? timeout,
})

Implementation

RestAPI({
  AdeptChopperClient? chopperClient,
  String? apiUrl,
  Uri? apiUri,
  this.httpClient,
  List<Interceptor>? interceptors,
  this.authenticator,
  Converter? converter,
  ErrorConverter? errorConverter,
  Map<Type, ChopperService>? services,
  this.timeout,
})  : chopperClient = chopperClient ?? AdeptChopperClient(),
      apiUri = apiUri ?? Uri.parse(apiUrl ?? ''),
      interceptors = interceptors ?? [],
      converter = converter ?? const JsonConverter(),
      errorConverter = errorConverter ?? const JsonConverter(),
      services = services ?? {};