-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
Labels
good first issue
A relatively straight forward issue that could be done by a new contributorA relatively straight forward issue that could be done by a new contributorin commandsRelates to commands (usually invoked from the command Palette)Relates to commands (usually invoked from the command Palette)is enhancement
Milestone
Description
I am using v3.27.2 of the extension and I searched for a similar issue but I didn't find anything related.
Currently, the auto-completion about dependencies just works in pubspec.yaml but I think it can be better to add the dependencies in import (for tired guys can be the best solution).
At this time the process for using a package is: (expect its kind - local, hosted on pub server or as a dev dep)
- Adding dependencies in
pubspec.yaml - Runnin
pub getto fetch the package and other related configs - import it and use it
But I suggest a new way (I am not sure this feature can be implemented in extension or not let me know).
For example, we want to add a dependency in the dependency section in pubspec.yaml what we should do is:
- import the package with this syntax
import 'dep:<package_name | git_remote_repo | local/path/to/package>';auto completion works as same logic as used inpubspec.yaml(with some modification) crtl + .click onfetch package- then
pub add <package_name> --<associated_switch>will run and do all configurations
Note: as dev dependency we can use import 'dev:<package_name | git_remote_repo | local/path/to/package>';
Metadata
Metadata
Assignees
Labels
good first issue
A relatively straight forward issue that could be done by a new contributorA relatively straight forward issue that could be done by a new contributorin commandsRelates to commands (usually invoked from the command Palette)Relates to commands (usually invoked from the command Palette)is enhancement