Post an event of eventKind
with payload of eventData
to the Extension
event stream.
Source
void postEvent(String eventKind, Map eventData) {
if (eventKind is! String) {
throw new ArgumentError.value(eventKind,
'eventKind',
'Must be a String');
}
if (eventData is! Map) {
throw new ArgumentError.value(eventData,
'eventData',
'Must be a Map');
}
String eventDataAsString = JSON.encode(eventData);
_postEvent(eventKind, eventDataAsString);
}