onInit method

void onInit()

Implementation

void onInit() {
  dio.options.baseUrl = baseUrl;
  dio.options.connectTimeout = Duration(seconds: connectTimeout ?? 90);
  dio.options.receiveTimeout = Duration(seconds: receiveTimeout ?? 90);
  dio.options.headers = header;

  dio.interceptors.add(
    CustomInterceptor(
      accessToken: accessToken,
      refreshToken: refreshToken,
      serverCertificate: serverCertificate,
      ignorePaths: ignorePaths,
      dio: dio,
      onTokenRefreshed: onTokenRefreshed,
    ),
  );
}