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