callOnceWhenReady<T> method

  1. @override
void callOnceWhenReady<T>({
  1. required VoidCallback callback,
  2. required ValueListenable<T> trigger,
  3. required bool readyWhen(
    1. T triggerValue
    ),
})
override

Runs callback when trigger's value satisfies the readyWhen function.

When calling callOnceWhenReady : - If trigger's value satisfies readyWhen, then the callback will be immediately triggered. - Otherwise, the callback will be triggered when trigger's value changes to equal readyWhen.

Any listeners set by callOnceWhenReady will auto dispose, or be removed after the callback is run.

Implementation

@override
void callOnceWhenReady<T>({
  required VoidCallback callback,
  required ValueListenable<T> trigger,
  required bool Function(T triggerValue) readyWhen,
}) {
  _delegate.callOnceWhenReady(
    callback: callback,
    trigger: trigger,
    readyWhen: readyWhen,
  );
}