Flutter chrome extension Pasteboard.image (clipboard image) returns null

30 views Asked by At

I created a webapp first and the following code works to copy image from clipboard:

final imageBytes = await Pasteboard.image;

Web app though gives a popup for permission before pasting the image but works.

I converted the app to flutter chrome extension. I don't get any popup for permission and the imageBytes is null.

I have already added following permissions in manifest.json:

"permissions": ["clipboardRead", "clipboardWrite"]
1

There are 1 answers

0
K246 On

[SOLVED] I had to add the permission from extension settings in "View Web Permissions". Changed "Clipboard permission" from "Ask" to "Allow" as shown in the image.

enter image description here