when<R> method
R
when<R>({
- required R onLoading(
- L? loading
- required R onError(
- dynamic error
- required R onData(
- V data
Implementation
R when<R>(
{required R Function(L? loading) onLoading,
required R Function(dynamic error) onError,
required R Function(V data) onData}) =>
this.isData
? onData((this as _DataBitState).data)
: (this.isError
? onError((this as _ErrorBitState).e)
: onLoading((this as _LoadingBitState).loading));