freshchat 0.0.2 copy "freshchat: ^0.0.2" to clipboard
freshchat: ^0.0.2 copied to clipboard

outdated

A new flutter plugin project.

flutter_freshchat #

A copy of https://github.com/fayeed/flutter_freshchat I forked initially but our project needs to target lower versions of Android. This version has camera capture disabled which fits our needs.

Our IOS implementation was done in objective c instead of swift.

A Flutter plugin for integrating Freshchat in your mobile app.

Usage #

To use this plugin, add flutter_freshchat as a dependency in your pubspec.yaml file.

import 'package:flutter_freshchat/flutter_freshchat.dart';

Initialize the Freshchat app with appID and 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 FirstName and email

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

await FlutterFreshchat.showFAQs();

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.

await FlutterFreshchat.resetUser();

Example #

Find the example wiring in the Flutter_Freshchat example application.

API details #

See the flutter_freshchat.dart for more API details

Issues and feedback #

Please file issues to send feedback or report a bug. Thank you!

3
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A new flutter plugin project.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, meta

More

Packages that depend on freshchat