JetBrains Space Help

Get Dart Packages

  1. Specify the repository URL and an access token for the dart tool:

    dart pub token add https://dart.pkg.jetbrains.space/mycompany/p/projectkey/mydart

    • https://dart.pkg.jetbrains.space/mycompany/p/projectkey/mydart is the repository URL

    • mycompany is the name of your company in Space, mydart is the repository name.

    If you are not sure about the URL, you can copy the URL of a particular repository on the Packages page.

  2. When asked for a token, specify your personal access token. You can manage the created token on the My Profile | Security | Personal Tokens page.

  3. In Space, open Packages and find the desired Dart package.

  4. Open the package properties page.

  5. In the snippets field, copy the snippet code. For example, it might look like this:

    dart pub add --hosted-url=https://dart.pkg.jetbrains.space/mycompany/p/projectkey/mydart dart_package:1.0.0

  6. On your local machine, open the root directory of the project where you want to add the dependency.

  7. Run the copied snippet.

Last modified: 30 August 2022