-
Notifications
You must be signed in to change notification settings - Fork 340
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 enhancement
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
iulian0512 and ParisNeo
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 enhancement