2024-04-18 14:33:55 +00:00
|
|
|
class NetworkPackage {
|
|
|
|
String method;
|
|
|
|
String? message;
|
|
|
|
Map<String, dynamic>? payload;
|
|
|
|
|
|
|
|
NetworkPackage({
|
|
|
|
required this.method,
|
|
|
|
this.message,
|
|
|
|
this.payload,
|
|
|
|
});
|
|
|
|
|
|
|
|
factory NetworkPackage.fromJson(Map<String, dynamic> json) => NetworkPackage(
|
2024-05-01 16:49:38 +00:00
|
|
|
method: json['w'],
|
|
|
|
message: json['m'],
|
|
|
|
payload: json['p'],
|
2024-05-01 09:37:34 +00:00
|
|
|
);
|
2024-04-18 14:33:55 +00:00
|
|
|
|
|
|
|
Map<String, dynamic> toJson() => {
|
2024-05-01 16:49:38 +00:00
|
|
|
'w': method,
|
|
|
|
'm': message,
|
|
|
|
'p': payload,
|
2024-05-01 09:37:34 +00:00
|
|
|
};
|
|
|
|
}
|