hex 0.1.2

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:


dependencies:
  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';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
90
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
79
Overall:
Weighted score of the above. [more]
90
Learn more about scoring.

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

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:hex/hex.dart.

Health suggestions

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

Analysis of lib/hex.dart reported 2 hints:

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

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

Maintenance suggestions

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 is getting outdated. (-2.19 points)

The package was last published 53 weeks ago.

Dependencies

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