Pre Dart 2.15

opub

The opub app is provided for users that are using versions of Dart prior to 2.15.

Use opub xxx in place of dart/flutter pub xxx

The Dart development team made significant changes with respect to how the Dart CLI tools interact with a private repository and older versions of the Dart pub command aren't compatible with OnePub.

The opub command simply contains a complete copy of the dart pub command back ported to dart 2.12.

To circumvent this problem OnePub provide the opub app which replaces the dart pub and flutter pub commands.

When running a command (such as dart pub get) that operates on a private package or a package that depends on a private package then you simply substitute 'dart pub get' or 'flutter pub get' with 'opub get'. The same goes for all of the pub commands.

If you are running an even older version of Dart (pre-2.12) then read the section on using Dart pre-2.12.

Last updated