🟒 LIVE β€’ Start building with ZenRTC today - Create your first project β†’
Official Flutter SDK

Secure realtime communication for Flutter.

Add one-to-one and group calling, scheduled meetings, WebRTC data channels, users, contacts, devices, notifications and ready-to-use UI to your application.

ZenRTC Flutter SDK #

Transform your Flutter application into a secure, production-ready communication platform with the official ZenRTC Flutter SDK. ZenRTC provides scalable calling and collaboration with built-in dashboards, meeting management, CRUD APIs, Cloudflare TURN/SFU integration and HMAC-secured APIs.

Security: Keep your API Secret on a trusted backend. Do not include a production secret in a public mobile or web build.

Features #

πŸ“ž

Calls & data

One-to-one and group audio/video calling with WebRTC data channels.

πŸ“…

Meetings

Scheduled meetings with authentication, invitations and management UI.

🌐

Media infrastructure

Built-in STUN, TURN and SFU, including Cloudflare adapters.

πŸ‘€

Identity & devices

User, contact and multi-device management with CRUD screens.

πŸ””

Notifications

Firebase push notification integration and backend callback support.

πŸ–₯️

Cross-platform

Flutter support for Android, iOS, Web, Windows and macOS.

Requirements #

FeatureRequirement
NotificationsFirebase Cloud Messaging, Callback API or Webhooks
TURN serverCloudflare account with Calls TURN enabled
SFUCloudflare account with Calls SFU enabled
SignalingZenRTC Signaling Server

Resources #

Get API credentials #

  1. Create a ZenRTC account.
  2. Create a project in the ZenRTC Console .
  3. Copy your Account ID , Project ID , API Key and API Secret .
  4. Initialize the SDK using your credentials.

Installation #

Add the package to your Flutter app, then fetch dependencies.

dependencies:
  zenrtc_sdk: ^1.0.0

flutter pub get

Example application #

The package includes a complete Flutter example with dashboard, calls, meetings, contacts, profile, helper APIs and CRUD operations.

Initialize signaling #

final navigatorKey = GlobalKey<NavigatorState>();

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await ZenRtcSocket.instance.ensureInitialized(
    accountId: "YOUR_ACCOUNT_ID",
    projectId: "YOUR_PROJECT_ID",
    apiKey: "YOUR_API_KEY",
    apiSecret: "YOUR_API_SECRET",
    testMode: true,
    navigatorKey: navigatorKey,
  );

  runApp(const DemoApp());
}

Wrap your application #

OverlaySupport.global(
  child: MaterialApp(
    navigatorKey: navigatorKey,
    builder: (_, child) => ZenRtcAppShell(child: child!),
    home: const HomeScreen(),
  ),
);

Connect a user #

await ZenRtcSocket.instance.setIdentity(
  UserIdentityModel(userId: "user_1", deviceId: "device_1"),
);
await ZenRtcSocket.instance.connect();

Helper functions #

ZenRTC includes navigation helpers for its built-in screens.

// Dashboard and calls
ZenRtcHelper.pushDashboardScreen(context: context);
ZenRtcHelper.pushPendingCallsScreen(context: context);

// Meetings and contacts
ZenRtcHelper.pushCreateMeetingsScreen(context: context);
ZenRtcHelper.pushMyMeetingsScreen(context: context);
ZenRtcHelper.pushCreateContactsScreen(context: context);
ZenRtcHelper.pushMyContactsScreen(context: context);

// Calling
ZenRtcHelper.pushOneToOneCallScreen(
  context: context,
  callType: CallSessionType.video,
  receiverUserId: "user_2",
);
ZenRtcHelper.pushGroupCallScreen(context: context);

Users #

Create and manage users with ZenRtcCrudClient . Each example below toggles between the Flutter SDK and its matching REST request.

Create user #

final crudClient = ZenRtcCrudClient(
  accountId: "...", projectId: "...", apiKey: "...",
  apiSecret: "...", testMode: false,
);

