这是indexloc提供的服务,不要输入任何密码

identicon_dart 1.0.0 copy "identicon_dart: ^1.0.0" to clipboard
identicon_dart: ^1.0.0 copied to clipboard

A lightweight Dart library for generating GitHub-style identicons from any string input.

Identicon Generator #

A lightweight Dart library for generating GitHub-style identicons from any string input.

Features #

  • 🎨 Generate unique identicons from strings

  • 🖼️ Multiple output formats: PNG file, Base64 string

  • 🎯 Customizable size and grid complexity

Installation #

Add to your pubspec.yaml:

dependencies:
  identicon: ^1.0.0

Quick Start #

import 'package:identicon/identicon.dart';

void main() {
  // Create identicon
  final identicon = Identicon(value: 'hello@world.com');
  
  // Save as file
  identicon.toFile(filename: 'my_identicon');
  
  // Get as base64 for web
  final base64String = identicon.toBase64();
  print('Base64: $base64String');
  
  // Get raw grid data
  final grid = identicon.raw();
  print('Grid: $grid');
}

Customization #

final identicon = Identicon(
  value: 'custom',
  size: 300,        // Image size in pixels
  cellsCount: 7,    // Grid complexity (3-7)
);
1
likes
130
points
121
downloads

Publisher

unverified uploader

Weekly Downloads

A lightweight Dart library for generating GitHub-style identicons from any string input.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

crypto, image, path

More

Packages that depend on identicon_dart