Popup class

A messaging UI for just a single conversation.

There is no way for the user to switch between conversations (but you can change the active conversation through {@link Popup.select}). Create a Popup through {@link Session.createPopup} and then call {@link Popup.mount} to show it.

Annotations
  • @JS()
  • @anonymous

Constructors

factory

Properties

hashCode int
The hash code for this object.
no setterinherited
messageField MessageField
Encapsulates the message entry field tied to the currently selected conversation.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createHtmlPanel(HtmlPanelOptions options) → dynamic
HTML Panels allow you to place a HTML document in an iframe in your chats, just above the entry box.
destroy() → void
Destroys an inbox and removes all event listeners it has running. Call this before removing the inbox container from the DOM.
hide() → void
Closes the Popup, but doesn't remove it from the DOM
mount(HtmlElement? container) → dynamic
Mounts the Popup to the parent container
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
off(String eventType, Function handler) → void
on(String eventType, Function handler) → void
select(dynamic conversation) → void
Switches the active conversation the conversation.
setHighlightedWords(List<String> words) → void
The TalkJS search feature includes the ability to highlight certain words in messages. Call this method to highlight certain words without having the user invoke the search feature. Call again with an empty array to disable highlighting.
setMessageFilter(MessagePredicate filter) → void
Used to control which messages are shown in the message list, depending on a type, origin or custom message attributes.
setPresence(dynamic val) → void
Sets metadata for the current session.
setTranslationEnabledDefault(dynamic enabled) → void
Enable/disable translation by default. This setting is applied to any conversation for which you haven't set a specific value. @param enabled - Whether conversations should be translated by default or not. Pass "auto" to enable translation for conversations with users with different locales.
setTranslationEnabledForConversation(dynamic conversation, bool enabled) → void
Enable or disable translation for a conversation.
show() → void
Shows the Popup, previously hidden or mounted with a parameter show: false
toggleDesktopNotifications(bool isEnabled) → void
Please use {@link Session.setDesktopNotificationEnabled} instead.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited