FLUTTER
Flutter SDK
Use the Flutter wrapper around the native Android and iOS RTC SDKs for chat and one-to-one calls.
Before you start
Authenticate the user in your own backend, decide whether they may enter the room, and request a short-lived RTC token. The client receives that token and never receives the App Secret.
Install
This guide assumes access to the mobile SDK source package. Request the package and integration assistance before following these examples.
dependencies:
rtcexpress:
path: ../packages/mobile-flutter
# Use a published package version when one is available.Initialize and join a room
final rtc = RTCExpress();
await rtc.init(RTCInitOptions(
serverUrl: serverUrl,
appId: appId,
userId: userId,
token: token, // issued by your backend
));
await rtc.joinRoom("room-1");Production notes
Keep authorization on your serverNever use fetchToken with an App Secret in a shipped Flutter app. Call your own backend for the token.
Test two real devices, permission denial, network switching, background behavior, and reconnects. Record the call ID and UTC time for diagnostics.