Skip to content

Commit 8dd559b

Browse files
committed
fix: avoid using getClipboardFiles() if unsupported on the current platform
1 parent 49569e4 commit 8dd559b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/src/editor_toolbar_controller_shared/clipboard/default_clipboard_service.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ class DefaultClipboardService extends ClipboardService {
4848
}
4949

5050
Future<String?> _getClipboardFile({required String fileExtension}) async {
51+
if (!(await QuillNativeBridge.isSupported(
52+
QuillNativeBridgeFeature.getClipboardFiles))) {
53+
return null;
54+
}
5155
if (kIsWeb) {
5256
// TODO: Can't read file with dart:io on the Web (See related https://github.com/FlutterQuill/quill-native-bridge/issues/6)
5357
return null;

0 commit comments

Comments
 (0)