next method

AvataaarStyle next([
  1. Color? color
])

Implementation

AvataaarStyle next([Color? color]) {
  final i = toIndex();
  final nextI = (i + 1) >= all.length ? 0 : (i + 1);
  final e = AvataaarStyle.fromIndex(nextI);

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