Avataaar.random constructor
Avataaar.random({})
Generate a full random Avataaar. Could customize some values.
Implementation
Avataaar.random({
String? baseUrl,
Top? top,
Clothes? clothes,
Eyes? eyes,
Eyebrow? eyebrow,
Mouth? mouth,
Skin? skin,
Style? style,
Color? backgroundColor,
}) : this(
baseUrl: baseUrl ?? AvataaarsApi.baseUrl,
top: top ?? Top.random,
clothes: clothes ?? Clothes.random,
eyes: eyes ?? Eyes.random,
eyebrow: eyebrow ?? Eyebrow.random,
mouth: mouth ?? Mouth.random,
skin: skin ?? Skin.random,
style: style ?? Style.random,
backgroundColor: backgroundColor ??
defaultBackgroundColors[Random().nextInt(
defaultBackgroundColors.length,
)],
);