Skip to content

Commit 957d638

Browse files
author
Ephraim Nartey
committed
chore(readme): replaced table example code with section links
1 parent e6712a8 commit 957d638

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ to your project's [pubspec.yml](https://flutter.dev/docs/development/tools/pubsp
2020

2121
## 2. Getting Started
2222

23-
| Options | Use case | Inbox Type | Example | Known Platform Support Issues |
24-
|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
25-
| ChatwootClient | Bare client api for building custom chat widgets. | API | ```dart ChatwootClient. create ( baseUrl: widget . baseUrl , inboxIdentifier: widget . inboxIdentifier , userIdentityValidationKey: widget . userIdentityValidationKey , user: widget . user , enablePersistence: widget . enablePersistence , callbacks: chatwootCallbacks ) .then((client) { setState(() { chatwootClient = client; chatwootClient !.loadMessages(); }); }).onError((error, stackTrace) { print( "chatwoot client failed with error $error : $stackTrace " ); }); ``` | - |
26-
| ChatwootDialog | Flutter Widget implementation built on the ChatwootClient | API | ```dart ChatwootChatDialog.show( context, title: "Customer Support" , inboxIdentifier: "your-api-inbox-identifier" , baseUrl: "https://app.chatwoot.com" , user: ChatwootUser( identifier: "[email protected]" , name: "Tester test" , email: "[email protected]" , ), primaryColor: const Color( 0xff258596 ), onAttachmentPressed: _handleAttachmentPressed, openFile: _handleOpenFile, ); ``` | - |
27-
| ChatwootChat | Also a widget implementation of ChatwootClient but presents only the Chat interface. Can be embedded in a a custom page unlike the dialog which is always presented in a dialog | API | ```dart ChatwootChat ( baseUrl: widget . baseUrl , inboxIdentifier: widget . inboxIdentifier , userIdentityValidationKey: widget . userIdentityValidationKey , user: widget . user , enablePersistence: widget . enablePersistence , theme: ChatwootChatTheme (primaryColor: Colors. blue ,), onConversationIsOffline: () {}, onConversationIsOnline: () {}, onConversationStoppedTyping: () {}, onConversationStartedTyping: () {}, onAttachmentPressed: widget . onAttachmentPressed , openFile: widget . openFile , ) ``` | - |
28-
| ChatwootWidget | The chatwoot website channel widget embedded in a flutter webview | Website | ```dart ChatwootWidget ( websiteToken: "websiteToken" , baseUrl: "https://app.chatwoot.com" , user: ChatwootUser ( identifier: "[email protected]" , name: "Tester test" , email: "[email protected]" , ), locale: "en" , closeWidget: () { if ( Platform .isAndroid) { SystemNavigator .pop(); } else if ( Platform .isIOS) { exit( 0 ); } }, //attachment only works on android for now onAttachFile: _androidFilePicker, onLoadStarted: () {}, onLoadProgress: ( int progress) {}, onLoadCompleted: () {}, ) ``` | Flutter webview currently supports only android & ios. Adding file attachment not supported on ios. Some known issues with previewing and downloading attached files on both Android and ios. |
23+
| Options | Use case | Inbox Type | Example | Known Platform Support Issues |
24+
|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|-------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
25+
| ChatwootClient | Bare client api for building custom chat widgets. | API | [Chatwoot Client example](#a-using-chatwoot-client) | - |
26+
| ChatwootDialog | Flutter Widget implementation built on the ChatwootClient | API | [Chatwoot Dialog example](#b-using-chatwootChatDialog) | - |
27+
| ChatwootChat | Also a widget implementation of ChatwootClient but presents only the Chat interface. Can be embedded in a a custom page unlike the dialog which is always presented in a dialog | API | [Chatwoot Chat Widget example](#c-embedding-chatwootChat) | - |
28+
| ChatwootWidget | The chatwoot website channel widget embedded in a flutter webview | Website | [Chatwoot Webview Widget example](#d-using-chatwootWidgetwebview) | Flutter webview currently supports only android & ios. Adding file attachment not supported on ios. Some known issues with previewing and downloading attached files on both Android and ios. |
2929

3030
## 3. How to use
3131

0 commit comments

Comments
 (0)