signalr2 1.0.0-alpha1-final

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

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

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • tool failures on Feb 16, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

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

Platforms

Detected platforms: web, other

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

Suggestions

  • Fix lib/src/MessagePackHubProtocol.dart.

    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>').

  • Fix lib/src/JsonHubProtocol.dart.

    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>').

  • Fix issues reported by dartanalyzer.

    dartanalyzer reported 2 error(s) and 0 warning(s).

  • 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