toAction static method

WidgetAction toAction(
  1. JSON? json
)

Implementation

static WidgetAction toAction(JSON? json) {
  if (json == null) {
    return WidgetAction();
  }

  var actionType = json["actionType"];
  if (actionType == null) {
    throw Exception("Empty action type field detected");
  }
  WidgetAction action = WidgetAction();
  action.setProperties(json);
  return action;
}