action_cable
1.3.0, released 2 years ago by an unverified publisher
ActionCable client port in dart for web, dartVM and flutter
What it does
Connects to Rails ActionCable websocket servers, handles subscriptions, and allows performing actions on channels. It supports web, dartVM, and Flutter platforms.
AI-written summary of version 1.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to connect a Flutter or Dart app to a Ruby on Rails ActionCable backend
- You require real-time websocket communication using the ActionCable protocol
Skip it when
- You are using a standard REST API without WebSockets
- Your backend uses a custom WebSocket protocol instead of Rails ActionCable
Strengths
- Native Dart port of the ActionCable protocol
- Supports web, dartVM, and Flutter
- Easy connection and channel subscription methods
Weaknesses
- Limited to the ActionCable protocol
- Minimal configuration documentation beyond basic usage
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Add web_socket_channel dependency and use ActionCable.connect with your websocket URL.
cable = ActionCable.connect(
"ws://10.0.2.2:3000/cable",
onConnected: () {
print("connected");
},
);Alternatives
Packages that do the same job and could replace action_cable.
Works with
Packages commonly used together with action_cable: ones it builds on, ones built on it, and its own family.