flutter_reverb 0.0.1 copy "flutter_reverb: ^0.0.1" to clipboard
flutter_reverb: ^0.0.1 copied to clipboard

A WebSocket client implementation for Flutter applications with support for real-time communication.

example/lib/main.dart

void main() async {
  try {
    final client = ReverbClient(
        host: 'example.com',
        appKey: 'your-app-key',
        isSecured: true,
        authToken: 'optional-jwt-token');

    await client.connect();

    client.subscribe('channel-name', (data) {
      print('Received: $data');
    });

    // Send a message
    client.send('channel-name', 'custom-event', {'message': 'Hello!'});

    // Later, when done:
    client.disconnect();
  } catch (e) {
    print('Error: $e');
  }
}
2
likes
150
points
94
downloads

Publisher

verified publisherdana-sherzad.com

Weekly Downloads

A WebSocket client implementation for Flutter applications with support for real-time communication.

Documentation

API reference

License

MIT (license)

Dependencies

flutter, jwt_decoder, web_socket_channel

More

Packages that depend on flutter_reverb