hex 0.1.2

  • Readme
  • Changelog
  • Installing
  • 83

dart-hex #

Easy hexadecimal encoding and decoding using the dart:convert API.

Usage #

A simple usage example:

import "package:hex/hex.dart";

void main() {
  HEX.encode(const [1, 2, 3]); // "010203"
  HEX.decode("010203"); // [1, 2, 3]

Changelog #

0.1.2 (2018-08-13) #

  • use const constructor for decoder
  • support Dart v2
  • change license to MIT

0.1.1 (2017-01-27) #

  • throws FormatException on invalid input

0.1.0 (2017-01-27) #

  • initial version

Use this package as a library

1. Depend on it

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

  hex: ^0.1.2

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:hex/hex.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 17, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health suggestions

Fix lib/hex.dart. (-3.45 points)

Analysis of lib/hex.dart reported 7 hints, including:

line 9 col 13: Avoid const keyword.

line 31 col 21: Don't type annotate initializing formals.

line 31 col 40: Use = to separate a named parameter from its default value.

line 35 col 27: Unnecessary new keyword.

line 38 col 15: Unnecessary new keyword.

Maintenance suggestions

Package is getting outdated. (-42.74 points)

The package was last published 74 weeks ago.

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 hex.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

The package description is too short. (-9 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.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <3.0.0
Dev dependencies
test >=0.12.0 <0.13.0