hyper_render_clipboard library

HyperRender Clipboard - Image clipboard support for HyperRender

This package provides full image clipboard functionality including:

  • Copying images to system clipboard (not just URLs)
  • Saving images to device storage
  • Sharing images via system share dialog

Installation

Add to your pubspec.yaml:

dependencies:
  hyper_render: ^1.0.0
  hyper_render_clipboard: ^1.0.0

Usage

import 'package:hyper_render/hyper_render.dart';
import 'package:hyper_render_clipboard/hyper_render_clipboard.dart';

// Use with HyperViewer
HyperViewer(
  html: '<img src="https://example.com/image.jpg">',
  imageClipboardHandler: SuperClipboardHandler(),
)

// Use with HyperImage directly
HyperImage(
  src: 'https://example.com/image.jpg',
  clipboardHandler: SuperClipboardHandler(),
)

Platform Setup

macOS

Add to macos/Runner/DebugProfile.entitlements and macos/Runner/Release.entitlements:

<key>com.apple.security.network.client</key>
<true/>

Android

Add to android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

iOS

No additional setup required.

Windows/Linux

No additional setup required.

Classes

DefaultImageClipboardHandler
Default implementation that only supports URL copying
ImageClipboardHandler
Interface for image clipboard and sharing operations.
ImageOperationResult
Result of an image operation
SuperClipboardHandler
Image clipboard handler using super_clipboard package