vscode-dart-import
vscode-dart-import copied to clipboard
Current file is not on project root or not on lib folder? (MacOS Big Bug, I mean, Big Sur)
Error every time I save pubspec.yaml:
Current file is not on project root or not on lib folder? File must be on $root/lib. Your current file path is: '/Users/jckodel/Desktop/MeuCronogramaCapilar/frontend/pubspec.yaml' and the lib folder according to the pubspec.yaml file is '/Users/jckodel/Desktop/MeuCronogramaCapilar/frontend/lib'.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.4, on macOS 11.0.1 20B50 darwin-x64, locale en-BR)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
[✓] VS Code (version 1.51.1)
Are you trying to format the pubspec file itself? You should be formatting *.dart files inside the lib folder
@luanpotter Hence the OP didn't answer. Dart-import is triggered also for pubspec.yaml therefore this error comes up
This error is also triggered when saving analysis_options.yaml
and the Dart Import: Fix On Save
option is checked.
It seems this error is triggered when the project contains multiple dart projects too. My current source tree is constructed with multiple dart projects at the same project, and it contains multiple libs under their individual project directory.