disconnect method
Implementation
Future<NetworkPrintResult> disconnect({Duration? timeout}) async {
await _socket.flush();
await _socket.close();
_isConnected = false;
if (timeout != null) {
await Future.delayed(timeout, () => null);
}
return Future<NetworkPrintResult>.value(NetworkPrintResult.success);
}