Implementation
@override
void registerActions() {
registerAction(
EditorAction.terminationAction, (_, __) => ActionResult(false),
abstract: true,
baseType: null,
properties: {
"validateForm": Types.bool,
"silent": Types.bool,
"confirmation": const EditorPropertyType("ConfirmMessage"),
"executeCondition": Types.condition
},
actions: {
"onFailure": EditorActionType.action()
});
registerAction(EditorAction.action, (_, __) => ActionResult(false),
abstract: true,
baseType: EditorAction.terminationAction,
properties: {"returnName": Types.string},
actions: {"nextAction": EditorActionType.action()});
registerSilentAction("Message", onMessage,
baseType: EditorAction.terminationAction,
properties: {
"type": const EditorPropertyListType(
["success", "warning", "error", "info"]),
"message": Types.string
});
registerSilentAction("Navigate", onNavigate,
baseType: EditorAction.terminationAction,
properties: {
"jumpToScreen": Types.screen,
"jumpToRoute": Types.string,
"replacePrevious": Types.bool,
"replaceAll": Types.bool,
"state": Types.json,
"transition": Types.routeTransitionBuilder,
"transitionDuration": Types.int
},
actions: {
"onPop": EditorActionType.action()
});
registerSilentAction("Pop", onPop,
baseType: EditorAction.terminationAction,
properties: {
"returnValue": Types.string,
"returnMessage": Types.string,
"returnMessageType": const EditorPropertyListType(
["success", "warning", "error", "info"])
});
registerSilentAction("ShowDialog", onShowDialog,
baseType: EditorAction.terminationAction,
properties: {
"jumpToScreen": Types.screen,
"jumpToRoute": Types.string,
"state": Types.json,
"barrierDismissible": Types.bool,
"barrierColor": Types.color,
"backgroundColor": Types.color,
"padding": Types.intArray,
"alignment": Types.alignment,
"elevation": Types.int,
"transition": Types.routeTransitionBuilder,
"transitionDuration": Types.int,
"returnName": Types.string,
},
actions: {
"onPop": EditorActionType.action()
});
registerSilentAction("BlocState", onBlocState, properties: {
"name": Types.string,
"type": const EditorPropertyListType(["local", "global"]),
"data": Types.json
});
registerSilentAction("SetState", onSetState,
properties: {"newState": Types.json, "reloadLists": Types.bool});
registerSilentAction("SetGlobalVar", onSetGlobalVar,
properties: {"key": Types.string, "value": Types.string});
registerSilentAction("If", onIf,
baseType: EditorAction.terminationAction,
properties: {
"condition": Types.condition
},
actions: {
"onTrue": EditorActionType.action(),
"onFalse": EditorActionType.action()
});
registerHttpAction("Request", onRequest,
properties: {"request": Types.request});
registerHttpAction("Rest", onRest, properties: {
"url": Types.string,
"path": Types.string,
"method": const EditorPropertyListType(
["get", "post", "put", "delete", "patch"]),
"queryArgs": Types.json,
"body": Types.json
});
registerAction("Reload", onReload);
registerAction("ReloadAll", onReloadAll);
registerAction("SetLanguage", onSetLanguage,
properties: {"language": Types.string});
// registerAction("LinkToAction", onLinkToAction, EditorAction(
// baseType: EditorAction.terminationAction,
// properties: {
// "action": const EditorPropertyType(EditorAction.action),
// },
// ));
registerAction(EditorAction.listAction, (_, __) => ActionResult(false),
abstract: true, baseType: null);
registerLoadPageAction("ListRequest", onLoadPageRequest, properties: {
"request": Types.request,
"arrayKey": Types.string,
"isPaged": Types.bool
});
registerLoadPageAction("ListRest", onLoadPageRest, properties: {
"url": Types.string,
"path": Types.string,
"method": const EditorPropertyListType(
["get", "post", "put", "delete", "patch"]),
"queryArgs": Types.json,
"body": Types.json,
"arrayKey": Types.string,
"isPaged": Types.bool
});
registerLoadPageAction("ListData", handleStaticData,
properties: {"data": Types.json, "shuffle": Types.bool});
registerAction("ReloadList", onReloadList,
baseType: EditorAction.action, properties: {"listId": Types.string});
}