jdenticon 1.0.1

jdenticons-dart #

pub package

Very messy port of Jdenticons to Dart, will clean up later.

Usage #

A simple usage example:

import 'package:jdenticon/jdenticon.dart';

main() {
  var identicon = Jdenticon.toSvg("Leah", 100);
  print("$identicon");
}

Example Icon

License #

This library is licensed under the MIT license. Please read the LICENSE file for more information.

1.0.1 #

  • Add SHA1 hashing

1.0.0 #

  • Initial version, created by Stagehand

example/jdenticon_example.dart

import 'package:jdenticon/jdenticon.dart';

main() {
  var identicon = Jdenticon.toSvg("Leah", 100);
  print("$identicon");
}

Use this package as a library

1. Depend on it

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


dependencies:
  jdenticon: ^1.0.1

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

We analyzed this package on Aug 20, 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:jdenticon/jdenticon.dart.

Health suggestions

Fix lib/src/icon_generator.dart. (-1 points)

Analysis of lib/src/icon_generator.dart reported 2 hints:

line 100 col 9: Use contains instead of indexOf

line 102 col 13: Use contains instead of indexOf

Fix lib/src/color.dart. (-0.50 points)

Analysis of lib/src/color.dart reported 1 hint:

line 37 col 11: The value of the local variable 'a' isn't used.

Maintenance suggestions

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

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
crypto ^2.0.6 2.1.2
Transitive dependencies
charcode 1.1.2
collection 1.14.12
convert 2.1.1
typed_data 1.1.6
Dev dependencies
pedantic ^1.0.0
test ^1.0.0