MethodChannel constructor

const MethodChannel(String name, [ MethodCodec codec = const StandardMethodCodec(), BinaryMessenger binaryMessenger = defaultBinaryMessenger ])

Creates a MethodChannel with the specified name.

The codec used will be StandardMethodCodec, unless otherwise specified.

None of name, binaryMessenger, or codec may be null.

Implementation

const MethodChannel(this.name, [this.codec = const StandardMethodCodec(), this.binaryMessenger = defaultBinaryMessenger ])
  : assert(name != null),
    assert(binaryMessenger != null),
    assert(codec != null);