CoreAction constructor
CoreAction(
- Map map
Constructor of CoreAction
Implementation
CoreAction(Map map) {
map.forEach((key, value) {
switch (key) {
case _DESTROY:
destroy = value.toString() == "true";
break;
case _TOPICS:
topics = json.decode(value.toString());
break;
case _TYPE:
type = getType(value.toString());
break;
case TYPE_APP:
app = value.toString();
break;
case TYPE_URL:
url = value.toString();
break;
case TYPE_CALL:
call = value.toString();
break;
case TYPE_MARKET:
market = value.toString();
break;
case TYPE_SHARE:
share = value.toString();
break;
case TYPE_NO_ACTION:
noAction = value.toString();
break;
case TYPE_WALLET:
wallet = value.toString();
break;
case TYPE_WEBVIEW:
webview = value.toString();
break;
case CLICKED_BUTTON:
if (value is int) {
clickedButton = value;
} else {
clickedButton = int.parse(value.toString());
}
}
});
}