navii_dart 0.1.0
navii_dart: ^0.1.0 copied to clipboard
Deterministic mascot-style avatar generation for Dart. Same seed = same SVG, every time, on every platform. No database, no uploads, no state required.
example/navii_dart_example.dart
import 'package:navii_dart/navii_dart.dart';
void main() {
// Generate a deterministic SVG avatar from a seed string.
final svg = createAvatar('user-123');
print('SVG length: ${svg.length} chars');
print('Starts with: ${svg.substring(0, 40)}...');
// Same seed always produces the same output.
assert(createAvatar('alice') == createAvatar('alice'));
print('Determinism confirmed.');
// With options.
final customSvg = createAvatar('alice', AvatarOptions(paletteId: 'violet'));
print('Custom palette SVG length: ${customSvg.length}');
}