What is your question?
I use flutter version 3.16.3. flutter doctor and everything other is ok.
Here is some brief codes:
String dir = (await getTemporaryDirectory()).path;
String saveFileName = user.userName.replaceAll('/', '_')+ Constant.SAVE_FORMAT;
File saveFile = File('$dir/$saveFileName' );
Share.shareXFiles([XFile(saveFile.path)], text: 'sharing');
Here is the error log:
I/flutter ( 8533): parent: /storage/emulated/0/Android/data
I/flutter ( 8533): /storage/emulated/0/Android/data/com.tencent.mm/MicroMsg/Download
I/flutter ( 8533): delFile: /storage/emulated/0/Android/data/com.tencent.mm/MicroMsg/Download/B.E.G. DALI-LINK.beglnk
E/flutter ( 8533): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Share callback error, prior share-sheet did not call back, did you await it? Maybe use non-result variant, null, null)
E/flutter ( 8533): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651:7)
E/flutter ( 8533): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:322:18)
E/flutter ( 8533):
E/flutter ( 8533): #2 MethodChannelShare.shareFilesWithResult (package:share_plus_platform_interface/method_channel/method_channel_share.dart:140:9)
E/flutter ( 8533):
Checklist before submitting a question