A Flutter plugin for integrating Freshchat in your mobile app. Supports android only atleast for now.
To use this plugin, add
flutter_freshchat as a dependency in your pubspec.yaml file.
Initialize the Freshchat app with
appKey which you could get from here: Where to find App ID and App Key
await FlutterFreshchat.init(appID: 'YOUR_APP_ID_HERE', appKey: 'YOUR_APP_KEY_HERE');
Update the user info by setting to values
await FlutterFreshchat.updateUserInfo(firstName: 'FIRST_NAME_HERE', email: 'EMAIL_HERE');
Identify the user user by usin email address or any way you uniquely identify the user.
externalID is required and returns a
restoreID you can save it and use to restore the chats
await FlutterFreshchat.identifyUser(externalID: 'USER_UNQIUE_ID', restoreID: 'USER_RESTORE_ID');
Show conversation opens a conversation screen and also list all the other conversation if a list obejct is supplied to it. You can also pass a title for teh chat screen.
await FlutterFreshchat.showConversations(tags: const , title: 'CHAT_SCREEN_TITLE');
ShowFAQs opens a FAQ screen in a grid like format as default you can change the default setting by changing this paramters.
showFaqCategoriesAsGrid = true
showContactUsOnAppBar = true
showContactUsOnFaqScreens = false
showContactUsOnFaqNotHelpful = false
Gets the unseen message count from freshchat you can use this to show a counter.
int count = await FlutterFreshchat.getUnreadMsgCount();
Reset user data at logout or when deemed appropriate based on user action in the app.
Find the example wiring in the Flutter_Freshchat example application.
See the flutter_freshchat.dart for more API details
Please file issues to send feedback or report a bug. Thank you!
Demonstrates how to use the flutter_freshchat plugin.
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Add this to your package's pubspec.yaml file:
dependencies: flutter_freshchat: ^0.0.3
You can install packages from the command line:
$ flutter packages get
Alternatively, your editor might support
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|0.0.3||Apr 16, 2019|
|0.0.2||Apr 16, 2019|
|0.0.1||Apr 16, 2019|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Apr 22, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
Document public APIs. (-1 points)
11 out of 11 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.
Package is pre-v0.1 release. (-10 points)
While nothing is inherently wrong with versions of
0.0.*, it might mean that the author is still experimenting with the general direction of the API.