Skip to main content
This page matches SDK 2.0.0. Class: FBEngine. Makeup / reshape enums: Parameter enums. Auth: License & Auth.

FBEngineConfig

Create with appId + appKey, or licenseToken. If licenseToken is non-empty it is used and online appId / appKey is skipped.

FBEngine

Create one instance with FBEngine.create. It is not a process-wide singleton. Beauty / reshape / makeup / chroma / blur / clear* / setFilterIntensity are synchronous. Filter, sticker, background image, and photo APIs return Future.

Skin

setSmoothing, setSmoothingStyle(FBSmoothingStyle), setWhitening, setWhiteningStyle(FBWhiteningStyle), setSharpening, setRosiness, setBeautySkinOnly(bool) — intensity [0, 1].

Reshape

setReshape(FBReshape param, double intensity)[-1.0, 1.0]. Dart names: FBReshape.faceThin, faceVShape, … browThickness. Tables: Parameter enums.

Makeup

Filter / sticker / VB / chroma

path and data are mutually exclusive; exactly one is required.

Photo

Requires externalContext: false. Throws StateError otherwise. Do not use for TRTC video.

Observability

FBStats: fps, avgProcessTimeMs, sessionTimeSeconds. FBEngineEvent: code, message, eventCodeFBEngineEventCode:

FBException

Thrown when a native call returns < 0.

Other types

  • FBBitmapwidth, height, stride, pixels (RGBA8888 copy)
  • FBLogLeveltracecritical
  • FBMirrornone, horizontal, vertical, both (not used on the TRTC texture path)
  • FBFace / FBFaceList / FBRect — landmark views (kLandmarkCount = 111) when enableLandmarks: true

Native texture (not Dart)

After create with externalContext: true, call on the TRTC GL thread:
  • iOS: [FacebetterPlugin processTexture:width:height:]
  • Android: FacebetterPlugin.processTexture(textureId, width, height)
Returns 0 on failure. Full snippets: TRTC integration.