close method
Closes the web socket connection.
Implementation
Future<void> close() async {
await _channel.invokeMethod<String>(_METHOD_CHANNEL_DISCONNECT);
_eventsMessage = null;
if (_onMessageSubscription != null) {
_onMessageSubscription?.cancel();
_onMessageSubscription = null;
}
// _eventsClose = null;
// if (_onCloseSubscription != null) {
// _onCloseSubscription.cancel();
// _onCloseSubscription = null;
// }
}