socrits library

Socrits client SDK.

Real-time audio & video calls, call invitations (ring / accept / reject), in-app chat, whiteboard and video effects — built on LiveKit media.

Classes

ChatConversation
A chat conversation (1:1 or group) with its unread count.
ChatMessage
A chat message.
IncomingCall
An incoming call (a ring), delivered to Socrits.onIncomingCall.
Socrits
The Socrits client.
SocritsAvatars
Renders an avatar circle: a custom builder if given, else a network image from avatarUrl (falling back to the name's initial on error), else the initial on an accent gradient. Shared by the ring and in-call screens.
SocritsCallButton
A drop-in "call" button — tapping it starts a call via SocritsCallUI. The ZEGO ZegoSendCallInvitationButton equivalent.
SocritsCallConfig
One object that configures everything about the prebuilt call UI — theme, ringtone, avatars, overlays, which buttons show, and full-screen overrides. The Socrits equivalent of ZEGO's ZegoUIKitPrebuiltCallConfig.
SocritsCallKit
Offline call ringing for the Socrits UIKit tier.
SocritsCallText
Every user-visible string on the prebuilt ring + call screens, so you can translate or reword the UI without replacing it. Override only what you need:
SocritsCallTheme
Visual theme for the prebuilt ring + in-call screens.
SocritsCallUI
Zero-glue call orchestration for the Socrits UIKit — the ZEGO ZegoUIKitPrebuiltCallInvitationService equivalent.
SocritsCallView
Drop-in call UI — a modern WhatsApp/Telegram-style call screen.
SocritsRingRequest
Everything a custom SocritsRingBuilder needs to render and drive a ring.
SocritsRingScreen
Prebuilt incoming/outgoing call (ring) screen for the Socrits UIKit.
SocritsRingtone
What the ring sounds like while a call is ringing.
SocritsWhiteboard
A collaborative whiteboard rendered over a LiveKit lk.Room's data channel.
SocritsWhiteboardState
State for SocritsWhiteboard. Exposed so a parent can call clear via a GlobalKey<SocritsWhiteboardState>.

Enums

CallMode
A call's media type.
SocritsVideoFit
How the remote video fills the stage.
SocritsVideoQuality
Capture resolution for the local camera — trade quality for bandwidth.

Functions

applyBackgroundBlur(Room room) → Future<void>
Apply background blur to the local camera track in room.
clearVideoEffects(Room room) → Future<void>
Remove any AI video effect previously applied to room's camera track.

Typedefs

SocritsAvatarBuilder = Widget Function(BuildContext context, double size, String? userId, String? name)
Build a fully custom avatar. Return the widget to fill a size×size circle.
SocritsBackgroundBuilder = Widget Function(BuildContext context, bool isVideo)
Draw a custom background behind the call (branded art, a blurred image, a gradient…). isVideo lets you vary it between a video and a voice call. The avatar, name and controls are drawn on top. On an active video call the remote video covers it; it shows on the voice stage and while connecting.
SocritsCallBuilder = Widget Function(BuildContext context, Room room, VoidCallback onHangUp)
Replace the whole in-call screen. Call onHangUp when the user leaves.
SocritsDurationCallback = void Function(Duration elapsed)
Called every second with the live call duration — drive a billing meter, a countdown, a usage bar, an SLA timer, anything time-based.
SocritsOverlayBuilder = Widget Function(BuildContext context, Room room)
Build an overlay drawn on top of the in-call screen (e.g. a coin-balance banner, a timer, a report button). The ZEGO config.foreground equivalent.
SocritsRingBuilder = Widget Function(BuildContext context, SocritsRingRequest request)
Replace the whole ring screen with your own widget. You get everything the default screen uses via SocritsRingRequest.