config method

  1. @override
void config(
  1. Dio dio
)
override

Implementation

@override
void config(Dio dio) async {
  // Get certificate fingerprints
  if (fingerprints.isEmpty) {
    fingerprints = await certificateFingerprint.fingerprints();
  }

  // Create Http Client Adapter
  dio.httpClientAdapter = IOHttpClientAdapter(
    createHttpClient: () => httpClientCreator.create(fingerprints),
    validateCertificate: (cert, host, port) => certificateValidator
        .validateCertificate(cert, host, port, fingerprints),
  );
}