utd_audio_room_kit library

Classes

RoomSeatState
Full seat state from the backend _seats namespace.
SeatState
Represents the state of a single seat in the audio room.
SpeakerRequest
Represents a pending speaker request.
UTDApiClient
HTTP client for the UTD Stream Engine API.
UTDAudioRoom
UTDAudioRoomConfig
UTDBanApi
REST API client for the UTD Stream Engine user-ban endpoints.
UTDBanListPage
One page of the paginated bans list.
UTDBanManagementSheet
Default host/admin view of the project's active bans, with an unban action.
UTDBannedUser
A single active ban row from GET /api/v1/rooms/bans.
UTDBanNotice
A ban notice delivered to the local (banned) user.
UTDBanUserAttributes
Attributes snapshotted for a banned user (mirrors the participant attributes the client set: fr, frt, avatar, cn). All fields are optional — the whole object is null when the user was offline at ban time.
UTDChatController
UTDChatMessage
UTDCommentApi
REST API client for the UTD Stream Engine comment-lock endpoints.
UTDConnectErrorView
Default view shown when the room fails to connect and the consumer did not supply onConnectError. Replaces the otherwise-infinite loader with a clear message and Retry / Exit actions.
UTDConstants
UTD Audio Room Kit constants.
UTDControlsBar
UTDDefaultAvatar
Default circular avatar for a seat occupant.
UTDDefaultControlsBar
The package's built-in role-aware controls bar (used when the consumer does not supply controlsBarWidget).
UTDDefaultRoomHeader
Built-in header shown when the host app does not supply its own config.headerWidget. It is intentionally minimal — a transparent bar with a top SafeArea holding just two affordances so a room is usable out of the box: a minimize button (left) and an exit button (right).
UTDInviteToSpeakSheet
Host/admin picker that lists audience members not currently on a seat and invites the chosen one to speak (optionally onto a specific seatIndex).
UTDMediaController
Controls mic, camera, and speaker state. Mic/camera/speaker controls.
UTDMemberListSheet
Default member list: every participant, with host/admin moderation actions (mute/unmute, remove from seat, invite, ban) and owner-only promote/demote.
UTDMemberRow
A single participant row used by the default member list / invite sheets: avatar + name + optional role badge + trailing action widgets.
UTDMessageBatcher
UTDMessageInputSheet
UTDMessageRouter
UTDMinimizeConfig
UTDMinimizeController
UTDMinimizeData
UTDMiniOverlayMachine
UTDMiniOverlayPage
UTDMiniPopScope
UTDParticipant
Represents a participant in the audio room. Replaces UTDParticipant.
UTDPipController
Drives Android OS-level Picture-in-Picture for the audio room, alongside the in-app minimize overlay (UTDMinimizeController).
UTDPipView
Compact, view-only content rendered inside the Android system PiP window while UTDRoomController.pip reports isInPip == true.
UTDReconnectionHandler
UTDRequestQueueSheet
Default host/admin queue of pending speak requests, with approve / reject.
UTDRoleApi
REST API client for the UTD Stream Engine role endpoints.
UTDRoleChangeEvent
The realtime _role_change data message, broadcast to ALL participants whenever a role changes.
UTDRoleChangeResult
Result of PUT .../role{ identity, role, previous_role }.
UTDRoleListPage
One page of the paginated list-by-role response.
UTDRoleUser
A single participant row from GET .../participants/by-role.
UTDRoleUserAttributes
Attributes returned for a participant by list-by-role (mirrors the participant attributes the client set: fr, frt, avatar, cn). Fields are empty strings if the user is not currently connected.
UTDRoomController
UTDRoomMode
UTDRoomScope
Carries the room's theme, strings, controller and a few config flags down to the package's built-in default widgets via the element tree.
UTDRoomStrings
User-facing strings for the package's built-in default UI.
UTDRoomTheme
Color tokens for the package's built-in default UI (seats, controls bar, action sheets, dialogs, chat bubbles…).
UTDSeatActionSheet
The package's built-in default seat-tap handler. Used by UTDAudioRoom when the consumer does not supply onSeatTap. Offers, depending on seat state and the local user's role: take / switch / leave / step-down, and host moderation (mute, kick, lock/unlock, invite).
UTDSeatApi
REST API client for all seat management endpoints.
UTDSeatController
Manages seat state for the audio room.
UTDSeatGrid
UTDSeatLayout
Dev-tunable seat-grid layout knobs.
UTDSeatWidget
UTDSheetAction
A simple tappable row used inside the default sheets: leading icon + label, with an optional destructive color.
UTDSheetInlineError
A compact, in-context error banner for use INSIDE a modal sheet that stays open after a failed action (member list, request queue, ban list). A snackbar there renders behind the sheet, so these sheets surface failures inline instead. Pair with a String? state field that you set on failure and clear after a few seconds.
UTDSpeakerApi
REST API client for speaker request & invitation endpoints.
UTDSpeakingRing
Wraps child (a circular avatar) and, while active, paints a gently pulsing ring around it. When inactive it is a transparent pass-through, so it is cheap to keep mounted for every seat.
UTDSyncManager
UTDTokenApi
UTDTokenResponse
Response model returned by the UTD Stream Engine token generation API.
UTDTokenSeatParams
Seat-related generateToken parameters resolved from a layout mode — see UTDAudioRoom.resolveTokenSeatParams. All fields are null for non-host joins (the engine ignores seat parameters from non-owners).

