ChannelCallback typedef Null safety

void ChannelCallback (
  1. ByteData? data,
  2. PlatformMessageResponseCallback callback

Signature for ChannelBuffers.setListener's callback argument.

The first argument is the data sent by the plugin.

The second argument is a closure that, when called, will send messages back to the plugin.

See also:


typedef ChannelCallback = void Function(ByteData? data, PlatformMessageResponseCallback callback);