ApiClient constructor
ApiClient()
Creates an instance of ApiClient and initializes the Dio
instance.
Sets up the base URL and adds interceptors for managing cookies and
refreshing tokens.
Implementation
ApiClient() : dio = Dio() {
dio.options.baseUrl = baseUrl;
if (!kIsWeb) {
dio.interceptors.add(cookieStorageService.getCookieManager());
}
dio.interceptors.add(DeviceInfoInterceptor());
dio.interceptors.add(TimezoneInterceptor());
dio.interceptors.add(RefreshInterceptor());
dio.interceptors.add(GeneralErrorLogInterceptor());
}