PageModelBuilder<TModel extends ViewModel> constructor

PageModelBuilder<TModel extends ViewModel>({
  1. required TModel view,
  2. FutureOr<void> onLoad()?,
  3. required Widget loadingWidget,
  4. required Widget errorBuilder(
    1. BuildContext context,
    2. String? errorMessage
    ),
  5. required Widget builder(
    1. BuildContext context,
    2. TModel model,
    3. BaseEvent? previousEvent,
    4. BaseEvent? event,
    ),
  6. void listener(
    1. BaseEvent? previous,
    2. BaseEvent? current
    )?,
  7. bool buildWhen(
    1. TModel model,
    2. BaseEvent? previous,
    3. BaseEvent? current
    )?,
})

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);