dart_package_template

GitHub template repository for Dart packages, ready for pub.dev publication.

pub package License: MPL 2.0 build example stars

✨ Features

  • Ready for immediate package publication to pub.dev.
  • Pre-configured pubspec.yaml with recommended fields.
  • Multiple example projects in the example/ directory.
  • Linting setup with lints package for code quality, following the Effective Dart style guide.
  • (Recommended) MPL-2.0 License for open source projects.
  • Unit tests setup with test package.
  • GitHub Actions workflows for automated testing/QA jobs on push events and PRs.

This repository is also published as a package on pub.dev to make sure it's always kept up to date on the most recent best practices 🫶

🔮 Getting Started

  1. Create a new repository
    • Click the "Use this template" button on the GitHub page for this repository.
    • Fill in the details for your new repository and create it.
      • 🛑✋ IMPORTANT! Make sure to name your new repository and package with underscore separators, just_like_this as required by Dart.
  2. Clone your new repository
    git clone <your-repo-url>
    cd <your-repo-name>
    
  3. Update pubspec.yaml
    • Change the name, description, homepage, repository, and issue_tracker fields to match your package.
    • Update the environment SDK constraints if necessary.
    • Update the same fields in example/pubspec.yaml.