BackgroundRemovalPort class abstract interface

Host-owned background removal.

Canvas treats sourceRef as opaque. The host may read, decode, process, encode, upload, persist, or remotely transform the source using any implementation it chooses.

Success returns a new durable source reference suitable for direct storage in the canvas document.

A successful result is not guaranteed to be adopted by the editor. The selected image may be deleted, replaced, rebound, or otherwise become stale while this asynchronous operation is running. Hosts must therefore tolerate successful outputs that temporarily remain unreferenced.

Canvas intentionally does not provide output cleanup or rollback hooks. Resource lifecycle and garbage collection remain host responsibilities.

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
removeBackground({required String sourceRef}) Future<BackgroundRemovalResult>
toString() String
A string representation of this object.
inherited

Operators

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