loader method
Widget
loader(
- Widget builder(
- BuildContext context,
- JobCubitState<
T, F> jobState
- VoidCallback? runner,
- bool when(
- JobCubitState<
T, F> , - JobCubitState<
T, F>
- JobCubitState<
- WidgetBuilder? placeholder,
- bool provide = false,
- bool noRetryAppBar = false,
- void onSuccess(
- T
- VoidCallback? onFailure,
- VoidCallback? onRetry,
Implementation
Widget loader(
Widget Function(BuildContext context, JobCubitState<T, F> jobState)
builder, {
VoidCallback? runner,
bool Function(JobCubitState<T, F>, JobCubitState<T, F>)? when,
WidgetBuilder? placeholder,
bool provide = false,
bool noRetryAppBar = false,
void Function(T)? onSuccess,
VoidCallback? onFailure,
VoidCallback? onRetry,
}) {
return JobCubitLoader(
isSliver: false,
builder: builder,
fetcher: this.runner ?? runner ?? () {},
cubit: this,
when: when,
placeholder: placeholder,
provide: provide,
onSuccess: onSuccess,
onFailure: onFailure,
onRetry: onRetry,
noRetryAppBar: noRetryAppBar,
);
}