DicebearCodec class

Utility to compress an Avatar configuration into exactly 13 bytes.

Constructors

DicebearCodec()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

decode(Uint8List bytes) String
Decodes exactly 13 bytes back into an SVG string.
encode({AvatarStyle style = AvatarStyle.openPeeps, String headOrHairKey = '', String faceOrEyesKey = '', String hairColor = '', String skinColor = '', String clothingColor = '', String? facialHairKey, String? accessoriesKey, String? maskKey, String? bodyKey, String? mouthKey, String? noseKey, String? eyebrowsKey, String? earsKey, String? glassesKey, String? earringsKey, String earringColor = '', String eyeShadowColor = '', String eyesColor = '', String glassesColor = '', String mouthColor = '', String eyebrowsColor = '', String? rearHairKey, String avataaarStyleKey = '', String clothingGraphicKey = '', String accessoriesColor = '', String hatColor = '', String facialHairColor = '', String backgroundColor = ''}) Uint8List
Encodes avatar parameters into exactly 13 bytes.

Constants

palette → const List<String>
Standard 32-color palette used for 5-bit color compression.