Finally, use the ref argument to pin the dependency to a
specific git commit, branch, or tag. For more details, see
Package dependencies.

Examples

The following examples walk through the necessary steps for
using packages.

Example: Using the css_colors package

The css_colors package
defines color constants for CSS colors, so use the constants
wherever the Flutter framework expects the Color type.

To use this package:

Create a new project called cssdemo.

Open pubspec.yaml, and add the css-colors dependency:

    
dependencies:
  flutter:
    sdk: flutter
  css_colors: ^1.0.0

Run flutter pub get in the terminal,
or click Get Packages in VS Code.

Open lib/main.dart and replace its full contents with: