RequestsModalOptions class

Configuration for the requests modal displaying participant requests (screenshare/video/audio).

  • requestList - Array of Request objects; each has id, name, icon (FontAwesome icon name like 'fa-microphone', 'fa-video', 'fa-desktop').
  • requestCounter - Count of pending requests; shown in modal header badge.
  • onRequestItemPress - Override for respondToRequests; receives {request, updateRequestList, requestList, action, roomName, socket}. action is 'accepted' (grant) or 'rejected' (deny); emits updateRequestAction socket event.
  • onRequestFilterChange - Callback when search input changes; filters requestList by participant name.
  • updateRequestList - Updates requestList in parent state after grant/deny.
  • roomName - Session identifier for socket event.
  • socket - Socket.IO client for emitting updateRequestAction event.
  • position - Modal placement via getModalPosition (e.g., 'topRight').
  • backgroundColor - Background color for modal container.
  • renderRequestComponent - Custom renderer for individual request items; receives RenderRequestComponentOptions with request, onRequestItemPress, requestList, updateRequestList, roomName, socket. Defaults to RenderRequestComponent widget.
  • parameters - Must expose getUpdatedAllParams.

Compatible with ModernRequestsModalOptions from the modern component.

Usage

  1. Modal displays header with "Requests" title and counter badge.
  2. Search input filters requestList by participant name.
  3. Each request row shows name, icon (microphone/video/screenshare), and "Accept" (green) / "Reject" (red) buttons.
  4. "Accept" button calls onRequestItemPress with action: 'accepted', emitting updateRequestAction socket event with {requestId, action: 'accepted', roomName}.
  5. "Reject" button calls onRequestItemPress with action: 'rejected', emitting updateRequestAction event with action: 'rejected'.
  6. After grant/deny, updateRequestList removes request from queue.
  7. Override via MediasfuUICustomOverrides.requestsModal to inject custom approval workflows, analytics tracking, or automated policies.

Constructors

RequestsModalOptions({required bool isRequestsModalVisible, required VoidCallback onRequestClose, required int requestCounter, required dynamic onRequestFilterChange(String), required List<Request> requestList, RespondToRequestsType onRequestItemPress = respondToRequests, required dynamic updateRequestList(List<Request>), required String roomName, Socket? socket, Color backgroundColor = const Color(0xFF83C0E9), String position = 'topRight', required RequestsModalParameters parameters, RenderRequestComponentType renderRequestComponent = _defaultRenderRequestComponent, bool isDarkMode = false, bool enableGlassmorphism = false, ModalRenderMode renderMode = ModalRenderMode.modal})

Properties

backgroundColor Color
final
enableGlassmorphism bool
Enable glassmorphism effects for modern styling. Note: Pending modern implementation - placeholder for future glassmorphic UI.
final
hashCode int
The hash code for this object.
no setterinherited
isDarkMode bool
Dark mode toggle for modern styling. Note: Pending modern implementation - placeholder for future glassmorphic UI.
final
isRequestsModalVisible bool
final
onRequestClose VoidCallback
final
onRequestFilterChange → dynamic Function(String)
final
onRequestItemPress RespondToRequestsType
getter/setter pair
parameters RequestsModalParameters
final
position String
final
renderMode ModalRenderMode
Render mode for embedding in different contexts.
final
renderRequestComponent RenderRequestComponentType
getter/setter pair
requestCounter int
final
requestList List<Request>
final
roomName String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
socket → Socket?
final
updateRequestList → dynamic Function(List<Request>)
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited