ApiAction.fromJson constructor

ApiAction.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ApiAction.fromJson(Map<String, dynamic> json) => ApiAction(
  type: ActionType.values.firstWhere(
    (ActionType e) => e.name == json["type"],
    orElse: () => ActionType.showToast,
  ),
  parameters: json["parameters"],
);