Freshchat class

Constructors

Freshchat()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Static Properties

getFreshchatUserId Future<String>
Get the current user's identifier from Freshchat
no setter
getSdkVersion Future<String>
Get the current Freshchat flutter SDK version as well as the corresponding native SDK version (Android or iOS)
no setter
getUnreadCountAsync Future<Map>
Retrieve a count of unread messages across all unrestricted/public channels for the user asynchronously.
no setter
getUser Future<FreshchatUser>
Returns an instance of FreshchatUser object, pre-populated with current user information
no setter
getUserIdTokenStatus Future<JwtTokenStatus>
Get the status of the jwt id token
no setter
onFreshchatEvents Stream
Stream which sends the user events for Freshchat
no setter
onJwtRefresh Stream
Stream which triggers a callback on JWT token refresh
no setter
onLocaleChangedByWebView Stream
Stream which triggers a callback on locale change when in webview
no setter
onMessageCountUpdate Stream
Stream which triggers a callback for every unread message
no setter
onNotificationIntercept Stream
Stream which triggers a callback on clicking notification
no setter
Stream which sends any links opened by user within Freshchat
no setter
onRestoreIdGenerated Stream
Stream which triggers a callback if the restoreID is generated for the user
no setter
onUserInteraction Stream
Stream which triggers a callback on user interaction in SDK
no setter

Static Methods

getUnreadCountAsyncForTags(List<String> tags) Future<Map>
Retrieve a count of unread messages for channels with tags.
handlePushNotification(Map pushPayload) → void
Process the notification information and display a notification to the user as appropriate (Android)
identifyUser({required String externalId, String? restoreId}) → void
To identify an user in Freshchat with an unique identifier from your system and restore an user across devices/sessions/platforms based on an external identifier and restore id
init(String appId, String appKey, String domain, {bool responseExpectationEnabled = true, bool teamMemberInfoVisible = true, bool cameraCaptureEnabled = true, bool gallerySelectionEnabled = true, bool userEventsTrackingEnabled = true, String? stringsBundle, String? themeName, bool errorLogsEnabled = true, bool showNotificationBanneriOS = true, bool fileSelectionEnabled = true}) → void
Initialize Freshchat SDK with the necessary configuration
isFreshchatNotification(Map pushPayload) Future<bool>
Check if the notification received with the provided intent is a Freshchat notification or not (Android)
linkifyWithPattern(String regex, String defaultScheme) → void
Creates deep links in messages turning the matches into links based on the regex (Android)
notifyAppLocaleChange() → void
Notify any locale change that happens during runtime to Freshchat (Android)
Open Freshchat deeplinks.
resetUser() → void
Resets the user stored by Freshchat SDK
restoreUserWithIdToken(String token) → void
Restore an user base on reference_id present in the jwt token
sendMessage(String tag, String message) → void
Send a message on behalf of the user to a conversation channel tagged with the provided tag
setBotVariables(Map botVariables, Map specificVariables) → void
Set bot variables and bot specific variables with Freshchat
setNotificationConfig({Priority priority = Priority.PRIORITY_DEFAULT, Importance importance = Importance.IMPORTANCE_DEFAULT, bool notificationSoundEnabled = true, bool notificationInterceptionEnabled = false, String? largeIcon, String? smallIcon}) → void
Accepts Notification configurations allowing you to configure all the notification related parameters (Android)
setPushRegistrationToken(String token) → void
Allows you to configure the FCM Registration token for the user (Android)
setUser(FreshchatUser user) → void
Sync any change to user information with Freshchat
setUserProperties(Map propertyMap) → void
Sync a series of user meta information with Freshchat
setUserWithIdToken(String token) → void
Sync any change to user information, specified in JWT Token with Freshchat
showConversations({String? filteredViewTitle, List<String>? tags}) → void
Displays list of Support Channels (Channel List Activity) through which users can converse with you
showFAQ({String? faqTitle, String? contactUsTitle, List<String>? faqTags, List<String>? contactUsTags, FaqFilterType? faqFilterType, bool showContactUsOnFaqScreens = true, bool showFaqCategoriesAsGrid = true, bool showContactUsOnAppBar = false, bool showContactUsOnFaqNotHelpful = true}) → void
Displays the FAQ Categories Page (Category List Activity) from where users can view and search FAQs
trackEvent(String eventName, {Map? properties}) → void
Track an user event with Freshchat