问题描述
我创建了一个应用程序并在模拟器和安卓手机上对其进行了测试,我使用的是基于 api 和 nodejs 的后端和 mongodb 数据库。当我在设备上测试它时它工作正常,但是当我在 chrome 上运行它时它向我发送这个错误。
错误:
Error: Unsupported operation: NetworkInterface.list
dioError [dioErrorType.response]: XMLHttpRequest error.
代码:
calltimeInApi() async {
dio dio=new dio();
var data={
'username': getname,'token': getaccesstoken,};
timeOutButtonpressed=true;
await dio
.post(localhostUrlTimeIn,data: json.encode(data))
.then((onResponse)async {
getapitimein=onResponse.data['TimeIn'];
}).catchError((onerror){
print(onerror.toString());
});
}
请帮助我做错的地方!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)