本文介绍了例外:不支持的操作:RawSocket构造函数(带有sqljocky5的Dart:^ 2.2.1)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将dart与MySQL数据库连接.我安装了MySQL工作台并创建了一个简单的数据库,修改了pubspec.yaml并添加了MySQL所需的任何其他依赖项.但是我一直在浏览器中产生异常.

I am trying to connect dart with a MySQL database. I installed the MySQL workbench and created a simple DB, have modified the pubspec.yaml and added any other dependencies I needed for MySQL. But I keep pulling up an exception in the browser.

推荐答案

代码似乎正在这样做:-

The code seems to be doing this :-

RawSocket.connect(主机,端口);

RawSocket.connect(host, port);

但是,RawSocket上没有连接方法,请参见这里

However there is no connect method on RawSocket, see here

在Dart 2.2中可能已更改,例如已添加了get/set RawOption方法

This may have changed in Dart 2.2, the get/set RawOption methods have been added for instance

这篇关于例外:不支持的操作:RawSocket构造函数(带有sqljocky5的Dart:^ 2.2.1)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 14:46