Skip to content

An open-source cross-platform alternative to AirDrop

style: format

Tien Do Nam999df21c3b8d
diff --git a/app/lib/util/native/file_picker.dart b/app/lib/util/native/file_picker.dart
index 6057ee0a..4f76ead7 100644
--- a/app/lib/util/native/file_picker.dart
+++ b/app/lib/util/native/file_picker.dart
@@ -284,26 +284,28 @@ Future<void> _pickClipboard(BuildContext context, Ref ref) async {
final List<String> files = await Pasteboard.files();
if (files.isNotEmpty) {
- await ref.redux(selectedSendingFilesProvider).dispatchAsync(AddFilesAction(
- files: files.map((e) => XFile(e)).toList(),
- converter: (file) async {
- if (!file.path.startsWith('content://')) {
- return CrossFileConverters.convertXFile(file);
- }
- // handle content uri
- return CrossFile(
- name: file.name,
- fileType: file.name.guessFileType(),
- size: await _uriContent.getContentLength(Uri.parse(file.path)) ?? -1,
- path: file.path,
- thumbnail: null,
- asset: null,
- bytes: null,
- lastModified: null,
- lastAccessed: null,
+ await ref.redux(selectedSendingFilesProvider).dispatchAsync(
+ AddFilesAction(
+ files: files.map((e) => XFile(e)).toList(),
+ converter: (file) async {
+ if (!file.path.startsWith('content://')) {
+ return CrossFileConverters.convertXFile(file);
+ }
+ // handle content uri
+ return CrossFile(
+ name: file.name,
+ fileType: file.name.guessFileType(),
+ size: await _uriContent.getContentLength(Uri.parse(file.path)) ?? -1,
+ path: file.path,
+ thumbnail: null,
+ asset: null,
+ bytes: null,
+ lastModified: null,
+ lastAccessed: null,
+ );
+ },
+ ),
);
- },
- ));
return;
}