XCameraEffectsBackend class abstract interface

None / Blur / Dim on the outgoing camera track, applied natively on the frames the call already publishes.

final effects = XCameraEffectsBackend.instance;
if (await effects.available()) {
  await effects.setEffect(trackId, XCameraEffect.blur);
}

One track carries an effect at a time, so clear names no track: it releases whichever one setEffect named last. Commands serialize, and one that fails leaves the next callable.

A command reports its own outcome by returning or throwing; status is the native processor's, and it is what reports a fault that arrives after a command has succeeded.

Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status → ValueListenable<XCameraEffectStatus>
What the native processor is delivering right now, starting at XCameraEffectStatus.idle.
no setter
supported → bool
Whether this platform family has a native processor. Elsewhere every method throws XCameraEffectsException with code unsupported.
no setter

Methods

available() → Future<bool>
Whether this host can effect frames — the OS version, the GPU profile and the installed bridge as well as the platform family.
clear() → Future<void>
Returns the effected track to its own frames, leaving status idle.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setEffect(String trackId, XCameraEffect effect) → Future<void>
Applies effect to the local video track trackId, releasing whichever track was effected before.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

instance ↔ XCameraEffectsBackend
The process-wide backend. Swap to inject a fake before any effect code runs.
getter/setter pair