22 lines
460 B
Dart
22 lines
460 B
Dart
|
|
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;
|
|
}
|
|
} |