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