EventChannel constructor

const EventChannel(String name, [ MethodCodec codec = const StandardMethodCodec() ])

Creates an EventChannel with the specified name.

The codec used will be StandardMethodCodec, unless otherwise specified.

Neither name nor codec may be null.

Implementation

const EventChannel(this.name, [this.codec = const StandardMethodCodec()]);