untilWhen<U> method

Future<T> untilWhen<U>(
  1. U predicate
)

Waits until the reactive value equals a specific value.

Parameters:

  • predicate: The value to wait for

Returns: A Future that completes when the value equals predicate

Example:

final status = Signal('loading');
await status.untilWhen('ready'); // Waits until status is 'ready'

Implementation

Future<T> untilWhen<U>(U predicate) => until((value) => value == predicate);