app-starlock/lib/talk/starChart/handle/impl/debug_Info_model.dart

24 lines
701 B
Dart

import 'package:flutter/foundation.dart';
//ToDo: 增加对讲调试、正式可删除
class DebugInfoModel with ChangeNotifier {
int _recvDataRate = 0;
int _recvPacketCount = 0;
int _sendDataRate = 0;
int _sendPacketCount = 0;
int get recvDataRate => _recvDataRate;
int get recvPacketCount => _recvPacketCount;
int get sendDataRate => _sendDataRate;
int get sendPacketCount => _sendPacketCount;
void updateDebugInfo(int recvDataRate, int recvPacketCount, int sendDataRate,
int sendPacketCount) {
_recvDataRate = recvDataRate;
_recvPacketCount = recvPacketCount;
_sendDataRate = sendDataRate;
_sendPacketCount = sendPacketCount;
notifyListeners();
}
}