close method
关闭连接
返回值 "status"
:
0: 关闭成功或已经处于关闭状态,关闭成功接口将收到 yaWebsocketDelegateOnClose
调用;
-1: 遇到问题, "info"
提供错误信息描述。
Implementation
Future<Map?> close() async {
final Map? info = await _methodChannel.invokeMethod('close');
// info: Map<String, String>
// Keys: status(-1/0), info?
return info;
}