signalr2 1.0.4

  • Readme
  • Changelog
  • Installing
  • 64

signalr2 #

Incredibly simple real-time web for ASP.NET Core 2.1 This is an interop library for the @aspnet/signalr package. Find more Information at https://github.com/aspnet/SignalR

Currently in sync with the release 1.0.4 from 2018-10-17.

Usage #

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()
      .withUrl('/chat')
      .configureLogging(signalr.LogLevel.Information)
      .build();

  connection.on('send', allowInterop((data) {
    print(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.

Changelog #

1.0.2 #

  • Catching up with the current release (no changes to the code at all)

1.0.0 #

  • Catching up with the current release

1.0.0-preview2-final #

  • Catching up with the current release

1.0.0-alpha1-final #

Use this package as a library

1. Depend on it

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


dependencies:
  signalr2: ^1.0.4

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';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
35
Health:
Code health derived from static analysis. [more]
90
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
96
Overall:
Weighted score of the above. [more]
64
Learn more about scoring.

We analyzed this package on Dec 7, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.12.21

Platforms

Detected platforms: web, other

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

Health suggestions

Fix lib/src/AbortController.dart. (-0.50 points)

Analysis of lib/src/AbortController.dart reported 1 hint:

line 2 col 9: Name libraries using lowercase_with_underscores.

Fix lib/src/Errors.dart. (-0.50 points)

Analysis of lib/src/Errors.dart reported 1 hint:

line 2 col 9: Name libraries using lowercase_with_underscores.

Fix lib/src/HandshakeProtocol.dart. (-0.50 points)

Analysis of lib/src/HandshakeProtocol.dart reported 1 hint:

line 2 col 9: Name libraries using lowercase_with_underscores.

Fix additional 17 files with analysis or formatting issues. (-8.50 points)

Additional issues in the following files:

  • lib/src/HttpClient.dart (1 hint)
  • lib/src/HttpConnection.dart (1 hint)
  • lib/src/HubConnection.dart (1 hint)
  • lib/src/HubConnectionBuilder.dart (1 hint)
  • lib/src/IConnection.dart (1 hint)
  • lib/src/IHttpConnectionOptions.dart (1 hint)
  • lib/src/IHubProtocol.dart (1 hint)
  • lib/src/ILogger.dart (1 hint)
  • lib/src/ITransport.dart (1 hint)
  • lib/src/JsonHubProtocol.dart (1 hint)
  • lib/src/Loggers.dart (1 hint)
  • lib/src/LongPollingTransport.dart (1 hint)
  • lib/src/ServerSentEventsTransport.dart (1 hint)
  • lib/src/Stream.dart (1 hint)
  • lib/src/TextMessageFormat.dart (1 hint)
  • lib/src/Utils.dart (1 hint)
  • lib/src/WebSocketTransport.dart (1 hint)

Maintenance suggestions

Package is getting outdated. (-4.11 points)

The package was last published 54 weeks ago.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and signalr2.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
func2 ^2.0.0 2.0.1
js ^0.6.1+1 0.6.1+1