identicon 0.1.1

  • Readme
  • Changelog
  • Example
  • Installing
  • new56

identicon #

pub package GitHub license

A library which generate an identicon image based on a string.

Usage #

final bytes = Identicon().generate("HelloWorld");
File file = new File("example.png");
file.createSync(recursive: true);
file.writeAsBytesSync(bytes);

Getting Started #

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

[0.1.1]

  • update doc

[0.1.0]

  • release

[0.0.2]

  • support memory cache

[0.0.1] - init.

  • init project.

example/main.dart

import 'dart:io';

import 'package:identicon/identicon.dart';

void main() {
  for (var i = 0; i < 10; i++) {
    final bytes = Identicon().generate("HelloWorld " + i.toString());
    File file = new File("example_${i}.png");
    file.createSync(recursive: true);
    file.writeAsBytesSync(bytes);
  }
}

Use this package as a library

1. Depend on it

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


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

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

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

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

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.

Format lib/identicon.dart.

Run dartfmt to format lib/identicon.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
crypto ^2.1.3 2.1.3
image ^2.1.4 2.1.5
Transitive dependencies
archive 2.0.10
args 1.5.2
charcode 1.1.2
collection 1.14.12
convert 2.1.1
meta 1.1.7
path 1.6.4
petitparser 2.4.0
typed_data 1.1.6
xml 3.5.0
Dev dependencies
test ^1.3.0