DataWriterItem class

Represents a single item in the clipboard. The item can have multiple renditions (each represented as entries in EncodedData). To get encoded data for values use DataFormat.call or DataFormat.lazy;

Available extensions

Constructors

DataWriterItem({String? suggestedName})

Properties

data List<FutureOr<EncodedData>>
no setter
hashCode int
The hash code for this object.
no setterinherited
onDisposed Listenable
Called when the native code is done with the item and the data is no longer needed. Only guaranteed to be called if onRegistered has been called before.
no setter
onRegistered Listenable
Invoked when the item is successfully registered with native code.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
suggestedName String?
File name suggestion for the client receiving this data item.
final
virtualFileSupported bool
no setter

Methods

add(FutureOr<EncodedData> data) → void
Adds representation to the data item. On item can contain multiple representations, each in a different format. Representation should be added by priority (highest fidelity content first), as some platforms respect the order.
addVirtualFile({required FileFormat format, required VirtualFileProvider provider, VirtualFileStorage? storageSuggestion}) → void
Adds a virtual file to this data item. Virtual files are files generated on demand, possibly taking long time to complete (i.e. downloading from internet).
asDataProvider() FutureOr<DataProvider>

Available on DataWriterItem, provided by the ClipboardWriterItemDataProvider extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerWithDataProvider(DataProvider provider) FutureOr<DataProviderHandle>

Available on DataWriterItem, provided by the ClipboardWriterItemDataProvider extension

toString() String
A string representation of this object.
inherited

Operators

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