callOnceWhenReady<T> method
void
callOnceWhenReady<T>({
- required VoidCallback callback,
- required ValueListenable<
T> trigger, - required bool readyWhen(
- 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
// ignore: avoid_shadowing_type_parameters, false positive
void callOnceWhenReady<T>({
required VoidCallback callback,
required ValueListenable<T> trigger,
required bool Function(T triggerValue) readyWhen,
}) {
_delegate.callOnceWhenReady(
callback: callback,
trigger: trigger,
readyWhen: readyWhen,
);
}