Enums

UTDBanSource
Where a forced-exit notice originated — affects how much info is available and which message is shown. (Most are bans; signedInElsewhere is a single-active-session takeover, surfaced through the same exit funnel.)
UTDConnectionState
Connection state for the room.
UTDMiniOverlayState
UTDRole
The known engine roles, lowest → highest privilege.
UTDSeatAction
The actions a seat tap can offer, in display order. Pure data so the decision logic is unit-testable without a live room or any Flutter context.

Functions

resolveSeatActions({required SeatState seat, required bool isHostOrAdmin, required bool isHost, required String? me, required int localSeatIndex, required int hostSeatIndex}) List<UTDSeatAction>
Computes the ordered list of actions to offer when seat is tapped.
showUTDRoomSheet<T>(BuildContext context, {required WidgetBuilder builder}) Future<T?>
Shows a themed modal bottom sheet for the package's built-in default UI.
utdRoleFromString(String? value) UTDRole?
Parses a wire role string to a UTDRole; returns null if unknown.
utdRoleToString(UTDRole role) String
Serializes a UTDRole to its wire string (e.g. UTDRole.admin'admin').
utdShowSnack(BuildContext context, String message) → void
Shows a brief snackbar using the nearest ScaffoldMessenger. Safe no-op if the context is no longer mounted or has no messenger.
utdShowSnackVia(ScaffoldMessengerState? messenger, String message) → void
Shows a snackbar via an already-captured ScaffoldMessengerState.

Typedefs

MessageHandler = void Function(Map<String, dynamic> data, BuildContext context)
MiniOverlayBuilder = Widget Function({required VoidCallback onClose, required VoidCallback onRestore})
UTDBackgroundBuilder = Widget Function(BuildContext context)
UTDSeatContainerBuilder = Widget Function(List<SeatState> seats, Widget seatWidgetCreator(int seatIndex))

Exceptions / Errors

UTDBannedException
Thrown by token generation when the server returns 403 User is banned.
UTDRateLimitedException
Thrown on a 429 from the token endpoint — either the per-(project, identity, device) issuance rate limit, or the single-session takeover cooldown (a session is already active on another device and was claimed too recently to supersede). Callers should back off and retry, NOT hammer the endpoint.
UTDServiceNotAvailableException
Thrown on a non-ban 403 from the token endpoint — the project has NOT activated this service (e.g. Type 'audio_room' is not enabled for this project) in the dashboard. Distinct from UTDBannedException so the UI can say "not available" (retrying can't help) instead of showing the ban flow.
UTDTokenException
Thrown when token generation fails for a non-ban reason (network/timeout, engine 5xx, malformed body). Carries the HTTP statusCode when available so callers can tell a transport failure apart from an engine error.