JavascriptChannel constructor
JavascriptChannel({
- required String name,
- required JavascriptMessageHandler onMessageReceived,
Constructs a Javascript channel.
The parameters name
and onMessageReceived
must not be null.
Implementation
JavascriptChannel({
required this.name,
required this.onMessageReceived,
}) : assert(name != null),
assert(onMessageReceived != null),
assert(_validChannelNames.hasMatch(name));