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, with modifySettings as the default function.
  • position: Position of the modal on the screen (default is 'topRight').
  • backgroundColor: Background color of the modal (default is Color(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"),
  ),
);

EventSettingsModal - A modal widget for configuring event-specific media settings.

This widget provides options to control participant permissions for audio, video, screenshare, and chat. The settings are saved and applied using the onModifySettings callback, which updates the settings on the server.

Parameters:

  • options (EventSettingsModalOptions): Configuration options for the modal.

Structure:

  • Header with title ("Event Settings") and close icon.
  • Dropdown selectors for each setting (audio, video, screenshare, and chat).
  • Save button to confirm and apply the settings.

Example Usage:

EventSettingsModal(
  options: EventSettingsModalOptions(
    isVisible: true,
    onClose: () => print("Modal closed"),
    audioSetting: 'allow',
    videoSetting: 'approval',
    screenshareSetting: 'disallow',
    chatSetting: 'allow',
    roomName: 'eventRoom',
    socket: socket,
  ),
);
Inheritance

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}) 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