Client library

Realtime Flutter with WebSockets

Flutter and Dart apps on iOS, Android and the web.

Sign in to see these snippets with your own cluster host. Sign in

Using an AI coding agent? Copy the agent prompt ↓

  1. Install

    flutter pub add dart_pusher_channels
  2. Subscribe to a channel

    final options = PusherChannelsOptions.fromHost(
      scheme: 'wss',
      host: 'ws.hibira.io',
      port: 443,
      key: 'YOUR_APP_KEY',
    );
    final client = PusherChannelsClient.websocket(
      options: options,
      connectionErrorHandler: (error, trace, refresh) => refresh(),
    );
    
    final channel = client.publicChannel('orders');
    channel.bind('order-shipped').listen((event) => print(event.data));
    client.onConnectionEstablished.listen((_) => channel.subscribeIfNotUnsubscribed());
    await client.connect();

Agent prompt

Paste this into Claude Code, Cursor, GitHub Copilot or another AI coding agent, and it will wire Hibira into your Flutter project with the settings above.

Replace YOUR_APP_KEY and the other placeholders with the values from your dashboard, or let the agent leave them as environment variables for you to fill in.

Or connect the Hibira MCP server, and your agent can create the app and fill in its credentials itself. Connect your AI coding agent →

Use the app key and secret from your dashboard. Channels, events and authorization endpoints work exactly as they do with Pusher. Library reference ↗