Visual Studio Code

Providing that you are using at least dart 2.15 then OnePub works with Visual Studio Code out of the box.

The only actions required are to install OnePub and then login:

flutter pub global activate onepub
onepub login

If you are running a Dart version pre 2.12 then follow the pre 2.12 install instructions.

Docker containers

VS Code provides the ability to do your debugging in a local docker container via the command:

Remote-Containers: Open Folder in Container...

The OnePub cli tooling works as normal in a docker container but please read the section on Docker for further details and non-interactive auth with OnePub from within a Docker container.

Install onepub into docker

You will also want to install onepub into the Docker container.

To do this edit the the .devcontainer/Dockerfile and add the following command to the end of the file:

RUN dart pub global activate onepub

Last updated

Was this helpful?