This package is a fork of flutter_tawk package.
Tawk.to widget for Flutter.
To use this package, add flutter_tawk_to_chat
as dependency in your pubspec.yaml file.
import 'package:flutter_tawk_to_chat/flutter_tawk_to_chat.dart';
Tawk(
directChatLink: 'YOUR_DIRECT_CHAT_LINK',
visitor: TawkVisitor(
name: 'Username',
email: 'example@gmail.com',
),
)
See the example
directory for the complete sample app.
Parameter | Type | Default | Description | Required |
---|---|---|---|---|
directChatLink | String |
null |
Tawk direct chat link. | Yes |
visitor | TawkVisitor |
null |
Object used to set the visitor name and email. | No |
onLoad | Function |
null |
Called right after the widget is rendered. | No |
onLinkTap | Function |
null |
Called when a link pressed. | No |
placeholder | Widget |
Center(child: CircularProgressIndicator()) |
Render your own loading widget. | No |
Parameter | Type | Default | Description | Required |
---|---|---|---|---|
name | String |
null |
Visitor's name. | No |
String |
null |
Visitor's email. | No | |
hash | String |
null |
Secure mode. | No |
Method | Description |
---|---|
isChatOngoing() |
Checks if a chat is ongoing. Returns a Future<bool> . |
isVisitorEngaged() |
Checks if the visitor is engaged. Returns a Future<bool> . |
endChat() |
Ends the current chat session. |
canGoBack() |
Checks if the web view can navigate back. Returns a Future<bool> . |
goBack() |
Navigates back in the web view history. Returns a Future<void> . |