badges_bar 0.1.6
badges_bar: ^0.1.6 copied to clipboard
SVG badge generator for packages on pub.dev. Likes, pub points and popularity.
Badges for Dart and Flutter packages #
On Docker Hub #
https://hub.docker.com/r/brunogarcia/badges.bar/tags
Using badges.bar #
You can create a badge for your package by using https://badges.bar/{package}/{score_type}
.
Score types can be either:
likes
pub points
popularity
For example for the package sentry
:
:
[](https://pub.dev/packages/sentry/score)
:
[](https://pub.dev/packages/sentry/score)
:
[](https://pub.dev/packages/sentry/score)
Using the API #
Render an SVG badge with the Dart logo #
final textSvg = svg('Title', 'Value');
copied to clipboard
The textSvg
above would render the svg like in but instead with
Title
on the left hand and Value
on the right (green background) side.
Fetch the pub.dev scores for a package #
const package = 'badge_bar';
final client = PubClient();
final score = await client.getScore(package);
print('Stats for $package:');
print('Likes: ${score.likes}');
print('Popularity: ${score.popularity}');
print('Pub Points: ${score.points}');
copied to clipboard