AvatarLogoRender class
Deterministically derives the gradient colors, rotation angle, and initials for an
AvatarVariant, matching the algorithm in the web SDK's generateAvatarDataUri.ts bit-for-bit
(same hash, same palette index, same rotation math) so the two SDKs render identical avatars.
Constructors
- AvatarLogoRender({required Color startColor, required Color endColor, required double angleDegrees, required String initials})
-
const
- AvatarLogoRender.forSeed(String content, int colors, AvatarVariant variant)
-
contentis assumed to already be the final, ready-to-render content (e.g."BM") — not a seed to extract initials from; it is only uppercased/truncated to thevariant's letter count for display, and hashed as-is (together withcolors) to pick the gradient/angle.factory
Properties
- angleDegrees → double
-
Gradient rotation, in degrees, matching the SVG
gradientTransform="rotate(...)"used by the web SDK.final - endColor → Color
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initials → String
-
1-2 uppercase letters to overlay, truncated from
contentto thevariant's letter count.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startColor → Color
-
final
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