boring_avatars library

A bit-exact Dart port of boring-avatars.

Given the same name, palette and variant, this package draws the avatar the npm package draws — the same numbers, the same SVG, the same pixels.

Every supported upstream release is reachable at once: pick a BoringAvatarsVersion and you get that release's algorithm, with no downgrade and no second dependency. Support starts at upstream 1.6.1, where the hash function reached its current form — see BoringAvatarsVersion for the releases each value covers.

Classes

BoringAvatar
An avatar, rasterised at the display's physical pixel size.

Enums

BoringAvatarsVariant
An avatar style.
BoringAvatarsVersion
An upstream boring-avatars release whose output this package reproduces.

Functions

boringAvatarSvg({required String name, required List<String> colors, required Object size, required BoringAvatarsVersion version, BoringAvatarsVariant variant = BoringAvatarsVariant.marble, bool square = false, bool? title}) String
The avatar for name, as an SVG document.