initialize method
BasicDio
initialize({
- BasicDioOptions? options,
- BasicDioOptions? downloadOptions,
- dynamic httpClientAdapter,
- dynamic transformer,
- List interceptors = const [],
Implementation
BasicDio initialize({
BasicDioOptions? options,
BasicDioOptions? downloadOptions,
HttpClientAdapter? httpClientAdapter,
Transformer? transformer,
List<InterceptorsWrapper> interceptors = const [],
}) {
if (options != null) basicDioOptions = options;
dio = ExtendedDio().initialize(
interceptors: [
...interceptors,
if (isDebugger) DebuggerInterceptor(),
if (isDebug)
LoggerInterceptor(filteredApi: options?.filteredApi ?? [])
],
options: basicDioOptions,
transformer: transformer,
httpClientAdapter: httpClientAdapter,
downloadOptions: downloadOptions);
return this;
}