How to use my dart packages private and not show on pub dart lang?

Issue

I have dart packages that I don’t want to publish to pub because of my company agreement. How to use my dart packages for only my company and not show on pub dart lang?

I’ve looked up on this link https://github.com/dart-lang/pub/issues/1050 but still need more information about that.

Solution

If you publish a package to https://pub.dartlang.org it will show up. There is no way around that.

Alternatives.

You can use

  • path dependencies to packages stored on a local or network drive for example.
  • Git dependencies to packages stored in a Git repository
    • on a local or network drive
    • hosted on GitHub, GitLab, or any other Git server
  • run your own private Pub server.

See also

Answered By – Günter Zöchbauer

Answer Checked By – Willingham (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *