initialize method
BaseDio
initialize({
- BaseDioOptions? options,
- BaseDioOptions? downloadOptions,
- HttpClientAdapter? httpClientAdapter,
- Transformer? transformer,
- List<
InterceptorsWrapper> interceptors = const [],
Implementation
BaseDio initialize({
BaseDioOptions? options,
BaseDioOptions? downloadOptions,
HttpClientAdapter? httpClientAdapter,
Transformer? transformer,
List<InterceptorsWrapper> interceptors = const [],
}) {
if (options != null) baseDioOptions = options;
dio = ExtendedDio().initialize(
interceptors: [
...interceptors,
if (isDebugger) DebuggerInterceptor(),
],
options: baseDioOptions,
transformer: transformer,
httpClientAdapter: httpClientAdapter,
downloadOptions: downloadOptions);
return this;
}