WebMessage constructor
WebMessage({
- dynamic data,
- WebMessageType type = WebMessageType.STRING,
- List<
IWebMessagePort> ? ports,
Implementation
WebMessage({this.data, this.type = WebMessageType.STRING, this.ports}) {
assert(((this.data == null || this.data is String) &&
this.type == WebMessageType.STRING) ||
(this.data != null &&
this.data is Uint8List &&
this.type == WebMessageType.ARRAY_BUFFER));
}