EventSettingsModalOptions class
Configuration for the event-settings modal controlling participant media permissions (host-only).
- audioSetting / videoSetting / screenshareSetting / chatSetting - Current permission strings:
'disallow'
(blocked for all),'allow'
(enabled for all),'approval'
(requires host approval). - onModifySettings - Override for
modifySettings
; receives {settings, socket, roomName, showAlert, updateAudioSetting, updateVideoSetting, updateScreenshareSetting, updateChatSetting}. Validates settings, emitsupdateMediaSettings
socket event, updates local state via update functions. - updateAudioSetting / updateVideoSetting / updateScreenshareSetting / updateChatSetting - Callbacks to persist new settings to parent state.
- updateIsSettingsModalVisible - Callback to close modal after save.
- roomName - Session identifier for socket event.
- socket - Socket.IO client for emitting
updateMediaSettings
event. - showAlert - Optional
ShowAlert
callback for validation messages. - position - Modal placement via
getModalPosition
(e.g., 'topRight'). - backgroundColor - Background color for modal container.
- customBuilder - Replace entire modal widget tree; receives
EventSettingsModalOptions
. - wrapperBuilder / containerBuilder / headerBuilder / sectionBuilder / dropdownBuilder / buttonBuilder - Builder hooks for granular customization.
- containerPadding / containerMargin / containerAlignment / containerDecoration - Fine-tune modal container styling.
- titleTextStyle / labelTextStyle - Typography overrides for title and section labels.
- saveButtonStyle / saveButtonChild - Customize save button appearance.
Usage
- Modal displays four dropdowns: "Participants Audio" (
audioSetting
), "Participants Video" (videoSetting
), "Participants Screenshare" (screenshareSetting
), "Chat" (chatSetting
). - Each dropdown offers three options: "Disallow", "Allow", "Approval".
- "Save" button invokes
onModifySettings
, which validates settings, emitsupdateMediaSettings
socket event with{roomName, audioSet, videoSet, screenshareSet, chatSet}
, then updates local state viaupdateAudioSetting
,updateVideoSetting
,updateScreenshareSetting
,updateChatSetting
. - Override via
MediasfuUICustomOverrides.eventSettingsModal
to inject analytics tracking, conditional permission rules, or custom validation logic.
Constructors
- EventSettingsModalOptions.new({required bool isVisible, required VoidCallback onClose, ModifySettingsType onModifySettings = modifySettings, String position = 'topRight', Color backgroundColor = const Color(0xFF83C0E9), required String audioSetting, required String videoSetting, required String chatSetting, required String roomName, Socket? socket, required ShowAlert? showAlert, required void updateAudioSetting(String), required void updateVideoSetting(String), required void updateChatSetting(String), required void updateIsSettingsModalVisible(bool), EventSettingsModalType? customBuilder, EdgeInsetsGeometry? containerPadding, EdgeInsetsGeometry? containerMargin, AlignmentGeometry? containerAlignment, BoxDecoration? containerDecoration, EventSettingsModalWrapperBuilder? wrapperBuilder, EventSettingsModalContainerBuilder? containerBuilder, EventSettingsModalHeaderBuilder? headerBuilder, EventSettingsModalSectionBuilder? sectionBuilder, EventSettingsModalDropdownBuilder? dropdownBuilder, EventSettingsModalButtonBuilder? buttonBuilder, TextStyle? titleTextStyle, TextStyle? labelTextStyle, ButtonStyle? saveButtonStyle, Widget? saveButtonChild})
Properties
- audioSetting → String
-
final
- backgroundColor → Color
-
final
-
final
- chatSetting → String
-
final
- containerAlignment → AlignmentGeometry?
-
final
- containerBuilder → EventSettingsModalContainerBuilder?
-
final
- containerDecoration → BoxDecoration?
-
final
- containerMargin → EdgeInsetsGeometry?
-
final
- containerPadding → EdgeInsetsGeometry?
-
final
- customBuilder → EventSettingsModalType?
-
final
- dropdownBuilder → EventSettingsModalDropdownBuilder?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerBuilder → EventSettingsModalHeaderBuilder?
-
final
- isVisible → bool
-
final
- labelTextStyle → TextStyle?
-
final
- onClose → VoidCallback
-
final
- onModifySettings → ModifySettingsType
-
final
- position → String
-
final
- roomName → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- saveButtonChild → Widget?
-
final
- saveButtonStyle → ButtonStyle?
-
final
-
final
- sectionBuilder → EventSettingsModalSectionBuilder?
-
final
- showAlert → ShowAlert?
-
final
- socket → Socket?
-
final
- titleTextStyle → TextStyle?
-
final
- updateAudioSetting → void Function(String)
-
final
- updateChatSetting → void Function(String)
-
final
- updateIsSettingsModalVisible → void Function(bool)
-
final
-
final
- updateVideoSetting → void Function(String)
-
final
- videoSetting → String
-
final
- wrapperBuilder → EventSettingsModalWrapperBuilder?
-
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