github_colors 0.0.5

  • Readme
  • Changelog
  • Installing
  • 47

github_colors #

A Dart package for developers to covert languages colors in Github.

Usage #

Open your pubspec.yaml and add the following dependency.

dependencies:
  github_colors: 0.0.1  #latest version
import 'package:github_colors/github_colors.dart';

main() async {
  String hex = GithubColors.covert('JavaScript');
  print(hex); // #f1e05a
}

If Github update languages, run the following command in the terminal to fetch the latest infomation.

pub global run github_colors:main

Example #

Author #

github_colors © linrz, Released under the MIT License.
Authored and maintained by linrz.

github.com/linrz · GitHub @linrz · Twitter @linrzPro


2019 © linrz

[0.0.1] - TODO: Add release date.

  • TODO: Describe initial release.

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate github_colors

2. Use it

The package has the following executables:


$ github_colors

Use this package as a library

1. Depend on it

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


dependencies:
  github_colors: ^0.0.5

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:github_colors/github_colors.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
13
Health:
Code health derived from static analysis. [more]
97
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
57
Overall:
Weighted score of the above. [more]
47
Learn more about scoring.

We analyzed this package on Dec 9, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.12.21

Health issues and suggestions

Document public APIs. (-1 points)

5 out of 5 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix bin/main.dart. (-1.99 points)

Analysis of bin/main.dart reported 4 hints:

line 8 col 7: Don't explicitly initialize variables to null.

line 13 col 5: Use rethrow to rethrow a caught exception.

line 19 col 16: Unnecessary new keyword.

line 26 col 15: Unnecessary new keyword.

Format lib/github_colors.dart.

Run dartfmt to format lib/github_colors.dart.

Format lib/src/colors.dart.

Run dartfmt to format lib/src/colors.dart.

Format lib/src/github_colors.dart.

Run dartfmt to format lib/src/github_colors.dart.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (dio).

The package description is too short. (-13 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and github_colors.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
dio ^2.1.0 2.2.2 3.0.7
yaml ^2.1.15 2.2.0
Transitive dependencies
charcode 1.1.2
collection 1.14.12
cookie_jar 1.0.1
meta 1.1.8
path 1.6.4
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0