Files
ux/lib/ux.dart
agra fb00e98681 clipboard: add UxClipboard.readImage native bridge
Flutter's Clipboard API only exposes text shapes. Banlu's chat composer
needs image bytes from the system clipboard for desktop paste, so add
a UxClipboard facade backed by per-platform native plugins:

* iOS: prefer raw PNG/JPEG bytes off the pasteboard, fall back to
  re-encoding `UIPasteboard.image` as PNG.
* macOS: prefer NSPasteboard `.png`, fall back to TIFF transcoded
  through NSBitmapImageRep so screenshots / Preview hand-offs still
  work.
* Android: read primary ClipData's first item URI and stream the bytes
  through ContentResolver — don't trust the clip description's MIME,
  copy whatever the resolver returns.

Returns null (never throws) when the clipboard has no image — callers
treat null as "fall through to text paste".
2026-05-09 07:29:14 +03:00

18 lines
536 B
Dart

/// Flutter toolkit for fluid, native-feeling UIs.
///
/// Includes [UxKeyboard] for frame-accurate keyboard height tracking,
/// [BendBox] for curved layout painting, and bezier curve utilities.
library;
export 'src/app_info.dart';
export 'src/bend_box.dart';
export 'src/json_extension.dart';
export 'src/bezier.dart';
export 'src/clipboard.dart';
export 'src/file.dart';
export 'src/keyboard.dart';
export 'src/auto_map.dart';
export 'src/scanner.dart';
export 'src/sensor.dart';
export 'src/functional.dart';
export 'src/log.dart';