startChat static method
Open chat modal.
Optionally set theme color on iOS using primaryColor
If isPreChatFormEnabled
is true, the pre-chat form will be shown to the user.
If isAgentAvailabilityEnabled
is true, offline message will be shown to the
user in case no agent is available.
If isChatTranscriptPromptEnabled
is true, users are asked if they want to request a
chat transcript at the end of the chat.
If isOfflineFormEnabled
is true, the offline form will be shown to the user.
Implementation
static Future<void> startChat({
Color? primaryColor,
bool isPreChatFormEnabled = true,
bool isAgentAvailabilityEnabled = true,
bool isChatTranscriptPromptEnabled = true,
bool isOfflineFormEnabled = true,
}) async {
await _channel.invokeMethod<void>('startChat', {
'primaryColor': primaryColor?.value,
'isPreChatFormEnabled': isPreChatFormEnabled,
'isAgentAvailabilityEnabled': isAgentAvailabilityEnabled,
'isChatTranscriptPromptEnabled': isChatTranscriptPromptEnabled,
'isOfflineFormEnabled': isOfflineFormEnabled
});
}