randomPiece<T> function

T randomPiece<T>(
  1. List<T> pieces
)

Randomize part of the avataaar with a given list

Implementation

T randomPiece<T>(List<T> pieces) {
  final index = Random().nextInt(pieces.length - 1);
  return pieces[index];
}