As described in the Riverpod docs, a Riverpod provider can watch other providers to make a "processing pipeline".
I have something like this:
final prov = Provider<String>((ref){
final w1 = ref.watch(prov1);
final w2 = ref.watch(prov2);
final w3 = ref.watch(prov3);
final w4 = ref.watch(prov4);
final complex = expensiveFunction(w1,w2,w3,w4);
return complex;
});
prov1
to prov4
can be modified individually by various bits of UI
But some UI actions cause some or all of them to change in quick succession.
How can I debounce calls to expensiveFunction()
until none of w1
..w4
have changed for say 2 secs?