-
Notifications
You must be signed in to change notification settings - Fork 344
Closed
Labels
in editorRelates to code editing or language featuresRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serverSomething to be fixed in the Dart analysis serveris enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.An enhancement or improvement that should be listed in release notes but is not a bug fix.
Milestone
Description
Describe the bug
In VS code, conditional imports breaks code navigation (i.e. pressing cmd+click) and linting (i.e., showing error for invalid paths) as shown below:
import 'package:file_picker/file_picker.dart'; // cmd+click ✅ lint ✅
import 'image_cropper/cropper_stub.dart' // cmd+click ❌ lint ✅
if (dart.library.io) 'image_cropper/cropper_mobile.dart' // cmd+click ❌ lint ❌
if (dart.library.html) 'image_cropper/cropper_web.dart'; // cmd+click ❌ lint ❌Versions (please complete the following information):
- VS Code version: 1.52.1
- Dart extension version: v3.18.1
- Dart/Flutter SDK version: v3.18.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
in editorRelates to code editing or language featuresRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serverSomething to be fixed in the Dart analysis serveris enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.An enhancement or improvement that should be listed in release notes but is not a bug fix.