EventSettingsModal class
EventSettingsModalOptions - Configuration options for EventSettingsModal.
Properties:
isVisible: Boolean indicating the modal's visibility.onClose: Callback to close the modal.onModifySettings: Callback for modifying the settings, withmodifySettingsas the default function.position: Position of the modal on the screen (default is 'topRight').backgroundColor: Background color of the modal (default isColor(0xFF83C0E9)).audioSetting,videoSetting,screenshareSetting,chatSetting: Initial settings for each media type.roomName: Name of the room or event.socket: Socket connection for sending settings updates.showAlert: Function to display alert messages.updateAudioSetting,updateVideoSetting,updateScreenshareSetting,updateChatSetting: Functions to update individual settings.updateIsSettingsModalVisible: Function to update the visibility of the modal.
Example Usage:
EventSettingsModal(
options: EventSettingsModalOptions(
isVisible: true,
onClose: () => print("Modal closed"),
audioSetting: 'allow',
videoSetting: 'approval',
screenshareSetting: 'disallow',
chatSetting: 'allow',
roomName: 'eventRoom',
socket: socket,
showAlert: (msg, type, duration) => print(msg),
updateAudioSetting: (val) => print("Audio setting: $val"),
updateVideoSetting: (val) => print("Video setting: $val"),
updateScreenshareSetting: (val) => print("Screenshare setting: $val"),
updateChatSetting: (val) => print("Chat setting: $val"),
updateIsSettingsModalVisible: (val) => print("Settings modal visible: $val"),
),
);
Event-settings modal controlling participant media permissions (host-only).
- Displays four dropdowns: "Participants Audio", "Participants Video", "Participants Screenshare", "Chat".
- Each dropdown offers three options: "Disallow" (blocked for all), "Allow" (enabled for all), "Approval" (requires host approval).
- Tracks local state (
audioState,videoState,screenshareState,chatState) initialized fromoptionsvalues; updates on dropdown change. - "Save" button invokes
onModifySettings(defaults tomodifySettings), which:- Validates at least one setting changed.
- Emits
updateMediaSettingssocket event with{roomName, audioSet, videoSet, screenshareSet, chatSet}. - Updates parent state via
updateAudioSetting,updateVideoSetting,updateScreenshareSetting,updateChatSetting. - Closes modal via
updateIsSettingsModalVisible(false).
- Positions via
getModalPositionusingoptions.position. - Offers six builder hooks (
wrapperBuilder,containerBuilder,headerBuilder,sectionBuilder,dropdownBuilder,buttonBuilder) pluscustomBuilderfor full replacement.
Override via MediasfuUICustomOverrides.eventSettingsModal to inject analytics
tracking, conditional permission rules, or custom validation logic.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- EventSettingsModal
Constructors
- EventSettingsModal({Key? key, required EventSettingsModalOptions options})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- options → EventSettingsModalOptions
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _EventSettingsModalState -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited