runFunction method
Implementation
Future<dynamic> runFunction(BuildContext context, ActionEntity action) async {
try {
final controller =
getVariable(context.pageState, action as PageViewControllerAction);
if (action is PageViewControllerNextPage) {
return nextPage(controller);
} else if (action is CMSUpdateAction) {
return previousPage(controller);
}
} catch (e) {
context.read<AppLogsCubit>().onNewLog(
EditorLogEntity(
id: _uuid.v1(),
content: e.toString(),
createdAt: DateTime.now(),
),
);
}
return;
}