next method

void next()

Implementation

void next() {
  final scope = _active;
  if (scope.order.isEmpty) return;
  final idx =
      scope.current == null ? -1 : scope.order.indexOf(scope.current!);
  final nextIdx = (idx + 1) % scope.order.length;
  scope.current = scope.order[nextIdx];
}