AvataaarFacialHair.fromIndex constructor
creates AvataaarFacialHair based on the index found in AvataaarFacialHair.all
Implementation
factory AvataaarFacialHair.fromIndex(int index, [Color? color]) {
final e = AvataaarFacialHair.all.elementAt(index);
if (color != null) {
return e.copyWith(color: color);
}
return e;
}