PageModelBuilder<TModel extends ViewModel> constructor
PageModelBuilder<TModel extends ViewModel> ({
- required TModel view,
- FutureOr<
void> onLoad()?, - required Widget loadingWidget,
- required Widget errorBuilder(
- BuildContext context,
- String? errorMessage
- required Widget builder(
- BuildContext context,
- TModel model,
- BaseEvent? previousEvent,
- BaseEvent? event,
- void listener()?,
- bool buildWhen()?,
Implementation
PageModelBuilder(
{required TModel view,
this.onLoad,
required this.loadingWidget,
required this.errorBuilder,
required Widget Function(BuildContext context, TModel model,
BaseEvent? previousEvent, BaseEvent? event)
builder,
void Function(BaseEvent? previous, BaseEvent? current)? listener,
bool Function(TModel model, BaseEvent? previous, BaseEvent? current)?
buildWhen})
: super(
builder: builder,
listener: listener,
model: view,
buildWhen: buildWhen);