badge-pubdev badge-repo github-stars

badge-platforms badge-language badge-license

badge-sponsors badge-githubsponsors badge-patreon

badge-mastodon badge-twitter badge-twitter-gizmosdev

A library of useful, reusable, methods and extensions for Dart.


To use this package, add prime as a dependency in your pubspec.yaml file.

  prime: any

Import the library

import 'package:prime/prime.dart';


TODO: add info here

Check dependencies

You can check for missing, under-promoted, over-promoted, and unused dependencies using the dependency_validator package.

dart run dependency_validator

You can upgrade dependencies with the following commands:

dart pub upgrade
dart pub outdated
dart pub upgrade --major-versions

The steps required will depend on details provided by those commands.


If using VS Code, it should keep your Dart files nicely formatted automatically. If you're not using VS Code, you can ensure the code formatted correctly using the command:

dart format . -l 240

We also use yamllint to keep our .yaml files neat and correct. Run the following command to view any issues with our .yaml files:

yamllint .

Our rules configuration is in the .yamllint.yaml file. If you run yamllint from a folder that doesn't have the configuration in it (or a link to it), you can specify to use our config file by executing yamllint -c ../path/to/.yamllint.yaml.


VS Code will display hints inline when the dart analyzer detects an issue with the code. You can manually run the analyzer to view all of the issues at once with the command:

dart analyze .

You can then fix the issues manually, or in most cases, use a built-in quick fix to correct the issue. Use the following command to see the issues that can be fixed automatically:

dart fix --dry-run .

And then run this command to apply those fixes if they look ok to you:

dart fix --apply .


See also: flutter_prime for a Flutter enhanced version of prime.

Please send me suggestions/bug fixes.