Implement Webuntis HTTP Api and Display
This commit is contained in:
15
lib/dataOld/outgoingPacket.dart
Normal file
15
lib/dataOld/outgoingPacket.dart
Normal file
@ -0,0 +1,15 @@
|
||||
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)}");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user