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