pubspec_dart 0.1.0

  • Installing
  • Versions
  • 48


A simple tool for inlining the package name and version into Dart code.


$ pub global activate pubspec_dart
$ pub global run pubspec_dart:build

By default, generates a lib/src/pubspec.dart that looks like:

// Automatically generated by package:pubspec_dart
// Can be regenerated by running `pub global run pubspec_dart:build

/// Name of this package.
const name = 'pubspec_dart';

/// Version of "package:pubspec_dart".
const version = '0.1.0';


  • Initial commit

1. Depend on it

Add this to your package's pubspec.yaml file:

  pubspec_dart: "^0.1.0"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or packages get. Check the docs for your editor to learn more.

Version Uploaded Documentation Archive
0.1.0 Jan 3, 2017 Go to the documentation of pubspec_dart 0.1.0 Download pubspec_dart 0.1.0 archive


This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
100 / 100
Reflects how tidy and up-to-date the package is. [more]
91 / 100
Overall score:
Weighted score of the above. [more]


Detected platforms: Flutter, web, other

No platform restriction found in libraries.


  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use pubspec_dart.dart.

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.21.0 <2.0.0
args >=0.13.4 <0.14.0 0.13.7 1.3.0
path ^1.4.1 1.5.1
yaml ^2.1.0 2.1.13
Transitive dependencies
charcode 1.1.1
collection 1.14.5
source_span 1.4.0
string_scanner 1.0.2
Dev dependencies
test ^0.12.18+1