Skip to content
pubscout

signalr_core

1.1.2, released 3 years ago by jamiewest.dev

Client for ASP.NET Core SignalR, supports WebSocket and SSE across Dart platforms

WASM-ready
$ flutter pub add signalr_core
Source repository

What it does

Provides a Dart implementation of the SignalR protocol, enabling real‑time communication with ASP.NET Core servers. It handles connection negotiation, message sending, and receiving via WebSocket or SSE.

AI-written summary of version 1.1.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Implementing real‑time chat or live data feeds
  • Integrating with ASP.NET Core backends that use SignalR
  • Building cross‑platform apps needing server push

Skip it when

  • You only need simple HTTP requests
  • You prefer a higher‑level abstraction like gRPC or GraphQL

Strengths

  • Platform‑independent, works on mobile, web, and desktop
  • Null safety support since 1.1.0
  • Handles both WebSocket and SSE transports
  • Active maintenance with recent bug fixes

Weaknesses

  • Limited documentation beyond README
  • No advanced features like automatic reconnection strategies
  • Relies on external packages (http, web_socket_channel)

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
7
final connection = HubConnectionBuilder()
    .withUrl('http://localhost:5000/chatHub',
        HttpConnectionOptions(logging: (level, message) => print(message)))
    .build();

await connection.start();

connection.on('ReceiveMessage', (message) {
  print(message.toString());
});

await connection.invoke('SendMessage', args: ['Bob', 'Says hi!']);

Alternatives

Packages that do the same job and could replace signalr_core.

Works with

Packages commonly used together with signalr_core: ones it builds on, ones built on it, and its own family.