when<W extends Widget> method
Implementation
Widget when<W extends Widget>({
required W Function() loading,
required W Function(Object) error,
required W Function() orElse,
}) {
if (isLoading.value) {
return loading();
}
if (this.error.value != null) {
return error(this.error.value!);
}
return orElse();
}