RenderRequestComponentOptions class
Configuration options for RenderRequestComponent.
Encapsulates individual request data and response handling for a single participant's permission request (microphone, video, screenshare, chat).
Properties:
request
(Request): Request object containing:id
: Unique request identifiername
: Participant name (e.g., "John Doe")icon
: FontAwesome icon name (e.g., "fa-microphone", "fa-video", "fa-desktop", "fa-comments")
onRequestItemPress
(RespondToRequestsType): Response handler function (defaults to respondToRequests)requestList
(List<Request>): Current list of all pending requests for state managementupdateRequestList
(Function(List<Request>)): Callback to update request list after accept/rejectroomName
(String): Room identifier for socket event targetingsocket
(io.Socket?): Socket.IO client instance for emitting "updateRequests" events
Socket Events Emitted (via respondToRequests):
- "updateRequests": Sends accepted/rejected response to server
socket.emit('updateRequests', { 'action': 'accepted', // or 'rejected' 'requestId': request.id, 'roomName': roomName, });
Example:
RenderRequestComponentOptions(
request: Request(
id: 'req123',
name: 'Alice Johnson',
icon: 'fa-microphone',
),
requestList: currentRequests,
updateRequestList: (newList) {
setState(() {
requestListState = newList;
});
},
roomName: parameters.roomName,
socket: parameters.socket,
onRequestItemPress: respondToRequests, // default handler
)
Constructors
-
RenderRequestComponentOptions.new({required Request request, RespondToRequestsType onRequestItemPress = respondToRequests, required List<
Request> requestList, required void updateRequestList(List<Request> ), required String roomName, Socket? socket})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- onRequestItemPress → RespondToRequestsType
-
final
- request → Request
-
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
→ void 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