0

我在颤振应用程序中使用 pub 包signalr_flutter并且我有SignalR(基于 .Net 框架构建),它在浏览器中运行良好。但是当我尝试从颤振连接 SignalR 时出现错误

no protocol: dev.mysignalr.com/signalr/negotiate?clientProtocol=1.3&connectionData=%5B%7B%22name%22%3A%22chathub%22%7D%5D

飞镖代码片段

// Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    signalR = SignalR('dev.mysignalr.com', "ChatHub",
        hubMethods: ["Send"],
        //headers: hed,
        statusChangeCallback: _onStatusChange,
        hubCallback: _onNewMessage);
  }
4

0 回答 0