init method

void init()

Initialize class

Implementation

void init() {
  _api = Dio(baseOptions);

  // Evaluate the [interceptors] getter once; subclasses build a fresh map
  // (and fresh interceptor instances) on every access.
  final Map<Type, Interceptor> resolvedInterceptors = interceptors;
  if (resolvedInterceptors.isNotEmpty) {
    _addInterceptors(resolvedInterceptors);
  }

  if (_initDio != null) {
    _api = _initDio!(_api);
  }
}