diff --git a/lib/utils/fileInteraction/nativeFilePicker.dart b/lib/utils/fileInteraction/nativeFilePicker.dart index 11be48f..52cf6f6 100644 --- a/lib/utils/fileInteraction/nativeFilePicker.dart +++ b/lib/utils/fileInteraction/nativeFilePicker.dart @@ -9,19 +9,13 @@ void nativeFilePicker( {required FileType type, required BuildContext context, required widget, - required Function onUploadSuccess, - required Function onUploadStarted}) async { + required Function onUploadSuccess}) async { try { final _paths = (await FilePicker.platform.pickFiles( type: type, )) ?.files; if (_paths != null && _paths.first.path != null) { - onUploadStarted(_paths - .map((e) => PapercupsAttachment( - fileName: e.name, - )) - .toList()); Alert.show( "Uploading...", context, diff --git a/lib/widgets/sendMessage/sendMessage.dart b/lib/widgets/sendMessage/sendMessage.dart index ee8fbfc..0329cf9 100644 --- a/lib/widgets/sendMessage/sendMessage.dart +++ b/lib/widgets/sendMessage/sendMessage.dart @@ -154,27 +154,6 @@ class _SendMessageState extends State { onSelected: (type) => nativeFilePicker( context: context, onUploadSuccess: _onUploadSuccess, - onUploadStarted: (List files) { - List fileIds = files.map((e) => e.id ?? "").toList(); - _sendMessage( - _msgFocusNode, - _msgController, - widget.customer, - widget.props, - widget.setCustomer, - widget.conversation, - widget.setConversation, - widget.setConversationChannel, - widget.conversationChannel, - widget.socket, - widget.setState, - widget.messages, - widget.sending, - files, - fileIds, - true, - ); - }, type: type, widget: widget, ),