VitalInterceptor constructor

VitalInterceptor(
  1. bool useAccessToken,
  2. String? apiKey
)

Implementation

VitalInterceptor(this.useAccessToken, this.apiKey) : super({}) {
  if (useAccessToken && apiKey != null) {
    throw Exception("useAccessToken is true, but an API key is provided.");
  }

  if (!useAccessToken && apiKey == null) {
    throw Exception(
        "useAccessToken is false, but an API key is not provided.");
  }
}