更新多个用户连接同一个设备的通知

This commit is contained in:
wyf
2025-07-15 10:59:41 +08:00
parent a8b0723714
commit 35cf04b580
6 changed files with 93 additions and 15 deletions

View File

@@ -7,8 +7,9 @@ class WebSocketMessage {
String path;
int? type;
dynamic data;
String? to;
WebSocketMessage({required this.path, this.type, this.data});
WebSocketMessage({required this.path, this.type, this.data, this.to});
static WebSocketMessage fromJson(Map<String, dynamic> json) =>
_$WebSocketMessageFromJson(json);

View File

@@ -11,6 +11,7 @@ WebSocketMessage _$WebSocketMessageFromJson(Map<String, dynamic> json) =>
path: json['path'] as String,
type: (json['type'] as num?)?.toInt(),
data: json['data'],
to: json['to'] as String?,
);
Map<String, dynamic> _$WebSocketMessageToJson(WebSocketMessage instance) =>
@@ -18,4 +19,5 @@ Map<String, dynamic> _$WebSocketMessageToJson(WebSocketMessage instance) =>
'path': instance.path,
'type': instance.type,
'data': instance.data,
'to': instance.to,
};