title: Use SignalR on Flutter
body: <p>Im new to Flutter frameWork</p>
  <p>I want to use <strong>signalr</strong> on <strong>flutter</strong> to connect to a server and receive notification</p>
  <p>below code is how I do it on <strong>Java</strong>:</p>
  <pre><code>            Platform.loadPlatformComponent(new AndroidPlatformComponent());
  
              Credentials credentials = new Credentials() {
                  @Override
                   public void prepareRequest(Request request) {
                      request.addHeader(&quot;username&quot;, userId);
                  }
              };
              String serverUrl = &quot;http://www.xxxxx.org/&quot;;
              mHubConnection = new HubConnection(serverUrl);
              mHubConnection.setCredentials(credentials);
              String SERVER_HUB_CHAT = &quot;notificationHub&quot;;
              mHubProxy = mHubConnection.createHubProxy(SERVER_HUB_CHAT);
              ClientTransport clientTransport = new ServerSentEventsTransport(mHubConnection.getLogger());
              SignalRFuture&lt;Void&gt; signalRFuture = mHubConnection.start(clientTransport);
  
              try {
                  signalRFuture.get();
              } catch (Exception ex) {
                  UtilFunctions.showToastMessage(getApplicationContext(), ex);
                  return;
              }
  
              String SERVER_METHOD_SEND = &quot;SendNotifications&quot;;
              mHubProxy.invoke(SERVER_METHOD_SEND);
  
              mHubProxy.on(&quot;ReceiveNotification&quot;, new SubscriptionHandler1&lt;String&gt;() {
                  @Override
                  public void run(final String string) {
                     ......
                  }
              }, String.class);
  </code></pre>
  <p>But Im not able to implement on flutter</p>
  <p>Appreciate any help.</p>
  <p>Thanks in advance.</p>