Closed
Description
Package
dio
Version
5.8.0+1
Operating-System
Windows
Adapter
Default Dio
Output of flutter doctor -v
Flutter version 3.32.0
Dart Version
3.8.0
Steps to Reproduce
Trying to add an interceptor with the following code:
_dio.interceptors.add(CookieManager(_cookieJar));
The linter show the following error (and also the build fails):
The method 'add' isn't defined for the type 'Interceptors'.
Try correcting the name to the name of an existing method, or defining a method named 'add'.dart[undefined_method](https://dart.dev/diagnostics/undefined_method)
Expected Result
The method add should work as expected
Actual Result
Inspecting the Interceptors
class definition it seems like the IDE doesn't even know what ListMixin
is.
I think this could be the problem since add
(I guess) is defined inside that mixin