14

I am 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.

How to accomplish that task?

peterh
  • 11,875
  • 18
  • 85
  • 108
Diego Garcia
  • 1,134
  • 1
  • 12
  • 25
  • I'm not sure about Flutter, specifically, but you should keep in mind that SignalR is just a library for working with web sockets. It comes with both server-side and client-side components/libraries, but that doesn't mean you have to use them in tandem. In other words, you can set up all your SignalR hubs server-side, and theoretically, any library that supports working with web sockets that's compatible with Flutter should be able to utilize those. – Chris Pratt Jun 22 '18 at 13:15
  • Hi @ChrisPratt, I`ve seen that but the thing is that you need to know the messages and hub characteristics used by signalr to interact using websockets, as its has a lote of things happening instead of only the websocket part, it has negotiation, authorization and et all. – Diego Garcia Jun 22 '18 at 19:06

2 Answers2

21

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

Soernt
  • 338
  • 2
  • 10
6

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

Ganapat
  • 6,984
  • 3
  • 24
  • 38