flutter_glove_box icon indicating copy to clipboard operation
flutter_glove_box copied to clipboard

pub dev documentation should suggest installing as a `dev_dependency`

Open tsimbalar opened this issue 5 years ago • 5 comments

When going to

https://pub.dev/packages/golden_toolkit/install

It suggests to install the package by adding it as a dependency :

dependencies:
  golden_toolkit: ^0.7.0

It should probably recommend to install it as a dev_dependency . Not sure how this is done, but for instance build_runner does appear as a dev_dependency :

https://pub.dev/packages/build_runner/install

tsimbalar avatar Nov 06 '20 08:11 tsimbalar

that makes sense. I'll do that now. Thanks!

coreysprague avatar Nov 06 '20 16:11 coreysprague

Actually... I have no idea how to do this. I checked a handful of packages and studied their repos and can't figure out for the life of me. I also can't find anything available in the tooling when publishing to pub.dev. I'm going to reach out to a contact on the Flutter team and see if they can point me in the right direction. Stay tuned!

coreysprague avatar Nov 06 '20 16:11 coreysprague

so I ended up looking in the source code...

https://github.com/dart-lang/pub-dev/pull/3397/files#diff-31423dfd3ae84f685ebb7cabf73ba919ae6ca828c589810df46722502d27df02R26

pub.dev has special code to opt a handful of packages into this. So it is not something we can currently control.

There is an open issue filed against pub.dev to allow for this. https://github.com/dart-lang/pub-dev/issues/3403

coreysprague avatar Nov 06 '20 17:11 coreysprague

Oh, interesting ... so I guess closing this issue is enough (or adding explicit instructions in README.md ?)

tsimbalar avatar Nov 06 '20 19:11 tsimbalar

I think I'll update the Readme... leave this issue open and block it waiting on the linked pub.dev issue.

Thanks!

coreysprague avatar Nov 06 '20 19:11 coreysprague