I started a Dart project and now I need some functionality that is not available in the Dart API Reference. I was advised to use a package from pub.dartlang.org and now I am browsing through the pub.
Previous experience with Javascript libraries tell me that quality and support can vary wildly between libraries. Therefore I am a bit reluctant to use packages from pub. How would I know which package has a good quality, and whether a package will be updated when there are breaking changes in Dart?
Therefore I would like to know:
Some questions related to this:
Kind regards,
Hendrik Jan van Meerveld
Pub is the package manager for the Dart programming language, containing reusable libraries & packages for Flutter, AngularDart, and general Dart programs. Some basic command: Use pub get to get dependencies. Use pub upgrade to upgrade a dependency. Use pub publish to make your library available for others.
Pub. dev facilitates the sharing via publication of Dart packages. It is central to this service that consumers of packages can trust that their dependencies do not suddenly disappear. Thus, once a package has been published it cannot be unpublished or deleted.
You are correct that the quality of packages can vary in Pub or any other pack repo. Here are a few things you could use to evaluate the quality of the packages:
To answer your specific questions:
You can see a list of Dart-team developed packages on the Dart API page. Any package there not prefixed with dart is a library that has been developed and supported by the Dart team. I would definitely prefer a library developed by the Dart Team or someone from Google.
If the source repo for the package is available publicly (e.g. on GitHub), you can view the frequency of commits, and responsiveness of the author to issues/pull requests. For instance, you can easily tell that StageXL is a well maintained library by taking a look at their GitHub: 550+ commits, new commits within the last couple of weeks, accepts code from other contributors, and has almost 50 closed issues.
Bob Nystrom has talked about a ranking mechanism for pub in the past (he recently posted some ranking results that you can see here). Once a ranking system is in place, you will be able to better choose between two XML libraries for instance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With