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
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.
- signalr_flutter
Flutter plugin for ASP.NET SignalR client
49Compare - signalr_netcore
Flutter client for ASP.NET Core SignalR supporting WebSocket, SSE, LongPolling and MessagePack.
60Compare - vmodal_sdk_flutter
Typed VModal API client for Flutter to upload videos and search moments by meaning.
67Compare - tcp_tunnel
Minimalistic TCP tunnel library and CLI written in Dart
64Compare
Works with
Packages commonly used together with signalr_core: ones it builds on, ones built on it, and its own family.
- loggingsignalr_core depends on itProvides configurable logging with levels and stream listeners for Dart apps.
- web_socket_channelsignalr_core depends on itCross‑platform WebSocket channel wrapper for Dart
- equatablesignalr_core depends on itProvides value‑based equality for Dart objects without manual == and hashCode.
- tuplesignalr_core depends on itProvides immutable tuple classes for grouping values.
- sse_channelsignalr_core depends on itWraps Server‑Sent Events as a StreamChannel for Dart IO and web