ConfirmExitModalOptions class

Configuration for the exit-confirmation modal enabling session termination or participant departure.

  • exitEventOnConfirm - Override for confirmExit; receives {socket, member, ban, roomName}. Emits disconnectUser socket event (participant) or endMeeting (host).
  • member - Current user's name; sent in socket event.
  • ban - Boolean flag; if true, socket event includes ban: true to prevent rejoin.
  • roomName - Session identifier for socket event.
  • socket - Socket.IO client for emitting exit command.
  • islevel - Privilege level; '2' = host (ending event for all), others = leaving session only.
  • position - Modal placement via getModalPosition (e.g., 'topRight').
  • backgroundColor - Background color for modal container.

Usage

  1. Modal displays warning text based on islevel: "Are you sure you want to exit the event?" (participant) or "Are you sure you want to end this event? (This will end it for all participants)" (host, islevel == '2').
  2. "Confirm" button calls exitEventOnConfirm, which emits disconnectUser (participant) or endMeeting (host) socket event with {member, ban, roomName}.
  3. "Cancel" button closes modal via onClose.
  4. Override via MediasfuUICustomOverrides.confirmExitModal to inject custom exit workflows, analytics tracking, or feedback prompts.

Constructors

ConfirmExitModalOptions.new({required bool isVisible, required VoidCallback onClose, String position = 'topRight', Color backgroundColor = const Color(0xFF83C0E9), ConfirmExitType exitEventOnConfirm = confirmExit, required String member, bool ban = false, required String roomName, Socket? socket, required String islevel})

Properties

backgroundColor → Color
final
ban → bool
final
exitEventOnConfirm → ConfirmExitType
final
hashCode → int
The hash code for this object.
no setterinherited
islevel → String
final
isVisible → bool
final
member → String
final
onClose → VoidCallback
final
position → String
final
roomName → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
socket → Socket?
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