SideEffects<T>.onWaiting constructor
SideEffects<T>.onWaiting (
- void onWaiting(), {
- void initState()?,
- void dispose()?,
Side effect to be called while waiting for the state to resolve
Implementation
factory SideEffects.onWaiting(
void Function() onWaiting, {
void Function()? initState,
void Function()? dispose,
}) {
return SideEffects(
initState: initState,
dispose: dispose,
onSetState: (snap) {
if (snap.isWaiting) {
onWaiting();
}
},
);
}