waitForNext method

Future<T> waitForNext({
  1. Duration timeout = const Duration(seconds: 1),
})

Waits for the next emission and returns it.

Does NOT return the current shard.state or any historical recorded state — only the next emission after this call. Throws ShardTimeoutError if no emission arrives within timeout.

Implementation

Future<T> waitForNext({Duration timeout = const Duration(seconds: 1)}) {
  return _waitForNextInternal(timeout);
}