phoenix_wings 0.0.2 phoenix_wings: ^0.0.2 copied to clipboard
Phoenix Channel client for Dart
phoenix_wings.dart #
A Phoenix Channel implementation for Dart
Attempts to feature match the Javascript implementation found at phoenix.js
Usage #
import 'package:phoenix_wings/phoenix_wings.dart';
final socket = new PhoenixSocket("ws://localhost:4000/websocket/socket");
socket.connect();
final chatChannel = socket.channel("room:chat", {"id": "myId"});
chatChannel.on("user_entered", PhoenixMessageCallback (Map payload, String _ref, String, _joinRef) {
print(payload);
});
chatChannel.join();