Implement Webuntis HTTP Api and Display
This commit is contained in:
22
lib/dataOld/incommingPackets/errorPacket.dart
Normal file
22
lib/dataOld/incommingPackets/errorPacket.dart
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
import '../incomingPacket.dart';
|
||||
|
||||
class ErrorPacket extends IncomingPacket {
|
||||
ErrorPacket() : super("error", useJsonDecode: false);
|
||||
|
||||
bool _errorDismissed = true;
|
||||
bool get errorDismissed => _errorDismissed;
|
||||
set errorDismissed(bool value) {
|
||||
_errorDismissed = value;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
String _errorText = "";
|
||||
String get errorText => _errorText;
|
||||
|
||||
@override
|
||||
void handle(data) {
|
||||
_errorDismissed = false;
|
||||
_errorText = data;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user