Class EventChannel


  • public final class EventChannel
    extends Object
    A named channel for communicating with the Flutter application using asynchronous event streams.

    Incoming requests for event stream setup are decoded from binary on receipt, and Java responses and events are encoded into binary before being transmitted back to Flutter. The MethodCodec used must be compatible with the one used by the Flutter application. This can be achieved by creating an EventChannel counterpart of this channel on the Dart side. The Java type of stream configuration arguments, events, and error details is Object, but only values supported by the specified MethodCodec can be used.

    The logical identity of the channel is given by its name. Identically named channels will interfere with each other's communication.