sendEvent static method

Future<void> sendEvent(
  1. String name, {
  2. EventAction action = EventAction.custom,
  3. dynamic data,
})

Send an event name is the name of event that wants to send Possible option: SendEvent

Implementation

static Future<void> sendEvent(String name,
    {EventAction action: EventAction.custom, dynamic data}) async {
  if(!Platform.isAndroid) return;
  var arguments = {};
  arguments['name'] = name;
  arguments['action'] = action.toString();
  if (data != null) {
    arguments['data'] = data;
  }

  return await _channel.invokeMethod("Pushe.sendEvent", arguments);
}