onLinkToAction method

Future<ActionResult> onLinkToAction(
  1. NodeSpec action,
  2. ActionContext context
)

Implementation

Future<ActionResult> onLinkToAction(
    NodeSpec action, ActionContext context) async {
  final actionId = action.props["action"];
  if (actionId == null || actionId is! String || actionId.isEmpty) {
    return ActionResult(false);
  }

  return ActionResult(true, nextAction: Schema.getAction(actionId)?.toMap());
}