checkAndPubGlobalActivatePackage function

Future<bool> checkAndPubGlobalActivatePackage(
  1. String package, {
  2. bool? force,
  3. bool? verbose,
})

Activate a package with dart pub global activate if not activated yet.

force activates it even if already activated (i.e. updates it to its latest version).

checkAndInstallCliPackage (dart install) is preferred for executables.

Returns true if the package was activated during this call.

Implementation

Future<bool> checkAndPubGlobalActivatePackage(
  String package, {
  bool? force,
  bool? verbose,
}) => _pubGlobalLock(
  () => _checkAndActivatePackage(package, force: force, verbose: verbose),
);