SiteConfig class
Site settings the widget and SDK render from.
- Annotations
Constructors
-
SiteConfig({required String siteId, required String name, String color = '#0ea5e9', String position = 'right', String localeDefault = 'auto', Map<
String, String> greeting = const {}, Map<String, String> awayMessage = const {}, OfflineCapture offlineCapture = OfflineCapture.off, bool hideWhenOffline = false, SiteTheme theme = SiteTheme.auto, bool botEnabled = false, List<AgentAvatar> agentAvatars = const [], LauncherConfig launcher = const LauncherConfig(), HeaderConfig? header, GreetingOptions? greetingOptions, List<ContactButton> contactButtons = const [], Json raw = const {}}) -
Creates a site config.
const
- SiteConfig.fromJson(Json j)
-
Parses the wire shape, keeping unknown fields in raw.
factory
Properties
-
agentAvatars
→ List<
AgentAvatar> -
Online team members for the header (name and avatar).
final
-
awayMessage
→ Map<
String, String> -
Away message per locale, shown while nobody is online.
final
- botEnabled → bool
-
The AI assistant answers first.
final
- color → String
-
Accent colour as
#rrggbb.final -
contactButtons
→ List<
ContactButton> -
Other ways to reach the business, in display order (older gateways:
empty).
final
-
greeting
→ Map<
String, String> -
Greeting per locale, shown when the conversation is empty.
final
- greetingOptions → GreetingOptions?
-
How the greeting is shown (older gateways: null, always shown).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → HeaderConfig?
-
Header subtitle, logo and profile (older gateways: null, the agents'
avatars and no subtitle).
final
- hideWhenOffline → bool
-
Hide the launcher while offline (web).
final
- launcher → LauncherConfig
-
How the launcher button looks (older gateways: the default chat bubble).
final
- localeDefault → String
-
vi,enorauto.final - name → String
-
Site (business) name shown in the header.
final
- offlineCapture → OfflineCapture
-
Pre-chat form policy.
final
- position → String
-
Launcher position on the web (
left/right).final - raw → Json
-
The full wire payload (campaigns, social proof, ...).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- siteId → String
-
Site id.
final
- theme → SiteTheme
-
Preferred colour scheme.
final
Methods
-
awayMessageFor(
HatangLocale locale) → String? -
Away message for
locale, falling back to the other language. -
greetingFor(
HatangLocale locale) → String? -
Greeting for
locale, falling back to the other language. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Json - The wire shape.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited