gyanmeet_flutter_sdk 0.0.1
gyanmeet_flutter_sdk: ^0.0.1 copied to clipboard
Gyanmeet meeting SDK for Flutter — a self-contained LiveKit-based meeting widget, ported from the Gyanmeet React Native SDK.
gyanmeet_flutter_sdk #
A self-contained Flutter meeting widget for Gyanmeet, built on
LiveKit. This is a faithful port of the Gyanmeet React
Native SDK — same architecture, flow, features, and UI, adapted to Flutter
conventions (Provider + livekit_components instead of React contexts + hooks).
The consumer embeds a single widget. No API key ever lives in the client: the
consumer's backend mints a short-lived external-join token, and the SDK does the
validate-join round-trip itself.
Usage #
import 'package:gyanmeet_flutter_sdk/gyanmeet_flutter_sdk.dart';
GyanmeetMeeting(
backendUrl: 'https://api.gyanmeet.com/api', // REST base
token: externalJoinToken, // minted by YOUR backend
config: const GyanmeetConfig(
chatMode: ChatMode.open, // or hostModerated
videoMode: VideoMode.all, // or hostsOnly
showParticipantsTab: true,
showPreJoin: true,
initialAudio: true,
initialVideo: true,
enableAiMonitoring: true, // Enables on-device Face & Gaze detection
),
primaryColor: '#366D5A', // optional brand theming
onJoined: (meetingId, role) {},
onLeave: () {}, // local user left
onEnded: () {}, // host ended for everyone
onError: (error) {},
onFacePresenceChanged: (isPresent) {}, // emitted when face appears/disappears
onGazeViolation: (reason) {}, // emitted for looking away/up/down
)
enableChat / enablePolls are intentionally not config: chat is a server
meeting-setting the host toggles live in-meeting; polls are always available.
Features (parity with the RN SDK) #
- Join flow (
validate-join), LiveKit room lifecycle, optional PreJoin device check. - Video grid + pagination, debounced active-speaker pin, fullscreen tap.
- Mic / camera / screen-share toggles, hand raise.
- Host controls: mute / disable video & audio, promote/demote, remove, end meeting, live chat toggle.
- Chat (open + host-moderated), participants panel, polls (create/vote/results).
- Bandwidth pub/sub: selective subscription (visible page + speaker), always-on screen-share subscription, and publish-control (mutes upload when unviewed).
- Proctoring / AI Monitoring: Optional built-in ML Kit face detection (
google_mlkit_face_detection) emitting gaze and face presence events.
Architecture (RN → Flutter mapping) #
| React Native | Flutter |
|---|---|
@livekit/react-native hooks (useRoomContext, useParticipants, useChat) |
livekit_components RoomContext (a ChangeNotifier, via provider) |
livekit-client |
livekit_client |
| React Query (polling/mutations) | ChangeNotifier controllers with Timer.periodic (PollsController 10s, ParticipantRolesController 5s) |
axios apiClient |
dio ApiClient |
custom hooks (useSelectiveSubscription, usePublishControl, …) |
controllers in lib/src/state/ |
| NativeWind classes | Flutter widgets + ColorScheme.primary theming |
<VideoTrack> |
VideoTrackRenderer |
Platform setup #
LiveKit needs camera/mic permissions, and screen share needs extra native
plumbing (same requirements as any LiveKit app). The bundled example/ is
already configured.
Android #
AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
The MediaProjection foreground service is provided internally by
flutter_webrtc (bundled with livekit_client).
iOS #
Info.plist:
<key>NSCameraUsageDescription</key>
<string>Camera access for video meetings.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Microphone access for audio in meetings.</string>
Screen-share publishing on iOS additionally requires a ReplayKit Broadcast Upload Extension + an App Group (registered under your Apple Developer account), exactly as in the RN SDK. Screen-share viewing works without it. See the livekit_client iOS screen-share guide.
Not included (parity notes) #
- AI proctoring / exam mode — deferred in the RN SDK too.
- Device-offline banner uses LiveKit connection signals only (RN used the OS connectivity API); LiveKit's reconnecting state covers the common cases.