I have got extensions on List
extension CustomListExtensions<TType> on List<TType> {
List<TOther> transform<TOther>(TOther Function(TType) fn) {
....
}
}
I have used this all over application which was working fine.
But now, I am seeing all duplicate code suggestions (intelllisense) in vscode. Tried in Android Studio and I see the same issue.
It is suggesting every file this extension was used as you could see in the screenshot.
My current environment
Flutter 3.24.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 4cf269e36d (5 days ago) • 2024-09-03 14:30:00 -0700
Engine • revision a6bd3f1de1
Tools • Dart 3.5.2 • DevTools 2.37.2
Anyone else has seen this issue please?
4
This was a bug in the Dart analysis server that has recently been fixed. Extensions were incorrectly being shown for each file that imported them, rather than only files that exported/declared them.
- https://github.com/dart-lang/sdk/issues/56320
- https://github.com/dart-lang/sdk/commit/a0411ae24485526470b7f99148132f29fe01edcb
The fix will ship in a future Dart/Flutter SDK release.