executeAction method
Implementation
void executeAction(String modelName, String action) {
LMAction lmAction = LMAction.fromJson({
"type": "execute-action",
"lucyAction": {
"modelName": modelName,
"action": action,
"params": fieldValues.map,
"dialogTitle": localizedText("Saving data..."),
"executionMsg": localizedText("Almost there..."),
"postExecution": {
"success": {
"msg": localizedText("Submitted Successfully"),
"goToHome": true,
"buttonTitle": localizedText("Back to Home")
},
"error": {
"msg": localizedText("Oops something went wrong"),
"goToHome": true,
"buttonTitle": localizedText("Back to Home")
},
}
}
});
lmAction.execute(context);
}