This page matches SDK 2.0.0. Class:
FBEngine. Makeup / reshape enums: Parameter enums. Auth: Auth & License.FBEngineConfig
appId + appKey, or licenseToken. If licenseToken is non-empty it is used and online appId / appKey is skipped.
FBEngine
FBEngine.create. It is not a process-wide singleton. At most one externalContext: true engine can be bound to processTexture at a time.
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.
Body reshape
setBodyReshape(FBBodyReshape param, double intensity) — [0.0, 1.0]. Dart names: FBBodyReshape.bodySlim … torsoLong. Requires resource_body.fbd via addResourcePack first. Tables: Parameter enums. Packs: Optional resource packs.
Makeup
Filter / sticker / VB / chroma
path and data are mutually exclusive; exactly one is required. For 3D stickers and body reshape see Optional resource packs.
Photo
RequiresexternalContext: false. Throws StateError otherwise. Do not use for live preprocess video.
Observability
FBStats: fps, avgProcessTimeMs, sessionTimeSeconds.
FBEngineEvent: code, message, eventCode → FBEngineEventCode:
FBException
Thrown when a native call returns< 0.
Other types
FBBitmap—width,height,stride,pixels(RGBA8888 copy)FBLogLevel—trace…critical
Native texture (not Dart)
Aftercreate with externalContext: true, call on the vendor SDK GL thread. Only one live engine can be bound at a time; a second create(externalContext: true) throws until you dispose() the first. Still-image engines (externalContext: false) do not bind.
- iOS:
[FacebetterPlugin processTexture:width:height:] - Android:
FacebetterPlugin.processTexture(textureId, width, height)
0 on failure. Full snippets: Third-party Integration.
