desktop_clipboard 0.0.1 copy "desktop_clipboard: ^0.0.1" to clipboard
desktop_clipboard: ^0.0.1 copied to clipboard

PlatformmacOS

A flutter plugin which could write images to clipboard.

desktop_clipboard #

A flutter plugin which could write images to clipboard.

Windows
Linux
macOS
iOS
Web

Desktop Clipboard

Getting Started #

  1. add package:pasteboard to pubspec.yaml

    dependencies:
      desktop_clipboard: ^latest
    
  2. example

    import 'package:file_picker/file_picker.dart';
    import 'package:desktop_clipboard/desktop_clipboard.dart';
       
    final _desktopClipboardPlugin = DesktopClipboard();
    
    Future<void> copyImageByPathToClipboard() async {
      final path = 'your_file_path';
      await _desktopClipboardPlugin
             .copyImageByPath(path);
    }
    
    Future<void> copyImageToClipboard() async {
     String base64Image =
         "iVBORw0KGgoAAAANSUhEUgAAAcIAAAHCCAYAAAB8GMlFAAAaJklEQVR4nO3d23LjOrItUPrE/v9f9nlYoeiKKtmmLJCYmTnGo0uNG0GmsCTN/vj8/Pw8AGCo/7d7AACwk0IIwGgKIQCjKYQAjKYQAjCaQgjAaAohAKMphACMphACMJpCCMBoCiEAoymEAIymEAIwmkIIwGgKIQCjKYQAjKYQAjCaQgjAaAohAKMphACMphACMJpCCMBoCiEAoymEAIymEAIwmkIIwGgKIQCjKYQAjKYQAjCaQgjAaAohAKMphACMphACMJpCCMBoCiEAoymEAIymEAIwmkIIwGgKIQCj/d/uAbzj4+Nj9xAu9fn5uXsIwCKeV7k+PguOvvuG+tuqS/T3un3V7tnXpVs9j13rp9+a8/iq3e4qPi9KFcJpG+pv71yqr9bu7zbPvi7d6nnsWj/93tPeFfve86rOM6PMZ4TTN9Vx/H4Nvvvf/flvZ1+XbvU8dq2ffu9p74p9X+l+uUqlNShTCAHgCiUKYaV3FlezFpDNPfo/VdaiRCEEgKvEF8Iq7yju9OqafPeh9Z//dvZ16VbPY9f66fee9lb263n1rwprEl8IWePZDf3O39Ktnseu9dNvzXlQS/zPJyq8m9gh/LLBSJ5Xz6U/r0ony5yVdhHcLMBXPK/u17o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PZyqPHaCyVoUQAF7VrhBWPFmljHlXokj6687qkLDRiX31XnuSZYr7+PiIKS7fSRznrkSR9L+dVT1ho5ukPZS0r9Lne7c2yTLfSZtixzkBVDXiB/Vppy4AcowohPxnV/JD5cSJ3+iSZLJa+v5LT25ZLT355k4tPyPkX7uSH6onTrwqKbUkaZ3T9196cstq6ck3d4svhJXeVdzl1TXZlfzQIXHiFV2STFZL33/pyS2rpSff7BBfCAHgSiUKoVPh/1gLgLVKFEIAuEqZQugk9Ps12JX80CFx4hVdkkxWS99/6cktq6Un3+wQ/4P6Z6p8ALvKqkvU5Wva6fx84rn0/efnE3N/PlGyED50L4iFLw1AGaV/UK9QAPCuMp8RAsAVFEIARlMIARhNIQRgNIUQgNEUQgBGUwgBGE0hBGA0hRCA0RRCAEZTCAEYTSEEYDSFEIDRFEIARlMIARhNIQRgNIUQgNEUQgBGUwgBGE0hBGA0hRCA0RRCAEZTCAEYTSEEYDSFEIDRFEIARlMIARhNIQRgNIUQgNEUQgBGUwgBGE0hBGA0hRCA0RRCAEZTCAEYTSEEYDSFEIDRFEIARlMIARjt/wPUQoqEog31YgAAAABJRU5ErkJggg==";
     Uint8List bytes = base64.decode(base64Image);
     await _desktopClipboardPlugin.copyImage(bytes);
    }
    

License #

See the LICENSE file for the full license.

1
likes
135
pub points
0%
popularity

Publisher

verified publisherleetao.me

A flutter plugin which could write images to clipboard.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on desktop_clipboard