WebSocketMessage.json constructor

WebSocketMessage.json(
  1. Map<String, dynamic> json, {
  2. DateTime? timestamp,
  3. String? id,
  4. bool requiresAck = false,
})

Creates a JSON message.

Implementation

WebSocketMessage.json(
  Map<String, dynamic> json, {
  DateTime? timestamp,
  String? id,
  bool requiresAck = false,
}) : this(
        data: json,
        type: 'json',
        timestamp: timestamp,
        id: id,
        requiresAck: requiresAck,
      );