Let's say I have a simple script such as this:
// File main.dart
Could not import "package:uuid/uuid.dart" from "file:///C:/folder/main.dart":
Could not resolve a package location for base at file:///C:/folder/main.dart
pub global activate uuid
pub get (or
pub upgrade) are used to make a package available to your project at all.
Only after a package is available libraries from this package can be imported using a package URI.
pub global activate is to make packages available that contain executables to be executed from the command line.