TawkService class

A singleton service class for managing Tawk.to chat integration in a Flutter application. This service maintains a single WebView instance throughout the app lifecycle to preserve chat state when navigating between screens.

Constructors

TawkService()
factory

Properties

cookieManager ↔ CookieManager
Cookie manager for handling WebView cookies
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Disposes of the WebView resources and resets the initialization state.
getWebViewController() → InAppWebViewController?
Returns the current WebView controller for direct manipulation.
getWebViewWidget({Widget? placeholder}) Widget
Returns a WebView widget for embedding the Tawk.to chat UI.
initialize({required String directChatLink, TawkVisitor? visitor, int? maxChatCacheDuration, Function? onLoad, dynamic onLinkTap(String)?, dynamic onAgentMessage(String)?}) Future<void>
Initializes the Tawk.to chat service with the provided configuration.
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