|
|
@ -54,8 +54,8 @@ class WebSocketUtil {
|
|
|
|
///关闭连接回调;
|
|
|
|
///关闭连接回调;
|
|
|
|
Function? onClosed;
|
|
|
|
Function? onClosed;
|
|
|
|
|
|
|
|
|
|
|
|
///屏蔽控制台输出
|
|
|
|
///控制台输出
|
|
|
|
bool _consolePrint = false;
|
|
|
|
bool _consolePrint = true;
|
|
|
|
|
|
|
|
|
|
|
|
///注册websocket
|
|
|
|
///注册websocket
|
|
|
|
void initWebSocket(
|
|
|
|
void initWebSocket(
|
|
|
@ -201,7 +201,7 @@ class WebSocketUtil {
|
|
|
|
|
|
|
|
|
|
|
|
//封装print
|
|
|
|
//封装print
|
|
|
|
void _dPrint(dynamic data) {
|
|
|
|
void _dPrint(dynamic data) {
|
|
|
|
if (!this._consolePrint) {
|
|
|
|
if (this._consolePrint) {
|
|
|
|
print(data);
|
|
|
|
print(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|