SoundConfiguration constructor
const
SoundConfiguration({
- @Default.new(true) bool enabled,
- @Default.new(0.5) double volume,
- @Default.new(true) bool messageSent,
- @Default.new(true) bool messageReceived,
- @Default.new(false) bool chatOpened,
- @Default.new(false) bool chatClosed,
- @Default.new(true) bool error,
- @Default.new(false) bool buttonClick,
- @Default.new(true) bool notification,
- String? messageSentSoundUrl,
- String? messageReceivedSoundUrl,
- String? notificationSoundUrl,
- String? errorSoundUrl,
Implementation
const factory SoundConfiguration({
/// Master switch for all sounds. When false, no sounds play.
@Default(true) bool enabled,
/// Volume level from 0.0 (silent) to 1.0 (full volume).
@Default(0.5) double volume,
/// Play sound when user sends a message.
@Default(true) bool messageSent,
/// Play sound when bot responds with a message.
@Default(true) bool messageReceived,
/// Play sound when chat widget opens.
@Default(false) bool chatOpened,
/// Play sound when chat widget closes.
@Default(false) bool chatClosed,
/// Play sound when an error occurs.
@Default(true) bool error,
/// Play sound when clicking buttons in rich content.
@Default(false) bool buttonClick,
/// Play notification sound when message received and chat is minimized.
@Default(true) bool notification,
/// Custom URL for message sent sound (uses default if null).
String? messageSentSoundUrl,
/// Custom URL for message received sound (uses default if null).
String? messageReceivedSoundUrl,
/// Custom URL for notification sound (uses default if null).
String? notificationSoundUrl,
/// Custom URL for error sound (uses default if null).
String? errorSoundUrl,
}) = _SoundConfiguration;