AvataaarStyle.random constructor

AvataaarStyle.random([
  1. Color? color
])

creates random AvataaarStyle

Implementation

factory AvataaarStyle.random([Color? color]) {
  final e =
      AvataaarStyle.fromIndex(_random.nextInt(AvataaarStyle.all.length));

  if (color != null) {
    return e.copyWith(color: color);
  }
  return e;
}