AvataaarFacialHair.random constructor
AvataaarFacialHair.random([
- Color? color
creates random AvataaarFacialHair
Implementation
factory AvataaarFacialHair.random([Color? color]) {
final e = AvataaarFacialHair.fromIndex(
_random.nextInt(AvataaarFacialHair.all.length));
if (color != null) {
return e.copyWith(color: color);
}
return e;
}