executePageLoadAction method
void
executePageLoadAction(})
Executes a PageLoadFunction
Implementation
void executePageLoadAction(
BuildContext buildContext,
ListBloc bloc,
int page,
int pageSize,
List fullData,
Map? actionSpec,
Map state,
Map? actionContext,
{dynamic value}) {
if (actionSpec == null) {
return;
}
NodeSpec action = NodeSpec.fromMap(actionSpec);
final props = action.props;
final actionCtx = <dynamic, dynamic>{
"page": page,
"pageSize": pageSize,
}..addAll(actionContext ?? {});
final evaluatorContext = getEvaluatorContext(value, state, actionCtx);
properties.evaluateMap(props, evaluatorContext);
if (props["executeCondition"] != null &&
!properties.evaluateCondition(props["executeCondition"])) {
return;
}
final context =
ActionContext(state, actionContext ?? {}, value, buildContext);
final event =
LoadPageActionEvent(action, context, page, pageSize, fullData);
bloc.add(event);
}