SoundConfiguration constructor

const SoundConfiguration({
  1. @Default.new(true) bool enabled,
  2. @Default.new(0.5) double volume,
  3. @Default.new(true) bool messageSent,
  4. @Default.new(true) bool messageReceived,
  5. @Default.new(false) bool chatOpened,
  6. @Default.new(false) bool chatClosed,
  7. @Default.new(true) bool error,
  8. @Default.new(false) bool buttonClick,
  9. @Default.new(true) bool notification,
  10. String? messageSentSoundUrl,
  11. String? messageReceivedSoundUrl,
  12. String? notificationSoundUrl,
  13. 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;