3

I searched in google for how to copy an image to clipboard in flutter but I did not find any useful information. I only found in flutter documentation this:

"ClipboardData class:

Data stored on the system clipboard.

The system clipboard can contain data of various media types. This data structure currently supports only plain text data, in the text property."

https://api.flutter.dev/flutter/services/ClipboardData-class.html

Is it impossible to copy an image to clipboard in flutter right now?

ouzari
  • 81
  • 5
  • I am also looking for this use case. Given the lack of an answer here, and a cursory look at the code, it seems like it is not possible with the existing framework, and I cannot find a package which seems to support the clipboard with data types other than text. It is possible to create one using method channels, but is some work, I might have to try though. – Daniel Brotherston Mar 15 '21 at 20:50
  • @DanielBrotherston Any update if you got it working by a method channel – shivanshPurple May 07 '21 at 19:36

1 Answers1

1

I did not try and not sure if the answer is you looking for but you can give a try that first you can convert your image to Uint8List format with BASE64 decode and encode then copy it. for conversion you can check this. link

how-to-convert-base64-string-into-image-with-flutter

also check answers of this threat

how-to-send-image-through-post-using-json-in-flutter

Bilal Şimşek
  • 2,957
  • 1
  • 12
  • 24