WebSocketFrame.fromJson constructor

WebSocketFrame.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory WebSocketFrame.fromJson(Map<String, dynamic> json) {
  return WebSocketFrame(
    opcode: json['opcode'] as num,
    mask: json['mask'] as bool? ?? false,
    payloadData: json['payloadData'] as String,
  );
}