XDrop class

Singleton bridge to the native ux/drop/events stream. Fans raw drag events out to the registered XDropRegions, each of which hit-tests its own bounds.

Subscribes lazily on the first region (zero native overhead until a drop region is mounted — so never on mobile, where no native handler exists) and then intentionally never cancels the subscription: cancelling when the listener set empties would lose a drop in flight when the last region is disposed mid-gesture (e.g. opening a chat) and thrash native onListen/ onCancel as list rows recycle during scroll. To stop the still-installed overlay from claiming a copy when nothing can accept, the active-region state is pushed to native over the ux/drop method channel as the listener set empties / fills.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startZip(XDropFile dir) → ZipJob
Start compressing a dropped directory (dir with XDropFile.isDirectory) into <temp>/ux_drops/<uuid>/<folder>.zip for upload. A folder / macOS package can't be uploaded as a single file. On macOS native zips it (ZIPFoundation) off the main thread, re-acquiring access from dir's security-scoped bookmark, and streams a determinate fraction back over _control; on Windows zipFolder writes it in an isolate, reporting the fraction of bytes read.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

instance → XDrop
Shared instance.
final