final response = await crudClient.createUser(
  userId: "user_1",
  displayName: "John Doe",
);
POST https://api.zenrtc.com/v1/users/create
Content-Type: application/json
x-signature: <HMAC_SHA256_SIGNATURE>

{
  "accountId": "YOUR_ACCOUNT_ID",
  "projectId": "YOUR_PROJECT_ID",
  "apiKey": "YOUR_API_KEY",
  "nonce": "ab12cd34ef",
  "timestamp": 1753170215000,
  "userId": "user_1",
  "displayName": "John Doe"
}

Create multiple users #

final response = await crudClient.createUsers([
  ZenRtcUser(userId: "user_1", displayName: "John"),
  ZenRtcUser(userId: "user_2", displayName: "Alice"),
]);
POST https://api.zenrtc.com/v1/users/bulk-create
x-signature: <HMAC_SHA256_SIGNATURE>

{ "users": [
  { "userId": "user_1", "displayName": "John" },
  { "userId": "user_2", "displayName": "Alice" }
] }

Update or delete user #

await crudClient.updateUser(
  userId: "user_1",
  displayName: "John Smith",
);
await crudClient.deleteUser(userId: "user_1");

Devices #

Default device: Every user has a default device ID of "default" . Use it for single-device applications.

Register device #

final response = await crudClient.createDevice(
  userId: "user_1",
  deviceId: "default",
  deviceName: "Pixel 9",
  firebaseToken: "...", // Optional
);
POST https://api.zenrtc.com/v1/devices/create
Content-Type: application/json
x-signature: <HMAC_SHA256_SIGNATURE>

{ "userId": "user_1", "deviceId": "default",
  "deviceName": "Pixel 9", "firebaseToken": "..." }

Update, read and delete #

await crudClient.updateDevice(
  userId: "user_1", deviceId: "default",
  deviceName: "Pixel 9 Pro", firebaseToken: "...",
);

final response = await crudClient.getDevices(userId: "user_1");
await crudClient.deleteDevice(userId: "user_1", deviceId: "default");
REST operationEndpoint
UpdatePOST /v1/devices/update
ReadPOST /v1/devices/read
DeletePOST /v1/devices/delete

Contacts #

Import or update multiple contacts for a user.

final response = await crudClient.createContacts(
  userId: "user_1",
  contacts: [
    ZenRtcContact(
      contactUserId: "user_2",
      displayName: "Alice",
      nickName: "Office",
      description: "Project Manager",
      emails: ["alice@example.com"],
      phones: ["+911234567890"],
    ),
  ],
);
POST https://api.zenrtc.com/v1/contacts/bulk-create
x-signature: <HMAC_SHA256_SIGNATURE>

{ "userId": "user_1", "contacts": [{
  "contactUserId": "user_2", "displayName": "Alice",
  "nickName": "Office", "description": "Project Manager",
  "emails": ["alice@example.com"], "phones": ["+911234567890"]
}] }

Media quality #

Set adaptive video and audio quality according to your product’s needs.

ZenRtcSocket.instance.mediaQualityModel =
    const MediaQualityModel(
      videoQuality: VideoQuality.p720,
      audioQuality: AudioQuality.hd,
    );
Video presetsAudio presets
auto , p360 , p480 , p720 , p1080 , p2k , p4kauto , voice , standard , hd , studio

Push notifications #

ZenRTC calls this callback when your backend must send a push notification.

ZenRtcSocket.instance.onPushNotificationRequired = (payload) {
  // Send push notification from your backend.
};

License #

MIT License β€” Copyright (c) 2026 ZenRTC.

Permission is granted, free of charge, to use, copy, modify, merge, publish, distribute, sublicense and/or sell copies of this software, subject to inclusion of the copyright and permission notice. The software is provided β€œAS IS”, without warranty of any kind.