EventChannel constructor

EventChannel(
  1. Subscribe subscribe, {
  2. Buffer? buffer,
})

Creates an instance of an EventChannel

subscribe is used to subscribe to the underlying event source. The function must return an unsubscribe function to terminate the subscription. buffer is an optional Buffer object to buffer messages on this channel. If not provided, messages will not be buffered on this channel.

Implementation

EventChannel(Subscribe subscribe, {Buffer? buffer})
    : super(subscribe, buffer: buffer);