copyImageToClipboard method

  1. @override
void copyImageToClipboard(
  1. String base64Image
)
override

Implementation

@override
void copyImageToClipboard(String base64Image) async {
  // Good idea, but not works, see issue https://github.com/dart-lang/sdk/issues/44816
  // final dataTransfer = html.DataTransfer();
  // final imageData = base64Decode(base64Image);

  // dataTransfer.setData('image/png', html.Blob([imageData]).toString());
  // await html.window.navigator.clipboard!.write(dataTransfer);

  // Copies image to clipboard as base64
  await html.window.navigator.clipboard!.writeText(base64Image);
}