whenConnectionState<R> method
R
whenConnectionState<
R>({ - R onIdle()?,
- required R onWaiting()?,
- required R onError(
- dynamic error
)?,
- required R onData(
- T data
),
})
Implementation
@Deprecated('Use onAll instead')
// ignore: public_member_api_docs
R whenConnectionState<R>({
R Function()? onIdle,
required R Function()? onWaiting,
required R Function(dynamic error)? onError,
required R Function(T data) onData,
}) {
return onAll<R>(
onIdle: onIdle,
onWaiting: onWaiting,
onError: onError != null ? (_, __) => onError(_) : null,
onData: onData,
);
}