signalr2 1.0.0-alpha1-final

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 74

signalr2

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

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-client-1.0.0-alpha1-final.min.js"></script>

A simple usage example:

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

Future<Null> main() async {
  var connection = new signalr.HubConnection('/chat');

  connection.on('send', (data) {
    print(data);
  });

  await connection.start();

  connection.invoke('send', 'Hello');
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

Changelog

1.0.0-alpha1-final

example/example.dart

import 'dart:async';
import '../lib/signalr2.dart' as signalr;

Future<Null> main() async {
  var connection = new signalr.HubConnection('/chat');

  connection.on('send', (data) {
    print(data);
  });

  await connection.start();

  connection.invoke('send', 'Hello');
}

1. Depend on it

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


dependencies:
  signalr2: "^1.0.0-alpha1-final"

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-alpha1-final Sep 15, 2017 Go to the documentation of signalr2 1.0.0-alpha1-final Download signalr2 1.0.0-alpha1-final archive

Analysis

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

  • Dart: 2.0.0-dev.49.0
  • pana: 0.10.6

Scores

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

Platforms

Detected platforms: web, other

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

Suggestions

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 2 errors 11 hints.

    Strong-mode analysis of lib/src/JsonHubProtocol.dart failed with the following error:

    line: 15 col: 3
    Invalid override. The type of 'JsonHubProtocol.parseMessages' ('(String) → List<HubMessage>') isn't a subtype of 'IHubProtocol.parseMessages' ('(dynamic) → List<HubMessage>').

    Strong-mode analysis of lib/src/MessagePackHubProtocol.dart failed with the following error:

    line: 16 col: 3
    Invalid override. The type of 'MessagePackHubProtocol.parseMessages' ('(ByteBuffer) → List<HubMessage>') isn't a subtype of 'IHubProtocol.parseMessages' ('(dynamic) → List<HubMessage>').

    Similar analysis of the following files failed:

    • lib/src/HubConnection.dart (hint)
    • lib/src/IHttpConnectionOptions.dart (hint)
    • lib/src/IHubConnectionOptions.dart (hint)
  • Package is pre-release.

    Pre-release versions should be used with caution, their API may change in breaking ways.

  • 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.

Dependencies

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