EventMethod constructor

EventMethod({
  1. required String eventName,
  2. required Future<void> handler(
    1. dynamic payload
    ),
  3. EventPriority priority = EventPriority.normal,
  4. bool once = false,
})

Creates a new EventMethod instance.

The eventName and handler arguments are required. The priority argument defaults to EventPriority.normal. The once argument defaults to false.

Implementation

EventMethod({
  required this.eventName,
  required this.handler,
  this.priority = EventPriority.normal,
  this.once = false,
});