How to use SignalR on Flutter?

霸气de小男生 提交于 2020-06-24 11:48:37

问题


Hi guys I'm trying to communicate with an Asp.Net core 2.1 application that uses SignalR to establish its chat communications, but I can't figure out what's the best way to accomplish that using flutter.

I've searched for some library to do that, but the one that I found was not compatible with Flutter, just with Dart web as it uses the original SignalR.js to wrap the methods.

Do you guys have any tips on how to accomplish that task ?


回答1:


I just created a Flutter client for SignalR (ASP.NET Core). You can find it at Pub




回答2:


If flutter plugins are not available for Signalr, you can always use native libraries available for signalr and use flutter's platform channels to use those native features in your flutter code.

Here are some helpful resource that might help

How to use signalr in Android?

https://github.com/Gurgen/SignalR-.net-core-android-client

Flutter platform channels



来源:https://stackoverflow.com/questions/50980262/how-to-use-signalr-on-flutter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!