signalr2 1.0.0

  • Installing
  • Versions
  • 72


Incredibly simple real-time web for ASP.NET Core 2.1 This is an interop library for the @aspnet/signalr_client package. Find more Information at

Currently in sync with the release 1.0.0 from 2018-05-29.


Add a <script> tag to your index.html and point it to the current SignalR JavaScript file distributed with the current release of this library:

<script src="packages/signalr2/dist/signalr.min.js"></script>

A simple usage example:

import 'dart:async';
import 'dart:js';
import 'package:signalr2/signalr2.dart' as signalr;

Future<Null> main() async {
  var connection = new signalr.HubConnectionBuilder()

  connection.on('send', allowInterop((data) {

  await connection.start();

  new Timer.periodic(const Duration(seconds: 1), (r) {
    connection.send('send', 'Hi');

Features and bugs

Please file feature requests and bugs at the issue tracker.



  • Catching up with the current release


  • Catching up with the current release


Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  signalr2: "^1.0.0"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

      import 'package:signalr2/signalr2.dart';
Version Uploaded Documentation Archive
1.0.0 May 31, 2018 Go to the documentation of signalr2 1.0.0 Download signalr2 1.0.0 archive
1.0.0-preview2-final Apr 27, 2018 Go to the documentation of signalr2 1.0.0-preview2-final Download signalr2 1.0.0-preview2-final archive
1.0.0-alpha1-final Sep 15, 2017 Go to the documentation of signalr2 1.0.0-alpha1-final Download signalr2 1.0.0-alpha1-final archive


We analyzed this package on Jun 12, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.60.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
46 / 100
Code health derived from static analysis. [more]
98 / 100
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: web, other

Primary library: package:signalr2/signalr2.dart with components: js.


  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 16 hints.

    Strong-mode analysis of lib/src/HttpClient.dart gave the following hint:

    line: 6 col: 8
    Unused import: 'dart:typed_data'.

    Strong-mode analysis of lib/src/HttpConnection.dart gave the following hint:

    line: 8 col: 8
    Unused import: 'dart:typed_data'.

    Similar analysis of the following files failed:

    • lib/src/HubConnection.dart (hint)
    • lib/src/HubConnectionBuilder.dart (hint)
    • lib/src/IConnection.dart (hint)
    • lib/src/IHttpConnectionOptions.dart (hint)
    • lib/src/IHubProtocol.dart (hint)
    • lib/src/ITransport.dart (hint)
    • lib/src/LongPollingTransport.dart (hint)
    • lib/src/ServerSentEventsTransport.dart (hint)
    • lib/src/WebSocketTransport.dart (hint)
  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use signalr2.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0
func ^1.0.0 1.0.0
js ^0.6.1 0.6.1