diff --git a/README.md b/README.md
index 270a615..5a251ac 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ Integrate Chatwoot flutter client into your flutter app and talk to your visitor
-## 1. Add the package to your project
+## 1. Installation
Run the command below in your terminal
@@ -18,11 +18,163 @@ Add
`chatwoot_sdk:<>`
to your project's [pubspec.yml](https://flutter.dev/docs/development/tools/pubspec) file. You can check [here](https://pub.dev/packages/chatwoot_sdk) for the latest version.
-## 2. How to use
+## 2. Getting Started
-### a. Using ChatwootWidget
+| Options | Use case | Inbox Type | Example | Known Platform Support Issues |
+|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|-------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| ChatwootClient | Bare client api for building custom chat widgets. | API | [Chatwoot Client example](#a-using-chatwoot-client) | - |
+| ChatwootDialog | Flutter Widget implementation built on the ChatwootClient | API | [Chatwoot Dialog example](#b-using-chatwootChatDialog) | - |
+| 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) | - |
+| 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. |
-* Create a website channel in chatwoot server by following the steps described here https://www.chatwoot.com/docs/channels/website
+## 3. How to use
+
+### a. Using Chatwoot Client
+* Create an Api inbox in Chatwoot. Refer to [Create API Channel](https://www.chatwoot.com/docs/product/channels/api/create-channel) document.
+* Create your own customized chat ui and use `ChatwootClient` to load and sendMessages. Messaging events like `onMessageSent` and `onMessageReceived` will be triggered on `ChatwootCallback` argument passed when creating the client instance.
+
+
+NB: This chatwoot client uses [Hive](https://pub.dev/packages/hive) for local storage.
+
+```dart
+final chatwootCallbacks = ChatwootCallbacks(
+ onWelcome: (){
+ print("on welcome");
+ },
+ onPing: (){
+ print("on ping");
+ },
+ onConfirmedSubscription: (){
+ print("on confirmed subscription");
+ },
+ onConversationStartedTyping: (){
+ print("on conversation started typing");
+ },
+ onConversationStoppedTyping: (){
+ print("on conversation stopped typing");
+ },
+ onPersistedMessagesRetrieved: (persistedMessages){
+ print("persisted messages retrieved");
+ },
+ onMessagesRetrieved: (messages){
+ print("messages retrieved");
+ },
+ onMessageReceived: (chatwootMessage){
+ print("message received");
+ },
+ onMessageDelivered: (chatwootMessage, echoId){
+ print("message delivered");
+ },
+ onMessageSent: (chatwootMessage, echoId){
+ print("message sent");
+ },
+ onError: (error){
+ print("Ooops! Something went wrong. Error Cause: ${error.cause}");
+ },
+ );
+
+ ChatwootClient.create(
+ baseUrl: widget.baseUrl,
+ inboxIdentifier: widget.inboxIdentifier,
+ user: widget.user,
+ enablePersistence: widget.enablePersistence,
+ callbacks: chatwootCallbacks
+ ).then((client) {
+ client.loadMessages();
+ }).onError((error, stackTrace) {
+ print("chatwoot client error $error: $stackTrace");
+ });
+```
+
+#### Available Parameters
+
+| Name | Default | Type | Description |
+|-------------------|---------|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| baseUrl | - | String | Installation url for chatwoot |
+| inboxIdentifier | - | String | Identifier for target chatwoot inbox |
+| enablePersistance | true | bool | Enables persistence of chatwoot client instance's contact, conversation and messages to disk
for convenience.
true - persists chatwoot client instance's data(contact, conversation and messages) to disk. To clear persisted
data call ChatwootClient.clearData or ChatwootClient.clearAllData
false - holds chatwoot client instance's data in memory and is cleared as
soon as chatwoot client instance is disposed
Setting |
+| user | null | ChatwootUser | Custom user details to be attached to chatwoot contact |
+| callbacks | null | ChatwootCallbacks | Callbacks for handling chatwoot events |
+
+
+### b. Using ChatwootChatDialog
+* Create an Api inbox in Chatwoot. Refer to [Create API Channel](https://www.chatwoot.com/docs/product/channels/api/create-channel) document.
+* Call `ChatwootChatDialog.show` with Api inbox configuration
+
+```dart
+ChatwootChatDialog.show(
+ context,
+ title: "Customer Support",
+ inboxIdentifier: "your-api-inbox-identifier",
+ userIdentityValidationKey: "your hmac user validation key",
+ baseUrl: "https://app.chatwoot.com",
+ user: ChatwootUser(
+ identifier: "test@test.com",
+ name: "Tester test",
+ email: "test@test.com",
+ ),
+ primaryColor: const Color(0xff258596),
+ onAttachmentPressed: _handleAttachmentPressed,
+ openFile: _handleOpenFile,
+);
+```
+
+#### Available Parameters
+
+| Name | Default | Type | Description |
+|-------------------------------|---------|-----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| baseUrl | - | String | Installation url for chatwoot |
+| inboxIdentifier | - | String | Identifier for target chatwoot inbox |
+| enablePersistance | true | bool | Enables persistence of chatwoot client instance's contact, conversation and messages to disk
for convenience.
true - persists chatwoot client instance's data(contact, conversation and messages) to disk. To clear persisted
data call ChatwootClient.clearData or ChatwootClient.clearAllData
false - holds chatwoot client instance's data in memory and is cleared as
soon as chatwoot client instance is disposed
Setting |
+| user | null | ChatwootUser | Custom user details to be attached to chatwoot contact |
+| primaryColor | blue | Widget color | Widget theme color |
+| All chatwoot callback methods | null | ChatwootCallbacks | Callbacks for handling chatwoot events |
+| onAttachmentPressed | null | Future Function() | Callback for handling attach file button onPressed |
+| openFile | null | void Function(String filePath) | Callbacks for handling event where user taps to open an attachment |
+
+
+### c. Embedding ChatwootChat
+* Create an Api inbox in Chatwoot. Refer to [Create API Channel](https://www.chatwoot.com/docs/product/channels/api/create-channel) document.
+* Initialize `ChatwootChat` with Api inbox configuration
+
+```dart
+
+ ChatwootChat(
+ inboxIdentifier: "your-api-inbox-identifier",
+ userIdentityValidationKey: "your hmac user validation key",
+ baseUrl: "https://app.chatwoot.com",
+ user: ChatwootUser(
+ identifier: "test@test.com",
+ name: "Tester test",
+ email: "test@test.com",
+ ),
+ enablePersistence: true,
+ theme: ChatwootChatTheme(primaryColor: Colors.blue,),
+ onConversationIsOffline: () {},
+ onConversationIsOnline: () {},
+ onConversationStoppedTyping: () {},
+ onConversationStartedTyping: () {},
+ onAttachmentPressed: () async{return FileAttachment();},
+ openFile: (filePath){},
+ );
+```
+
+#### Available Parameters
+
+| Name | Default | Type | Description |
+|-------------------------------|---------|------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| baseUrl | - | String | Installation url for chatwoot |
+| inboxIdentifier | - | String | Identifier for target chatwoot inbox |
+| enablePersistance | true | bool | Enables persistence of chatwoot client instance's contact, conversation and messages to disk
for convenience.
true - persists chatwoot client instance's data(contact, conversation and messages) to disk. To clear persisted
data call ChatwootClient.clearData or ChatwootClient.clearAllData
false - holds chatwoot client instance's data in memory and is cleared as
soon as chatwoot client instance is disposed
Setting |
+| user | null | ChatwootUser | Custom user details to be attached to chatwoot contact |
+| All chatwoot callback methods | null | ChatwootCallbacks | Callbacks for handling chatwoot events |
+| onAttachmentPressed | null | Future Function() | Callback for handling attach file button onPressed |
+| openFile | null | void Function(String filePath) | Callbacks for handling event where user taps to open an attachment |
+
+
+### d. Using ChatwootWidget(webview)
+
+* Create a **website channel** in chatwoot server by following the steps described here https://www.chatwoot.com/docs/channels/website
* Replace websiteToken prop and baseUrl
```dart
@@ -147,70 +299,3 @@ Horray! You're done.
| onLoadStarted | - | void Function() | Widget load start event |
| onLoadProgress | - | void Function(int) | Widget Load progress event |
| onLoadCompleted | - | void Function() | Widget Load completed event |
-
-### b. Using Chatwoot Client
-* Create an Api inbox in Chatwoot. Refer to [Create API Channel](https://www.chatwoot.com/docs/product/channels/api/create-channel) document.
-* Create your own customized chat ui and use `ChatwootClient` to load and sendMessages. Messaging events like `onMessageSent` and `onMessageReceived` will be triggered on `ChatwootCallback` argument passed when creating the client instance.
-
-
-NB: This chatwoot client uses [Hive](https://pub.dev/packages/hive) for local storage.
-
-```dart
-final chatwootCallbacks = ChatwootCallbacks(
- onWelcome: (){
- print("on welcome");
- },
- onPing: (){
- print("on ping");
- },
- onConfirmedSubscription: (){
- print("on confirmed subscription");
- },
- onConversationStartedTyping: (){
- print("on conversation started typing");
- },
- onConversationStoppedTyping: (){
- print("on conversation stopped typing");
- },
- onPersistedMessagesRetrieved: (persistedMessages){
- print("persisted messages retrieved");
- },
- onMessagesRetrieved: (messages){
- print("messages retrieved");
- },
- onMessageReceived: (chatwootMessage){
- print("message received");
- },
- onMessageDelivered: (chatwootMessage, echoId){
- print("message delivered");
- },
- onMessageSent: (chatwootMessage, echoId){
- print("message sent");
- },
- onError: (error){
- print("Ooops! Something went wrong. Error Cause: ${error.cause}");
- },
- );
-
- ChatwootClient.create(
- baseUrl: widget.baseUrl,
- inboxIdentifier: widget.inboxIdentifier,
- user: widget.user,
- enablePersistence: widget.enablePersistence,
- callbacks: chatwootCallbacks
- ).then((client) {
- client.loadMessages();
- }).onError((error, stackTrace) {
- print("chatwoot client creation failed with error $error: $stackTrace");
- });
-```
-
-#### Available Parameters
-
-| Name | Default | Type | Description |
-|-------------------|---------|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| baseUrl | - | String | Installation url for chatwoot |
-| inboxIdentifier | - | String | Identifier for target chatwoot inbox |
-| enablePersistance | true | bool | Enables persistence of chatwoot client instance's contact, conversation and messages to disk
for convenience.
true - persists chatwoot client instance's data(contact, conversation and messages) to disk. To clear persisted
data call ChatwootClient.clearData or ChatwootClient.clearAllData
false - holds chatwoot client instance's data in memory and is cleared as
soon as chatwoot client instance is disposed
Setting |
-| user | null | ChatwootUser | Custom user details to be attached to chatwoot contact |
-| callbacks | null | ChatwootCallbacks | Callbacks for handling chatwoot events |
diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle
index 2e60d0e..36d2368 100644
--- a/example/android/app/build.gradle
+++ b/example/android/app/build.gradle
@@ -26,8 +26,15 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
- compileSdkVersion 33
-
+ namespace "com.example.example"
+ compileSdkVersion 34
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_17
+ targetCompatibility JavaVersion.VERSION_17
+ }
+ kotlinOptions {
+ jvmTarget = '17'
+ }
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
@@ -35,8 +42,8 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.chatwoot.example"
- minSdkVersion 19
- targetSdkVersion 33
+ minSdkVersion flutter.minSdkVersion
+ targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml
index c208884..f880684 100644
--- a/example/android/app/src/debug/AndroidManifest.xml
+++ b/example/android/app/src/debug/AndroidManifest.xml
@@ -1,5 +1,4 @@
-
+
diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml
index f0de856..b42f3ce 100644
--- a/example/android/app/src/main/AndroidManifest.xml
+++ b/example/android/app/src/main/AndroidManifest.xml
@@ -1,5 +1,4 @@
-
+
diff --git a/example/android/app/src/profile/AndroidManifest.xml b/example/android/app/src/profile/AndroidManifest.xml
index c208884..f880684 100644
--- a/example/android/app/src/profile/AndroidManifest.xml
+++ b/example/android/app/src/profile/AndroidManifest.xml
@@ -1,5 +1,4 @@
-
+
diff --git a/example/android/build.gradle b/example/android/build.gradle
index 0b0a838..01e5f23 100644
--- a/example/android/build.gradle
+++ b/example/android/build.gradle
@@ -1,12 +1,12 @@
buildscript {
- ext.kotlin_version = '1.7.20'
+ ext.kotlin_version = '2.0.20'
repositories {
google()
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.4.1'
+ classpath 'com.android.tools.build:gradle:8.7.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
@@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}
-task clean(type: Delete) {
+tasks.register("clean", Delete) {
delete rootProject.buildDir
}
diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties
index 02e5f58..2aaed3a 100644
--- a/example/android/gradle/wrapper/gradle-wrapper.properties
+++ b/example/android/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
diff --git a/example/lib/main.dart b/example/lib/main.dart
index b885caa..cb0ff98 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -26,7 +26,7 @@ class MyApp extends StatelessWidget {
}
class MyHomePage extends StatefulWidget {
- MyHomePage({Key key, this.title}) : super(key: key);
+ MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@@ -88,7 +88,7 @@ class _MyHomePageState extends State {
final imageData = await photo.readAsBytes();
final decodedImage = image.decodeImage(imageData);
- final scaledImage = image.copyResize(decodedImage, width: 500);
+ final scaledImage = image.copyResize(decodedImage!, width: 500);
final jpg = image.encodeJpg(scaledImage, quality: 90);
final filePath = (await getTemporaryDirectory()).uri.resolve(
diff --git a/example/lib/main_client.dart b/example/lib/main_client.dart
new file mode 100644
index 0000000..0c67cae
--- /dev/null
+++ b/example/lib/main_client.dart
@@ -0,0 +1,112 @@
+
+import 'dart:io';
+import 'dart:typed_data';
+
+import 'package:chatwoot_sdk/chatwoot_sdk.dart';
+import 'package:chatwoot_sdk/ui/chatwoot_chat_theme.dart';
+import 'package:flutter/material.dart';
+import 'package:file_picker/file_picker.dart';
+import 'package:open_filex/open_filex.dart';
+
+void main() {
+ runApp(MyApp());
+}
+
+class MyApp extends StatelessWidget {
+ // This widget is the root of your application.
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp(
+ title: 'Flutter Demo',
+ theme: ThemeData(
+ primarySwatch: Colors.blue,
+ ),
+ home: MyHomePage(title: 'Flutter Demo Home Page'),
+ );
+ }
+}
+
+class MyHomePage extends StatefulWidget {
+ MyHomePage({Key? key, required this.title}) : super(key: key);
+
+ final String title;
+
+ @override
+ _MyHomePageState createState() => _MyHomePageState();
+}
+
+class _MyHomePageState extends State {
+ @override
+ void initState() {
+ super.initState();
+ }
+
+ _showDialog(){
+ ChatwootChatDialog.show(
+ context,
+ title: "Customer Support",
+ inboxIdentifier: "your-api-inbox-identifier",
+ userIdentityValidationKey: "your-hmac-user-validation-key",
+ baseUrl: "https://app.chatwoot.com",
+ user: ChatwootUser(
+ identifier: "test@test.com",
+ name: "Tester test",
+ email: "test@test.com",
+ ),
+ primaryColor: const Color(0xff258596),
+ onAttachmentPressed: _handleAttachmentPressed,
+ openFile: _handleOpenFile,
+ );
+ }
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text("Chatwoot Example"),
+ actions: [
+ IconButton(onPressed: _showDialog, icon: Icon(Icons.copy))
+ ],
+ ),
+ body: ChatwootChat(
+ inboxIdentifier: "your-api-inbox-identifier",
+ userIdentityValidationKey: "your-hmac-user-validation-key",
+ baseUrl: "https://app.chatwoot.com",
+ user: ChatwootUser(
+ identifier: "test@test.com",
+ name: "Tester test",
+ email: "test@test.com",
+ ),
+ theme: ChatwootChatTheme(
+ primaryColor: const Color(0xff258596)
+ ),
+ onAttachmentPressed: _handleAttachmentPressed,
+ openFile: _handleOpenFile,
+ ),
+ );
+ }
+
+ Future _handleOpenFile(String filePath) async{
+ await OpenFilex.open(filePath);
+ }
+
+ Future _handleAttachmentPressed() async{
+ return await _handleFileSelection();
+ }
+
+
+ Future _handleFileSelection() async {
+ final result = await FilePicker.platform.pickFiles(
+ type: FileType.any,
+ );
+
+ if (result?.files.isNotEmpty ?? false) {
+ final bytes = await File(result!.files.first.path!).readAsBytes();
+ final name = result.files.first.name;
+ final path = result.files.first.path ?? '';
+ return FileAttachment(bytes: Uint8List.fromList(bytes), name: name, path: path);
+ }
+
+ return null;
+ }
+
+}
diff --git a/example/pubspec.lock b/example/pubspec.lock
index 2913c99..3b17edf 100644
--- a/example/pubspec.lock
+++ b/example/pubspec.lock
@@ -5,18 +5,26 @@ packages:
dependency: transitive
description:
name: archive
- sha256: d6347d54a2d8028e0437e3c099f66fdb8ae02c4720c1e7534c9f24c10351f85d
+ sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d
url: "https://pub.dev"
source: hosted
- version: "3.3.6"
+ version: "3.6.1"
+ args:
+ dependency: transitive
+ description:
+ name: args
+ sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.6.0"
async:
dependency: transitive
description:
name: async
- sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
+ sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
url: "https://pub.dev"
source: hosted
- version: "2.10.0"
+ version: "2.11.0"
boolean_selector:
dependency: transitive
description:
@@ -25,14 +33,38 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.1"
+ cached_network_image:
+ dependency: transitive
+ description:
+ name: cached_network_image
+ sha256: "4a5d8d2c728b0f3d0245f69f921d7be90cae4c2fd5288f773088672c0893f819"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.4.0"
+ cached_network_image_platform_interface:
+ dependency: transitive
+ description:
+ name: cached_network_image_platform_interface
+ sha256: "35814b016e37fbdc91f7ae18c8caf49ba5c88501813f73ce8a07027a395e2829"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.1.1"
+ cached_network_image_web:
+ dependency: transitive
+ description:
+ name: cached_network_image_web
+ sha256: "6322dde7a5ad92202e64df659241104a43db20ed594c41ca18de1014598d7996"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.0"
characters:
dependency: transitive
description:
name: characters
- sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
+ sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
url: "https://pub.dev"
source: hosted
- version: "1.2.1"
+ version: "1.3.0"
chatwoot_sdk:
dependency: "direct main"
description:
@@ -52,74 +84,90 @@ packages:
dependency: transitive
description:
name: collection
- sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
+ sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
- version: "1.17.0"
- convert:
- dependency: transitive
- description:
- name: convert
- sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
- url: "https://pub.dev"
- source: hosted
- version: "3.1.1"
+ version: "1.18.0"
cross_file:
dependency: transitive
description:
name: cross_file
- sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9"
+ sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670"
url: "https://pub.dev"
source: hosted
- version: "0.3.3+4"
+ version: "0.3.4+2"
crypto:
dependency: transitive
description:
name: crypto
- sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67
+ sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
url: "https://pub.dev"
source: hosted
- version: "3.0.2"
+ version: "3.0.6"
csslib:
dependency: transitive
description:
name: csslib
- sha256: b36c7f7e24c0bdf1bf9a3da461c837d1de64b9f8beb190c9011d8c72a3dfd745
+ sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e"
url: "https://pub.dev"
source: hosted
- version: "0.17.2"
+ version: "1.0.2"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
- sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
+ sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
url: "https://pub.dev"
source: hosted
- version: "1.0.5"
+ version: "1.0.8"
+ dbus:
+ dependency: transitive
+ description:
+ name: dbus
+ sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.7.10"
diffutil_dart:
dependency: transitive
description:
name: diffutil_dart
- sha256: "21bcad3fcc89389da5c72c59b9da31eabb301a6548f715c17b0dfdd27d2ac6d5"
+ sha256: "5e74883aedf87f3b703cb85e815bdc1ed9208b33501556e4a8a5572af9845c81"
url: "https://pub.dev"
source: hosted
- version: "2.0.0+1"
+ version: "4.0.1"
dio:
dependency: transitive
description:
name: dio
- sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8"
+ sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260"
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.7.0"
+ dio_web_adapter:
+ dependency: transitive
+ description:
+ name: dio_web_adapter
+ sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8"
url: "https://pub.dev"
source: hosted
- version: "4.0.6"
+ version: "2.0.0"
+ easy_image_viewer:
+ dependency: transitive
+ description:
+ name: easy_image_viewer
+ sha256: fb6cb123c3605552cc91150dcdb50ca977001dcddfb71d20caa0c5edc9a80947
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.5.1"
equatable:
dependency: transitive
description:
name: equatable
- sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2
+ sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7"
url: "https://pub.dev"
source: hosted
- version: "2.0.5"
+ version: "2.0.7"
fake_async:
dependency: transitive
description:
@@ -132,111 +180,183 @@ packages:
dependency: transitive
description:
name: ffi
- sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978
+ sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6"
url: "https://pub.dev"
source: hosted
- version: "2.0.1"
+ version: "2.1.3"
file:
dependency: transitive
description:
name: file
- sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
+ sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
url: "https://pub.dev"
source: hosted
- version: "6.1.4"
+ version: "7.0.1"
+ file_picker:
+ dependency: "direct main"
+ description:
+ name: file_picker
+ sha256: "825aec673606875c33cd8d3c4083f1a3c3999015a84178b317b7ef396b7384f3"
+ url: "https://pub.dev"
+ source: hosted
+ version: "8.0.7"
+ file_selector_linux:
+ dependency: transitive
+ description:
+ name: file_selector_linux
+ sha256: b2b91daf8a68ecfa4a01b778a6f52edef9b14ecd506e771488ea0f2e0784198b
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.9.3+1"
+ file_selector_macos:
+ dependency: transitive
+ description:
+ name: file_selector_macos
+ sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.9.4+2"
+ file_selector_platform_interface:
+ dependency: transitive
+ description:
+ name: file_selector_platform_interface
+ sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.6.2"
+ file_selector_windows:
+ dependency: transitive
+ description:
+ name: file_selector_windows
+ sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.9.3+3"
+ fixnum:
+ dependency: transitive
+ description:
+ name: fixnum
+ sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.1"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
+ flutter_cache_manager:
+ dependency: transitive
+ description:
+ name: flutter_cache_manager
+ sha256: "400b6592f16a4409a7f2bb929a9a7e38c72cceb8ffb99ee57bbf2cb2cecf8386"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.4.1"
flutter_chat_types:
dependency: transitive
description:
name: flutter_chat_types
- sha256: cb9e72c6dee5f32e4b379b6b953dff95253c54242ee4e21ad81652b11902d5a8
+ sha256: e285b588f6d19d907feb1f6d912deaf22e223656769c34093b64e1c59b094fb9
url: "https://pub.dev"
source: hosted
- version: "2.4.3"
+ version: "3.6.2"
flutter_chat_ui:
dependency: transitive
description:
name: flutter_chat_ui
- sha256: "9c19396e59de978da092a935a04542ecf9746e3d75b9b7a038638e2a1982a5a1"
+ sha256: "168a4231464ad00a17ea5f0813f1b58393bdd4035683ea4dc37bbe26be62891e"
url: "https://pub.dev"
source: hosted
- version: "1.2.0"
+ version: "1.6.15"
flutter_link_previewer:
dependency: transitive
description:
name: flutter_link_previewer
- sha256: "0adc16359ce8385d623ee4b2985e702d7766d52e351bf0fd6a12366f8e49a63f"
+ sha256: "007069e60f42419fb59872beb7a3cc3ea21e9f1bdff5d40239f376fa62ca9f20"
url: "https://pub.dev"
source: hosted
- version: "2.3.0"
+ version: "3.2.2"
flutter_linkify:
dependency: transitive
description:
name: flutter_linkify
- sha256: c89fe74de985ec22f23d3538d2249add085a4f37ac1c29fd79e1a207efb81d63
+ sha256: "74669e06a8f358fee4512b4320c0b80e51cffc496607931de68d28f099254073"
url: "https://pub.dev"
source: hosted
- version: "5.0.2"
+ version: "6.0.0"
+ flutter_markdown:
+ dependency: transitive
+ description:
+ name: flutter_markdown
+ sha256: "999a4e3cb3e1532a971c86d6c73a480264f6a687959d4887cb4e2990821827e4"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.7.4+2"
+ flutter_parsed_text:
+ dependency: transitive
+ description:
+ name: flutter_parsed_text
+ sha256: "529cf5793b7acdf16ee0f97b158d0d4ba0bf06e7121ef180abe1a5b59e32c1e2"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.1"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
- sha256: c224ac897bed083dabf11f238dd11a239809b446740be0c2044608c50029ffdf
+ sha256: "9b78450b89f059e96c9ebb355fa6b3df1d6b330436e0b885fb49594c41721398"
url: "https://pub.dev"
source: hosted
- version: "2.0.9"
+ version: "2.0.23"
flutter_secure_storage:
dependency: transitive
description:
name: flutter_secure_storage
- sha256: "98352186ee7ad3639ccc77ad7924b773ff6883076ab952437d20f18a61f0a7c5"
+ sha256: "165164745e6afb5c0e3e3fcc72a012fb9e58496fb26ffb92cf22e16a821e85d0"
url: "https://pub.dev"
source: hosted
- version: "8.0.0"
+ version: "9.2.2"
flutter_secure_storage_linux:
dependency: transitive
description:
name: flutter_secure_storage_linux
- sha256: "0912ae29a572230ad52d8a4697e5518d7f0f429052fd51df7e5a7952c7efe2a3"
+ sha256: "4d91bfc23047422cbcd73ac684bc169859ee766482517c22172c86596bf1464b"
url: "https://pub.dev"
source: hosted
- version: "1.1.3"
+ version: "1.2.1"
flutter_secure_storage_macos:
dependency: transitive
description:
name: flutter_secure_storage_macos
- sha256: "083add01847fc1c80a07a08e1ed6927e9acd9618a35e330239d4422cd2a58c50"
+ sha256: "1693ab11121a5f925bbea0be725abfcfbbcf36c1e29e571f84a0c0f436147a81"
url: "https://pub.dev"
source: hosted
- version: "3.0.0"
+ version: "3.1.2"
flutter_secure_storage_platform_interface:
dependency: transitive
description:
name: flutter_secure_storage_platform_interface
- sha256: b3773190e385a3c8a382007893d678ae95462b3c2279e987b55d140d3b0cb81b
+ sha256: cf91ad32ce5adef6fba4d736a542baca9daf3beac4db2d04be350b87f69ac4a8
url: "https://pub.dev"
source: hosted
- version: "1.0.1"
+ version: "1.1.2"
flutter_secure_storage_web:
dependency: transitive
description:
name: flutter_secure_storage_web
- sha256: "42938e70d4b872e856e678c423cc0e9065d7d294f45bc41fc1981a4eb4beaffe"
+ sha256: f4ebff989b4f07b2656fb16b47852c0aab9fed9b4ec1c70103368337bc1886a9
url: "https://pub.dev"
source: hosted
- version: "1.1.1"
+ version: "1.2.1"
flutter_secure_storage_windows:
dependency: transitive
description:
name: flutter_secure_storage_windows
- sha256: fc2910ec9b28d60598216c29ea763b3a96c401f0ce1d13cdf69ccb0e5c93c3ee
+ sha256: b20b07cb5ed4ed74fc567b78a72936203f587eba460af1df11281c9326cd3709
url: "https://pub.dev"
source: hosted
- version: "2.0.0"
+ version: "3.1.2"
flutter_test:
dependency: "direct dev"
description: flutter
@@ -247,14 +367,6 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
- freezed_annotation:
- dependency: transitive
- description:
- name: freezed_annotation
- sha256: "70776c4541e5cacfe45bcaf00fe79137b8c61aa34fb5765a05ce6c57fd72c6e9"
- url: "https://pub.dev"
- source: hosted
- version: "0.14.3"
hive:
dependency: transitive
description:
@@ -275,18 +387,18 @@ packages:
dependency: transitive
description:
name: html
- sha256: d9793e10dbe0e6c364f4c59bf3e01fb33a9b2a674bc7a1081693dba0614b6269
+ sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec"
url: "https://pub.dev"
source: hosted
- version: "0.15.1"
+ version: "0.15.5"
http:
dependency: transitive
description:
name: http
- sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482"
+ sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010
url: "https://pub.dev"
source: hosted
- version: "0.13.5"
+ version: "1.2.2"
http_parser:
dependency: transitive
description:
@@ -299,218 +411,442 @@ packages:
dependency: "direct main"
description:
name: image
- sha256: "483a389d6ccb292b570c31b3a193779b1b0178e7eb571986d9a49904b6861227"
+ sha256: f31d52537dc417fdcde36088fdf11d191026fd5e4fae742491ebd40e5a8bea7d
url: "https://pub.dev"
source: hosted
- version: "4.0.15"
+ version: "4.3.0"
image_picker:
dependency: "direct main"
description:
name: image_picker
- sha256: "64b21d9f0e065f9ab0e4dde458076226c97382cc0c6949144cb874c62bf8e9f8"
+ sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a"
url: "https://pub.dev"
source: hosted
- version: "0.8.7"
+ version: "1.1.2"
image_picker_android:
dependency: transitive
description:
name: image_picker_android
- sha256: "420ed22d2c9ce767ed96df723aaebfeb20ce92dfda8665cd2ba72d72a51ae669"
+ sha256: "8faba09ba361d4b246dc0a17cb4289b3324c2b9f6db7b3d457ee69106a86bd32"
url: "https://pub.dev"
source: hosted
- version: "0.8.6+1"
+ version: "0.8.12+17"
image_picker_for_web:
dependency: transitive
description:
name: image_picker_for_web
- sha256: "98f50d6b9f294c8ba35e25cc0d13b04bfddd25dbc8d32fa9d566a6572f2c081c"
+ sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83"
url: "https://pub.dev"
source: hosted
- version: "2.1.12"
+ version: "3.0.6"
image_picker_ios:
dependency: transitive
description:
name: image_picker_ios
- sha256: "50e882fe0a06bf0c8f7f5bce78d30975f279213293afc9471dc35f05617c50ff"
+ sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b"
url: "https://pub.dev"
source: hosted
- version: "0.8.7+1"
+ version: "0.8.12+1"
+ image_picker_linux:
+ dependency: transitive
+ description:
+ name: image_picker_linux
+ sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.2.1+1"
+ image_picker_macos:
+ dependency: transitive
+ description:
+ name: image_picker_macos
+ sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.2.1+1"
image_picker_platform_interface:
dependency: transitive
description:
name: image_picker_platform_interface
- sha256: "1991219d9dbc42a99aff77e663af8ca51ced592cd6685c9485e3458302d3d4f8"
+ sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80"
url: "https://pub.dev"
source: hosted
- version: "2.6.3"
+ version: "2.10.0"
+ image_picker_windows:
+ dependency: transitive
+ description:
+ name: image_picker_windows
+ sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.2.1+1"
intl:
dependency: transitive
description:
name: intl
- sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91"
+ sha256: "99f282cb0e02edcbbf8c6b3bbc7c90b65635156c412e58f3975a7e55284ce685"
url: "https://pub.dev"
source: hosted
- version: "0.17.0"
+ version: "0.20.0"
js:
dependency: transitive
description:
name: js
- sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
+ sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
- version: "0.6.5"
+ version: "0.6.7"
json_annotation:
dependency: transitive
description:
name: json_annotation
- sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317
+ sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.9.0"
+ leak_tracker:
+ dependency: transitive
+ description:
+ name: leak_tracker
+ sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
+ url: "https://pub.dev"
+ source: hosted
+ version: "10.0.5"
+ leak_tracker_flutter_testing:
+ dependency: transitive
+ description:
+ name: leak_tracker_flutter_testing
+ sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.5"
+ leak_tracker_testing:
+ dependency: transitive
+ description:
+ name: leak_tracker_testing
+ sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
source: hosted
- version: "4.8.0"
+ version: "3.0.1"
linkify:
dependency: transitive
description:
name: linkify
- sha256: bdfbdafec6cdc9cd0ebb333a868cafc046714ad508e48be8095208c54691d959
+ sha256: "4139ea77f4651ab9c315b577da2dd108d9aa0bd84b5d03d33323f1970c645832"
url: "https://pub.dev"
source: hosted
- version: "4.1.0"
+ version: "5.0.0"
+ markdown:
+ dependency: transitive
+ description:
+ name: markdown
+ sha256: ef2a1298144e3f985cc736b22e0ccdaf188b5b3970648f2d9dc13efd1d9df051
+ url: "https://pub.dev"
+ source: hosted
+ version: "7.2.2"
matcher:
dependency: transitive
description:
name: matcher
- sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
+ sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
url: "https://pub.dev"
source: hosted
- version: "0.12.13"
+ version: "0.12.16+1"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
- sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
+ sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.11.1"
+ media_kit:
+ dependency: transitive
+ description:
+ name: media_kit
+ sha256: "1f1deee148533d75129a6f38251ff8388e33ee05fc2d20a6a80e57d6051b7b62"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.11"
+ media_kit_libs_android_video:
+ dependency: transitive
+ description:
+ name: media_kit_libs_android_video
+ sha256: "9dd8012572e4aff47516e55f2597998f0a378e3d588d0fad0ca1f11a53ae090c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.6"
+ media_kit_libs_ios_video:
+ dependency: transitive
+ description:
+ name: media_kit_libs_ios_video
+ sha256: b5382994eb37a4564c368386c154ad70ba0cc78dacdd3fb0cd9f30db6d837991
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.4"
+ media_kit_libs_linux:
+ dependency: transitive
+ description:
+ name: media_kit_libs_linux
+ sha256: e186891c31daa6bedab4d74dcdb4e8adfccc7d786bfed6ad81fe24a3b3010310
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.3"
+ media_kit_libs_macos_video:
+ dependency: transitive
+ description:
+ name: media_kit_libs_macos_video
+ sha256: f26aa1452b665df288e360393758f84b911f70ffb3878032e1aabba23aa1032d
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.4"
+ media_kit_libs_video:
+ dependency: transitive
+ description:
+ name: media_kit_libs_video
+ sha256: "20bb4aefa8fece282b59580e1cd8528117297083a6640c98c2e98cfc96b93288"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.5"
+ media_kit_libs_windows_video:
+ dependency: transitive
+ description:
+ name: media_kit_libs_windows_video
+ sha256: "32654572167825c42c55466f5d08eee23ea11061c84aa91b09d0e0f69bdd0887"
url: "https://pub.dev"
source: hosted
- version: "0.2.0"
+ version: "1.0.10"
+ media_kit_native_event_loop:
+ dependency: transitive
+ description:
+ name: media_kit_native_event_loop
+ sha256: "7d82e3b3e9ded5c35c3146c5ba1da3118d1dd8ac3435bac7f29f458181471b40"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.9"
+ media_kit_video:
+ dependency: transitive
+ description:
+ name: media_kit_video
+ sha256: "2cc3b966679963ba25a4ce5b771e532a521ebde7c6aa20e9802bec95d9916c8f"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.5"
meta:
dependency: transitive
description:
name: meta
- sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
+ sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
url: "https://pub.dev"
source: hosted
- version: "1.8.0"
+ version: "1.15.0"
+ mime:
+ dependency: transitive
+ description:
+ name: mime
+ sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.0"
+ octo_image:
+ dependency: transitive
+ description:
+ name: octo_image
+ sha256: "34faa6639a78c7e3cbe79be6f9f96535867e879748ade7d17c9b1ae7536293bd"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.0"
+ open_filex:
+ dependency: "direct main"
+ description:
+ name: open_filex
+ sha256: ba425ea49affd0a98a234aa9344b9ea5d4c4f7625a1377961eae9fe194c3d523
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.5.0"
+ package_info_plus:
+ dependency: transitive
+ description:
+ name: package_info_plus
+ sha256: da8d9ac8c4b1df253d1a328b7bf01ae77ef132833479ab40763334db13b91cce
+ url: "https://pub.dev"
+ source: hosted
+ version: "8.1.1"
+ package_info_plus_platform_interface:
+ dependency: transitive
+ description:
+ name: package_info_plus_platform_interface
+ sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.1"
path:
dependency: transitive
description:
name: path
- sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
+ sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
url: "https://pub.dev"
source: hosted
- version: "1.8.2"
+ version: "1.9.0"
path_provider:
dependency: "direct main"
description:
name: path_provider
- sha256: "04890b994ee89bfa80bf3080bfec40d5a92c5c7a785ebb02c13084a099d2b6f9"
+ sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd"
url: "https://pub.dev"
source: hosted
- version: "2.0.13"
+ version: "2.1.5"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
- sha256: a776c088d671b27f6e3aa8881d64b87b3e80201c64e8869b811325de7a76c15e
+ sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a
url: "https://pub.dev"
source: hosted
- version: "2.0.22"
+ version: "2.2.12"
path_provider_foundation:
dependency: transitive
description:
name: path_provider_foundation
- sha256: "026b97a6c29da75181a37aae2eba9227f5fe13cb2838c6b975ce209328b8ab4e"
+ sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16
url: "https://pub.dev"
source: hosted
- version: "2.1.3"
+ version: "2.4.0"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
- sha256: ab0987bf95bc591da42dffb38c77398fc43309f0b9b894dcc5d6f40c4b26c379
+ sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
url: "https://pub.dev"
source: hosted
- version: "2.1.7"
+ version: "2.2.1"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
- sha256: f0abc8ebd7253741f05488b4813d936b4d07c6bae3e86148a09e342ee4b08e76
+ sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334"
url: "https://pub.dev"
source: hosted
- version: "2.0.5"
+ version: "2.1.2"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
- sha256: bcabbe399d4042b8ee687e17548d5d3f527255253b4a639f5f8d2094a9c2b45c
+ sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7
url: "https://pub.dev"
source: hosted
- version: "2.1.3"
+ version: "2.3.0"
petitparser:
dependency: transitive
description:
name: petitparser
- sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4"
+ sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
url: "https://pub.dev"
source: hosted
- version: "5.1.0"
+ version: "6.0.2"
photo_view:
dependency: transitive
description:
name: photo_view
- sha256: aedb4371e5bf67546ecd92aed341df714f9de5db7c417ce7538a91c2b43d931a
+ sha256: "1fc3d970a91295fbd1364296575f854c9863f225505c28c46e0a03e48960c75e"
url: "https://pub.dev"
source: hosted
- version: "0.12.0"
+ version: "0.15.0"
platform:
dependency: transitive
description:
name: platform
- sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76"
+ sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
url: "https://pub.dev"
source: hosted
- version: "3.1.0"
+ version: "3.1.6"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
- sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a
+ sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
url: "https://pub.dev"
source: hosted
- version: "2.1.3"
- pointycastle:
+ version: "2.1.8"
+ riverpod:
dependency: transitive
description:
- name: pointycastle
- sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346
+ name: riverpod
+ sha256: "59062512288d3056b2321804332a13ffdd1bf16df70dcc8e506e411280a72959"
url: "https://pub.dev"
source: hosted
- version: "3.6.2"
- process:
+ version: "2.6.1"
+ rxdart:
dependency: transitive
description:
- name: process
- sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09"
+ name: rxdart
+ sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962"
url: "https://pub.dev"
source: hosted
- version: "4.2.4"
- riverpod:
+ version: "0.28.0"
+ safe_local_storage:
dependency: transitive
description:
- name: riverpod
- sha256: "13cbe0e17b659f38027986df967b3eaf7f42c519786352167fc3db1be44eae07"
+ name: safe_local_storage
+ sha256: ede4eb6cb7d88a116b3d3bf1df70790b9e2038bc37cb19112e381217c74d9440
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.2"
+ screen_brightness:
+ dependency: transitive
+ description:
+ name: screen_brightness
+ sha256: ed8da4a4511e79422fc1aa88138e920e4008cd312b72cdaa15ccb426c0faaedd
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.2.2+1"
+ screen_brightness_android:
+ dependency: transitive
+ description:
+ name: screen_brightness_android
+ sha256: "3df10961e3a9e968a5e076fe27e7f4741fa8a1d3950bdeb48cf121ed529d0caf"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.1.0+2"
+ screen_brightness_ios:
+ dependency: transitive
+ description:
+ name: screen_brightness_ios
+ sha256: "99adc3ca5490b8294284aad5fcc87f061ad685050e03cf45d3d018fe398fd9a2"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.1.0"
+ screen_brightness_macos:
+ dependency: transitive
+ description:
+ name: screen_brightness_macos
+ sha256: "64b34e7e3f4900d7687c8e8fb514246845a73ecec05ab53483ed025bd4a899fd"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.1.0+1"
+ screen_brightness_platform_interface:
+ dependency: transitive
+ description:
+ name: screen_brightness_platform_interface
+ sha256: b211d07f0c96637a15fb06f6168617e18030d5d74ad03795dd8547a52717c171
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.1.0"
+ screen_brightness_windows:
+ dependency: transitive
+ description:
+ name: screen_brightness_windows
+ sha256: "9261bf33d0fc2707d8cf16339ce25768100a65e70af0fcabaf032fc12408ba86"
url: "https://pub.dev"
source: hosted
- version: "0.14.0+3"
+ version: "0.1.3"
+ scroll_to_index:
+ dependency: transitive
+ description:
+ name: scroll_to_index
+ sha256: b707546e7500d9f070d63e5acf74fd437ec7eeeb68d3412ef7b0afada0b4f176
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.1"
sky_engine:
dependency: transitive
description: flutter
@@ -520,34 +856,82 @@ packages:
dependency: transitive
description:
name: source_span
- sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
+ sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.10.0"
+ sprintf:
+ dependency: transitive
+ description:
+ name: sprintf
+ sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23"
url: "https://pub.dev"
source: hosted
- version: "1.9.1"
+ version: "7.0.0"
+ sqflite:
+ dependency: transitive
+ description:
+ name: sqflite
+ sha256: "2d7299468485dca85efeeadf5d38986909c5eb0cd71fd3db2c2f000e6c9454bb"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.1"
+ sqflite_android:
+ dependency: transitive
+ description:
+ name: sqflite_android
+ sha256: "78f489aab276260cdd26676d2169446c7ecd3484bbd5fead4ca14f3ed4dd9ee3"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.0"
+ sqflite_common:
+ dependency: transitive
+ description:
+ name: sqflite_common
+ sha256: "761b9740ecbd4d3e66b8916d784e581861fd3c3553eda85e167bc49fdb68f709"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.5.4+6"
+ sqflite_darwin:
+ dependency: transitive
+ description:
+ name: sqflite_darwin
+ sha256: "96a698e2bc82bd770a4d6aab00b42396a7c63d9e33513a56945cbccb594c2474"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.1"
+ sqflite_platform_interface:
+ dependency: transitive
+ description:
+ name: sqflite_platform_interface
+ sha256: "8dd4515c7bdcae0a785b0062859336de775e8c65db81ae33dd5445f35be61920"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
- sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
+ sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
- version: "1.11.0"
+ version: "1.11.1"
state_notifier:
dependency: transitive
description:
name: state_notifier
- sha256: "8fe42610f179b843b12371e40db58c9444f8757f8b69d181c97e50787caed289"
+ sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb
url: "https://pub.dev"
source: hosted
- version: "0.7.2+1"
+ version: "1.0.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
- sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
+ sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
- version: "2.1.1"
+ version: "2.1.2"
string_scanner:
dependency: transitive
description:
@@ -560,10 +944,10 @@ packages:
dependency: transitive
description:
name: synchronized
- sha256: "33b31b6beb98100bf9add464a36a8dd03eb10c7a8cf15aeec535e9b054aaf04b"
+ sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225"
url: "https://pub.dev"
source: hosted
- version: "3.0.1"
+ version: "3.3.0+3"
term_glyph:
dependency: transitive
description:
@@ -576,90 +960,106 @@ packages:
dependency: transitive
description:
name: test_api
- sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
+ sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
url: "https://pub.dev"
source: hosted
- version: "0.4.16"
+ version: "0.7.2"
typed_data:
dependency: transitive
description:
name: typed_data
- sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5"
+ sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
url: "https://pub.dev"
source: hosted
- version: "1.3.1"
+ version: "1.4.0"
+ universal_platform:
+ dependency: transitive
+ description:
+ name: universal_platform
+ sha256: "64e16458a0ea9b99260ceb5467a214c1f298d647c659af1bff6d3bf82536b1ec"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.0"
+ uri_parser:
+ dependency: transitive
+ description:
+ name: uri_parser
+ sha256: "6543c9fd86d2862fac55d800a43e67c0dcd1a41677cb69c2f8edfe73bbcf1835"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.2"
url_launcher:
dependency: transitive
description:
name: url_launcher
- sha256: "75f2846facd11168d007529d6cd8fcb2b750186bea046af9711f10b907e1587e"
+ sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603"
url: "https://pub.dev"
source: hosted
- version: "6.1.10"
+ version: "6.3.1"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
- sha256: "3e2f6dfd2c7d9cd123296cab8ef66cfc2c1a13f5845f42c7a0f365690a8a7dd1"
+ sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193"
url: "https://pub.dev"
source: hosted
- version: "6.0.23"
+ version: "6.3.14"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
- sha256: bb328b24d3bccc20bdf1024a0990ac4f869d57663660de9c936fb8c043edefe3
+ sha256: e43b677296fadce447e987a2f519dcf5f6d1e527dc35d01ffab4fff5b8a7063e
url: "https://pub.dev"
source: hosted
- version: "6.0.18"
+ version: "6.3.1"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
- sha256: "318c42cba924e18180c029be69caf0a1a710191b9ec49bb42b5998fdcccee3cc"
+ sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935"
url: "https://pub.dev"
source: hosted
- version: "3.0.2"
+ version: "3.2.1"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
- sha256: "41988b55570df53b3dd2a7fc90c76756a963de6a8c5f8e113330cb35992e2094"
+ sha256: "769549c999acdb42b8bcfa7c43d72bf79a382ca7441ab18a808e101149daf672"
url: "https://pub.dev"
source: hosted
- version: "3.0.2"
+ version: "3.2.1"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
- sha256: "4eae912628763eb48fc214522e58e942fd16ce195407dbf45638239523c759a6"
+ sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
url: "https://pub.dev"
source: hosted
- version: "2.1.1"
+ version: "2.3.2"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
- sha256: "44d79408ce9f07052095ef1f9a693c258d6373dc3944249374e30eff7219ccb0"
+ sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e"
url: "https://pub.dev"
source: hosted
- version: "2.0.14"
+ version: "2.3.3"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
- sha256: "387e227c4b979034cc52afb11d66b04ed9b288ca1f45beeef39b2ea69e714fa5"
+ sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4"
url: "https://pub.dev"
source: hosted
- version: "3.0.2"
+ version: "3.1.3"
uuid:
dependency: transitive
description:
name: uuid
- sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313"
+ sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff
url: "https://pub.dev"
source: hosted
- version: "3.0.7"
+ version: "4.5.1"
vector_math:
dependency: transitive
description:
@@ -668,70 +1068,126 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
+ visibility_detector:
+ dependency: transitive
+ description:
+ name: visibility_detector
+ sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.4.0+2"
+ vm_service:
+ dependency: transitive
+ description:
+ name: vm_service
+ sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
+ url: "https://pub.dev"
+ source: hosted
+ version: "14.2.5"
+ volume_controller:
+ dependency: transitive
+ description:
+ name: volume_controller
+ sha256: c71d4c62631305df63b72da79089e078af2659649301807fa746088f365cb48e
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.8"
+ wakelock_plus:
+ dependency: transitive
+ description:
+ name: wakelock_plus
+ sha256: bf4ee6f17a2fa373ed3753ad0e602b7603f8c75af006d5b9bdade263928c0484
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.8"
+ wakelock_plus_platform_interface:
+ dependency: transitive
+ description:
+ name: wakelock_plus_platform_interface
+ sha256: "422d1cdbb448079a8a62a5a770b69baa489f8f7ca21aef47800c726d404f9d16"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.1"
+ web:
+ dependency: transitive
+ description:
+ name: web
+ sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.5.1"
+ web_socket:
+ dependency: transitive
+ description:
+ name: web_socket
+ sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.1.6"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
- sha256: ca49c0bc209c687b887f30527fb6a9d80040b072cc2990f34b9bec3e7663101b
+ sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f"
url: "https://pub.dev"
source: hosted
- version: "2.3.0"
+ version: "3.0.1"
webview_flutter:
dependency: transitive
description:
name: webview_flutter
- sha256: b6cd42db3ced5411f3d01599906156885b18e4188f7065a8a351eb84bee347e0
+ sha256: "889a0a678e7c793c308c68739996227c9661590605e70b1f6cf6b9a6634f7aec"
url: "https://pub.dev"
source: hosted
- version: "4.0.6"
+ version: "4.10.0"
webview_flutter_android:
dependency: transitive
description:
name: webview_flutter_android
- sha256: c849dcb6bf7367f696869006fb9575c15bdc6a1d624ae13f12de5a147a740b12
+ sha256: "285cedfd9441267f6cca8843458620b5fda1af75b04f5818d0441acda5d7df19"
url: "https://pub.dev"
source: hosted
- version: "3.4.2"
+ version: "4.1.0"
webview_flutter_platform_interface:
dependency: transitive
description:
name: webview_flutter_platform_interface
- sha256: "1939c39e2150fb4d30fd3cc59a891a49fed9935db53007df633ed83581b6117b"
+ sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d
url: "https://pub.dev"
source: hosted
- version: "2.1.0"
+ version: "2.10.0"
webview_flutter_wkwebview:
dependency: transitive
description:
name: webview_flutter_wkwebview
- sha256: ab12479f7a0cf112b9420c36aaf206a1ca47cd60cd42de74a4be2e97a697587b
+ sha256: b7e92f129482460951d96ef9a46b49db34bd2e1621685de26e9eaafd9674e7eb
url: "https://pub.dev"
source: hosted
- version: "3.2.1"
+ version: "3.16.3"
win32:
dependency: transitive
description:
name: win32
- sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46
+ sha256: "84ba388638ed7a8cb3445a320c8273136ab2631cd5f2c57888335504ddab1bc2"
url: "https://pub.dev"
source: hosted
- version: "3.1.3"
+ version: "5.8.0"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
- sha256: bd512f03919aac5f1313eb8249f223bacf4927031bf60b02601f81f687689e86
+ sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15"
url: "https://pub.dev"
source: hosted
- version: "0.2.0+3"
+ version: "1.1.0"
xml:
dependency: transitive
description:
name: xml
- sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5"
+ sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
url: "https://pub.dev"
source: hosted
- version: "6.2.2"
+ version: "6.5.0"
sdks:
- dart: ">=2.18.0 <3.0.0"
- flutter: ">=3.3.0"
+ dart: ">=3.5.3 <4.0.0"
+ flutter: ">=3.24.0"
diff --git a/example/pubspec.yaml b/example/pubspec.yaml
index 8631553..f6b0b41 100644
--- a/example/pubspec.yaml
+++ b/example/pubspec.yaml
@@ -18,7 +18,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
- sdk: ">=2.7.0 <3.0.0"
+ sdk: "^3.5.3"
dependencies:
flutter:
@@ -29,9 +29,11 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
- image_picker: ^0.8.7
+ image_picker: ^1.1.2
image: ^4.0.15
path_provider: ^2.0.13
+ open_filex: ^4.5.0
+ file_picker: ^8.0.7
dev_dependencies:
flutter_test:
diff --git a/lib/chatwoot_callbacks.dart b/lib/chatwoot_callbacks.dart
index 1a4c50e..32e0f86 100644
--- a/lib/chatwoot_callbacks.dart
+++ b/lib/chatwoot_callbacks.dart
@@ -2,6 +2,7 @@ import 'package:chatwoot_sdk/data/chatwoot_repository.dart';
import 'package:chatwoot_sdk/data/local/entity/chatwoot_message.dart';
import 'package:chatwoot_sdk/data/remote/chatwoot_client_exception.dart';
import 'package:chatwoot_sdk/data/remote/responses/chatwoot_event.dart';
+import 'package:chatwoot_sdk/data/remote/responses/csat_survey_response.dart';
///Chatwoot callback are specified for each created client instance. Methods are triggered
///when a method satisfying their respective conditions occur.
@@ -62,7 +63,10 @@ class ChatwootCallbacks {
void Function(List)? onMessagesRetrieved;
///Triggered when an agent resolves the current conversation
- void Function()? onConversationResolved;
+ void Function(String)? onConversationResolved;
+
+ ///Triggered when csat feedbaack is sent
+ void Function(CsatSurveyFeedbackResponse)? onCsatSurveyResponseRecorded;
/// Triggered when any error occurs in chatwoot client's operations with the error
///
@@ -84,6 +88,7 @@ class ChatwootCallbacks {
this.onConversationIsOnline,
this.onConversationIsOffline,
this.onConversationResolved,
+ this.onCsatSurveyResponseRecorded,
this.onError,
});
}
diff --git a/lib/chatwoot_client.dart b/lib/chatwoot_client.dart
index 0e12d7a..d45afae 100644
--- a/lib/chatwoot_client.dart
+++ b/lib/chatwoot_client.dart
@@ -4,10 +4,12 @@ import 'package:chatwoot_sdk/data/local/entity/chatwoot_contact.dart';
import 'package:chatwoot_sdk/data/local/entity/chatwoot_conversation.dart';
import 'package:chatwoot_sdk/data/remote/requests/chatwoot_action_data.dart';
import 'package:chatwoot_sdk/data/remote/requests/chatwoot_new_message_request.dart';
+import 'package:chatwoot_sdk/data/remote/requests/send_csat_survey_request.dart';
import 'package:chatwoot_sdk/di/modules.dart';
import 'package:chatwoot_sdk/chatwoot_parameters.dart';
import 'package:chatwoot_sdk/repository_parameters.dart';
import 'package:riverpod/riverpod.dart';
+import 'package:uuid/uuid.dart';
import 'data/local/local_storage.dart';
@@ -55,8 +57,8 @@ class ChatwootClient {
/// [ChatwootMessage] will be returned with the [echoId] on [ChatwootCallbacks.onMessageSent]. If
/// message fails to send [ChatwootCallbacks.onError] will be triggered [echoId] as data.
Future sendMessage(
- {required String content, required String echoId}) async {
- final request = ChatwootNewMessageRequest(content: content, echoId: echoId);
+ {required String content, required String echoId, List? attachment}) async {
+ final request = ChatwootNewMessageRequest(content: content, echoId: echoId, attachments: attachment ?? []);
await _repository.sendMessage(request);
}
@@ -67,6 +69,11 @@ class ChatwootClient {
_repository.sendAction(action);
}
+ ///Send chatwoot csat survey results.
+ Future sendCsatSurveyResults(String conversationUuid, int rating, String feedback) async {
+ _repository.sendCsatFeedBack(conversationUuid, SendCsatSurveyRequest(rating: rating, feedbackMessage: feedback));
+ }
+
///Disposes chatwoot client and cancels all stream subscriptions
dispose() {
final container = providerContainerMap[_parameters.clientInstanceKey]!;
@@ -87,7 +94,8 @@ class ChatwootClient {
/// handling chatwoot events. By default persistence is enabled, to disable persistence set [enablePersistence] as false
static Future create(
{required String baseUrl,
- required String inboxIdentifier,
+ required String inboxIdentifier,
+ String? userIdentityValidationKey,
ChatwootUser? user,
bool enablePersistence = true,
ChatwootCallbacks? callbacks}) async {
@@ -103,10 +111,28 @@ class ChatwootClient {
isPersistenceEnabled: enablePersistence,
baseUrl: baseUrl,
inboxIdentifier: inboxIdentifier,
- userIdentifier: user?.identifier);
+ userIdentityValidationKey: userIdentityValidationKey);
+
+ ChatwootUser? chatUser = user;
+ if(userIdentityValidationKey != null && user != null ){
+ final userIdentifier = user.identifier ?? user.email ?? Uuid().v4();
+ final identifierHash = chatwootParams.generateHmacHash(userIdentityValidationKey, userIdentifier);
+ chatUser = ChatwootUser(
+ identifier: userIdentifier,
+ identifierHash: identifierHash,
+ name: user.name,
+ email: user.email,
+ avatarUrl: user.avatarUrl,
+ customAttributes: user.customAttributes
+ );
+ }
final client =
- ChatwootClient._(chatwootParams, callbacks: callbacks, user: user);
+ ChatwootClient._(
+ chatwootParams,
+ callbacks: callbacks,
+ user: chatUser
+ );
client._init();
diff --git a/lib/chatwoot_parameters.dart b/lib/chatwoot_parameters.dart
index d8dc5db..4c914d8 100644
--- a/lib/chatwoot_parameters.dart
+++ b/lib/chatwoot_parameters.dart
@@ -1,18 +1,35 @@
+import 'dart:convert';
+
import 'package:equatable/equatable.dart';
+import 'package:crypto/crypto.dart';
class ChatwootParameters extends Equatable {
final bool isPersistenceEnabled;
final String baseUrl;
final String clientInstanceKey;
final String inboxIdentifier;
- final String? userIdentifier;
+ final String? userIdentityValidationKey;
ChatwootParameters(
{required this.isPersistenceEnabled,
required this.baseUrl,
required this.inboxIdentifier,
required this.clientInstanceKey,
- this.userIdentifier});
+ this.userIdentityValidationKey});
+
+
+ String generateHmacHash(String key, String userIdentifier) {
+ // Convert the key and message to bytes
+ final keyBytes = utf8.encode(key);
+ final messageBytes = utf8.encode(userIdentifier);
+
+ // Create the HMAC using SHA256
+ final hmac = Hmac(sha256, keyBytes);
+
+ final digest = hmac.convert(messageBytes);
+
+ return digest.toString();
+ }
@override
List