ShareButtonsComponentOptions class

Configuration options for the ShareButtonsComponent widget.

Defines meeting details for generating share URLs and allows custom share button configurations to replace or supplement default buttons.

Properties:

  • meetingID: The meeting/event ID to share (required)
  • eventType: Type of event (chat, broadcast, conference, webinar) - affects URL generation (required)
  • customButtons: Optional custom share buttons (if provided, replaces default buttons)
  • localLink: Optional custom domain for share URLs (e.g., "https://mycorp.com"). If null, uses mediasfu.com

Share URL Generation Logic:

if (localLink provided && !contains('mediasfu.com')) {
  URL = "{localLink}/meeting/{meetingID}"
} else {
  if (eventType == chat) prefix = 'chat'
  else if (eventType == broadcast) prefix = 'broadcast'
  else prefix = 'meeting'
  URL = "https://{prefix}.mediasfu.com/{prefix}/{meetingID}"
}

Default Share Buttons (if customButtons not provided):

  1. Copy to clipboard (Icons.copy)
  2. Email (Icons.email)
  3. Facebook (Icons.facebook)
  4. WhatsApp (FontAwesomeIcons.whatsapp)
  5. Telegram (FontAwesomeIcons.telegram)

Common Configurations:

// 1. Default buttons with MediaSFU domain
ShareButtonsComponentOptions(
  meetingID: "ABC123",
  eventType: EventType.conference,
)
// Result URLs: https://meeting.mediasfu.com/meeting/ABC123

// 2. Custom domain
ShareButtonsComponentOptions(
  meetingID: "XYZ789",
  eventType: EventType.webinar,
  localLink: "https://meetings.mycorp.com",
)
// Result URLs: https://meetings.mycorp.com/meeting/XYZ789

// 3. Custom buttons only
ShareButtonsComponentOptions(
  meetingID: "123456",
  eventType: EventType.chat,
  customButtons: [
    ShareButtonOptions(
      icon: FontAwesomeIcons.twitter,
      action: () => shareToTwitter(),
    ),
    ShareButtonOptions(
      icon: FontAwesomeIcons.linkedin,
      action: () => shareToLinkedIn(),
    ),
  ],
)

Constructors

ShareButtonsComponentOptions({required String meetingID, required EventType eventType, List<ShareButtonOptions>? customButtons, String? localLink})

Properties

customButtons List<ShareButtonOptions>?
final
eventType EventType
final
hashCode int
The hash code for this object.
no setterinherited
final
meetingID String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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