Skip to main content
SDK 2.0.0. Class: FBEngine. No singleton. Auth: License & Auth. Enums: Parameter enums.
Flutter only sets parameters. Live video frames never enter Dart. TRTC / push SDKs feed textures on the native GL thread — see TRTC integration.

Add the plugin

Logging

Call before FBEngine.create:

Create

Provide appId + appKey, or licenseToken (license token string, {token} JSON, or native offline .lic). Token wins if both are set.
FBEngine.version reads the native SDK version string.

Skin, reshape, makeup

Intensity setters are synchronous — safe in Slider.onChanged. Skin [0.0, 1.0]:
Reshape [-1.0, 1.0]:
Makeup (intensity + style/color). Full enums: Parameter enums.

Filter, sticker, virtual background

Path or Uint8List bytes — not both. These return Future (file decode + GPU upload).
Chroma key (sync), same as native:
Chroma key is the mask; fill is still blur or a background image.

Events and stats

Still images

Use a separate engine with externalContext: false. Do not call these on a TRTC engine, and do not process TRTC video from Dart.
FBBitmap.pixels is RGBA8888 (stride == width * 4).

Errors

Setters and async tasks throw FBException with codes 0, -1-8. See API reference.

Dispose

Stop TRTC custom preprocess first, then: