Skip to content

Commit

Permalink
fix: avoid using getClipboardFiles() if unsupported on the current pl…
Browse files Browse the repository at this point in the history
…atform
  • Loading branch information
EchoEllet committed Oct 17, 2024
1 parent 49569e4 commit 8dd559b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ class DefaultClipboardService extends ClipboardService {
}

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

0 comments on commit 8dd559b

Please sign in to comment.