getGenericAction method
Implementation
GenericAction getGenericAction(
Map<String, dynamic> map,
RawAdaptiveCardState state,
) {
final String stringType = map["type"] as String;
switch (stringType) {
case "Action.ShowCard":
// Only used by the root card; treat as an error here.
throw StateError(
"Action.ShowCard can only be used directly by the root card",
);
case "Action.OpenUrl":
return GenericActionOpenUrl(map, state);
case "Action.Submit":
return GenericSubmitAction(map, state);
case "Action.Execute":
case "Execute":
return GenericActionExecute(map, state);
default:
throw StateError("No action found with type $stringType");
}
}