15 lines
309 B
Dart
15 lines
309 B
Dart
import 'dart:convert';
|
|
|
|
import 'package:marianum_mobile/dataOld/socketConnection.dart';
|
|
|
|
|
|
class OutgoingPacket {
|
|
final String command;
|
|
final dynamic data;
|
|
|
|
OutgoingPacket({required this.command, required this.data});
|
|
|
|
void send() {
|
|
SocketConnection.write.add("$command:${jsonEncode(data)}");
|
|
}
|
|
} |