waitForRxValue<T> static method

Future<void> waitForRxValue<T>(
  1. Rx<T> rx,
  2. T expectedValue, {
  3. Duration timeout = const Duration(seconds: 5),
})

Wait for a specific Rx value

Implementation

static Future<void> waitForRxValue<T>(
  Rx<T> rx,
  T expectedValue, {
  Duration timeout = const Duration(seconds: 5),
}) async {
  await waitForCondition(
    () => rx.value == expectedValue,
    timeout: timeout,
  );
}