A flutter plugin for .net SignalR client.


First of all, Initialize SignalR and connect to your server.

SignalR signalR = SignalR(
        '<Your server url here>',
        "<Your hub name here>",
        statusChangeCallback: (status) => print(status),
        hubCallback: (message) => print(message));

Here statusChangeCallback will get called whenever connection status with server changes.

hubCallback will receive calls from the server if you subscribe to any hub method. You can do that with,


There is a headers parameters also which takes a Map<String, String>.

You can also invoke any server method. Note: arguments list can have maximum number of five elements.

signalR.invokeMethod("<Your method name here>", arguments: ["argument1", "argument2"]);

If you are trying to connect with a HTTP url, then you need to add the following lines to the manifest of your android project.


This is because of the Network Security Config.

For more info check example.

Any issue or PR is always welcome.