尝试使用STOMP,websockets,在更新pubspec并使用所需的stomp / websocket详细信息后面临“包获取”的问题 . 我试过stomp,stompdart,websocket都没有奏效 . 运行“packages get”时观察到的错误是“当前的Dart SDK版本是2.1.0-dev.4.0.flutter-4eb879133a .
因为project_name依赖于stompdart> = 0.0.2,这需要SDK版本> = 1.5.0 <2.0.0,版本解决失败 . 酒吧升级失败(1)“
如果我尝试降级flutter版本,那么它会抛出异常,通知'当前项目需要SDK版本> 2.0.0
请帮助清除问题或建议其他方式,因为我在服务器端使用STOMP .
1 回答
有同样的问题,可以通过两种方式解决:
dependency_overrides:stomp:^ 0.7.3
依赖关系:
stomp:^ 0.7.3
扑:sdk:扑
使用dependency_overrides工作 .
其次,在项目目录中运行“pub upgrade”
https://github.com/rikulo/stomp/issues/18#issuecomment-435748215