Files
tuiche/lib/model/WebSocketMessage.dart
2025-04-28 15:37:58 +08:00

17 lines
418 B
Dart

import 'package:json_annotation/json_annotation.dart';
part 'WebSocketMessage.g.dart';
@JsonSerializable()
class WebSocketMessage {
String path;
int? type;
dynamic data;
WebSocketMessage({required this.path, this.type, this.data});
static WebSocketMessage fromJson(Map<String, dynamic> json) =>
_$WebSocketMessageFromJson(json);
Map<String, dynamic> toJson() => _$WebSocketMessageToJson(this);
}