Added one click install command feature#7305
Added one click install command feature#7305ebenjs wants to merge 4 commits intodart-lang:masterfrom
Conversation
Feature install cmd packages homepage
|
Note: I've pushed this to the staging site: I find the gray background a bit off in the sidebar, I think we should look for a more blended-in design. |
|
Hm, actually, wouldn't it be better to just copy the Maybe if the non-latest version is being viewed, the add command could be modified to include the version as a flag |
|
If we do this, it is either the drop-down or switching the copied text from the current copy-button. Closing this. @ebenjs if you want to work on one of the other options feel free, otherwise thanks for your contribution - sorry for the delayed decision. |


This PR is targeting issue #7122
We're used to having the ability to easily install packages by copying the install code and pasting it directly into the console. This is especially helpful when you need to quickly install a package. Popular platforms like https://www.npmjs.com/package/axios, https://crates.io/crates/http, and https://pypi.org/project/http1/ all employ this design.
Currently, there's something similar in the header section of the package page after the package name. However, this command only allows you to copy text that's intended to be pasted in the pubspec.yml file and manually run 'pub get install.'
Therefore, I suggest adding this feature as it would be a time-saving feature for all developers.
Here is a screenshot
Contribution guidelines:
dart format.Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.