File tree Expand file tree Collapse file tree 5 files changed +0
-43
lines changed
Expand file tree Collapse file tree 5 files changed +0
-43
lines changed Original file line number Diff line number Diff line change 11import 'dart:io' ;
22
33import 'package:chatwoot_sdk/chatwoot_sdk.dart' ;
4- import 'package:file_picker/file_picker.dart' ;
54import 'package:flutter/material.dart' ;
65import 'package:flutter/services.dart' ;
76
@@ -60,7 +59,6 @@ class _MyHomePageState extends State<MyHomePage> {
6059 exit (0 );
6160 }
6261 },
63- onAttachFile: _pickFiles,
6462 onLoadStarted: () {
6563 print ("loading widget" );
6664 },
@@ -74,14 +72,5 @@ class _MyHomePageState extends State<MyHomePage> {
7472 );
7573 }
7674
77- Future <List <String >> _pickFiles () async {
78- FilePickerResult ? result = await FilePicker .platform.pickFiles (allowMultiple: true );
7975
80- if (result != null ) {
81- File file = File (result.files.single.path ?? '' );
82- return [file.uri.toString ()];
83- } else {
84- return [];
85- }
86- }
8776}
Original file line number Diff line number Diff line change @@ -48,14 +48,6 @@ packages:
4848 url: "https://pub.dev"
4949 source: hosted
5050 version: "1.18.0"
51- cross_file:
52- dependency: transitive
53- description:
54- name: cross_file
55- sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670"
56- url: "https://pub.dev"
57- source: hosted
58- version: "0.3.4+2"
5951 crypto:
6052 dependency: transitive
6153 description:
@@ -136,14 +128,6 @@ packages:
136128 url: "https://pub.dev"
137129 source: hosted
138130 version: "6.1.4"
139- file_picker:
140- dependency: "direct main"
141- description:
142- name: file_picker
143- sha256: "16dc141db5a2ccc6520ebb6a2eb5945b1b09e95085c021d9f914f8ded7f1465c"
144- url: "https://pub.dev"
145- source: hosted
146- version: "8.1.4"
147131 fixnum:
148132 dependency: transitive
149133 description:
@@ -261,14 +245,6 @@ packages:
261245 url: "https://pub.dev"
262246 source: hosted
263247 version: "2.2.1"
264- flutter_plugin_android_lifecycle:
265- dependency: transitive
266- description:
267- name: flutter_plugin_android_lifecycle
268- sha256: "9b78450b89f059e96c9ebb355fa6b3df1d6b330436e0b885fb49594c41721398"
269- url: "https://pub.dev"
270- source: hosted
271- version: "2.0.23"
272248 flutter_secure_storage:
273249 dependency: transitive
274250 description:
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ dependencies:
2929 # The following adds the Cupertino Icons font to your application.
3030 # Use with the CupertinoIcons class for iOS style icons.
3131 cupertino_icons : ^1.0.2
32- file_picker : ^8.1.4
3332 win32 : ^5.8.0
3433
3534dev_dependencies :
Original file line number Diff line number Diff line change @@ -23,8 +23,6 @@ class ChatwootWidget extends StatefulWidget {
2323 ///Additional information about the customer
2424 final customAttributes;
2525
26- ///Widget Attachment event. Currently supported only on Android devices
27- final Future <List <String >> Function ()? onAttachFile;
2826
2927 ///Widget Load started event
3028 final void Function ()? onLoadStarted;
@@ -42,7 +40,6 @@ class ChatwootWidget extends StatefulWidget {
4240 this .locale = "en" ,
4341 this .customAttributes,
4442 this .closeWidget,
45- this .onAttachFile,
4643 this .onLoadStarted,
4744 this .onLoadProgress,
4845 this .onLoadCompleted})
@@ -67,7 +64,6 @@ class _ChatwootWidgetState extends State<ChatwootWidget> {
6764 locale: widget.locale,
6865 customAttributes: widget.customAttributes,
6966 closeWidget: widget.closeWidget,
70- onAttachFile: widget.onAttachFile,
7167 onLoadStarted: widget.onLoadStarted,
7268 onLoadCompleted: widget.onLoadCompleted,
7369 onLoadProgress: widget.onLoadProgress,
Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ class Webview extends StatefulWidget {
1818 /// See [ChatwootWidget.closeWidget]
1919 final void Function ()? closeWidget;
2020
21- /// See [ChatwootWidget.onAttachFile]
22- final Future <List <String >> Function ()? onAttachFile;
2321
2422 /// See [ChatwootWidget.onLoadStarted]
2523 final void Function ()? onLoadStarted;
@@ -38,7 +36,6 @@ class Webview extends StatefulWidget {
3836 String locale = "en" ,
3937 customAttributes,
4038 this .closeWidget,
41- this .onAttachFile,
4239 this .onLoadStarted,
4340 this .onLoadProgress,
4441 this .onLoadCompleted,
You can’t perform that action at this time.
0 commit comments