< Flutter UIKit />
UTD Video Effects Kit
ریئل-ٹائم بیوٹی فلٹرز، LUT کلر گریڈنگ اور فیس ایفیکٹس۔
import 'package:utd_video_effects_kit/utd_video_effects_kit.dart';
final fx = VideoEffectsProcessor.create();
final track = await LocalVideoTrack.createCameraTrack(
CameraCaptureOptions(processor: fx),
);
await fx.setSmoothing(0.6);
await fx.setFilter('teal_orange', intensity: 0.8);
await fx.setBackgroundBlur(0.4);
await fx.setEyeColor('#3366CC', opacity: 0.6);
await fx.setLipstick('#CC2244');
// Or use the built-in UI:
VideoEffectsSheet.show(context, processor: fx);46+
LUT فلٹرز
9
لوازمات
6
میک اپ لُکس
GPU
ریئل-ٹائم
< utd_video_effects_kit />
اہم خصوصیات
LiveKit پر مبنی Flutter ایپس کے لیے ریئل-ٹائم ویڈیو ایفیکٹس اور بیوٹی فلٹرز۔ ایفیکٹس نیٹیو GPU پائپ لائنز (Android/iOS) پر TrackProcessor کے ذریعے چلتے ہیں، جن میں 46+ LUT کلر فلٹرز، اسکن اسموتھنگ/وائٹننگ، بیک گراؤنڈ بلر اور MediaPipe سے چلنے والے فیس ایفیکٹس (آنکھوں کا رنگ، میک اپ، لوازمات) شامل ہیں۔ اس میں Beauty/Filters/Makeup/Accessories ٹیبز کے ساتھ ایک بلٹ-اِن VideoEffectsSheet UI بھی ہے۔
46+ LUT کلر فلٹرز (منتخب + اِن-ہاؤس لُکس)
بیوٹی ایفیکٹس: اسکن اسموتھنگ (frequency separation)، وائٹننگ، بیک گراؤنڈ بلر
MediaPipe کے ذریعے فیس ایفیکٹس: آنکھوں کا رنگ، میک اپ (لپ اسٹک/آئی شیڈو/بلش)، 9 لوازمات
کلر پوسٹ-پروسیسنگ: glow/bloom (Orton)، فلم گرین، vignette
اسکن ری ٹچ: ٹیکسچر ڈیٹیل، کلیریٹی، منتخب برائٹننگ
فیس ری شیپ: لینڈ مارک پر مبنی warp (آنکھیں بڑی کرنا، چہرہ پتلا، ناک پتلی، …)
ڈراپ-اِن VideoEffectsSheet UI (Beauty/Filters/Makeup/Accessories ٹیبز)
منتخب میک اپ لُکس اور اسکن-ٹون پری سیٹس
ڈیوائس پرفارمنس ٹیئرز کے ساتھ ایڈاپٹیو فریم-بجٹ مینجمنٹ
LocalVideoTrack سے zero-glue LiveKit TrackProcessor اٹیچمنٹ
< utd_video_effects_kit />
شروع کریں
انسٹال کریں
dependencies:
utd_video_effects_kit: ^0.5.0< utd_video_effects_kit />
API حوالہ
Main processor
The single public entry point: a LiveKit TrackProcessor that applies GPU beauty/filter effects natively.
VideoEffectsProcessorclassabstract class VideoEffectsProcessor extends TrackProcessor<VideoProcessorOptions>LiveKit-compatible video processor that applies GPU beauty/filter effects natively and exposes the result via processedTrack. Has no per-frame process() hook; pixel work runs natively.
VideoEffectsProcessor.createconstructorfactory VideoEffectsProcessor.create({EffectsState initial = const EffectsState()})Builds the default native-backed implementation. The only way to construct a processor.
پیرامیٹرز
initialEffectsStateڈیفالٹ = const EffectsState()Initial effect settings the processor starts with.
واپسی: VideoEffectsProcessor — A native-backed processor instance.
stategetterValueListenable<EffectsState> get stateLive, read-only snapshot of current effect settings. Bind UI to this.
واپسی: ValueListenable<EffectsState> — Listenable of the current immutable EffectsState.
isSupportedgetterbool get isSupportedWhether this device/platform can actually process pixels. False means processedTrack is a passthrough (original camera frames flow unmodified).
واپسی: bool — True if native pixel processing is available.
disposemethodvoid dispose()Final teardown: releases the effect-state listenable. Call when the live session ends. Distinct from LiveKit's per-capture destroy().
واپسی: void — Nothing.
Adaptive performance & telemetry
Frame-budget signals and on-device measurement/parity harness.
budgetExceededgetterValueListenable<bool> get budgetExceededTrue while the native pipeline sheds work to hold the frame budget (degrade level > 0). Emits only on change. Always false on unsupported platforms.
واپسی: ValueListenable<bool> — Listenable performance-mode flag.
degradeLevelgetterValueListenable<int> get degradeLevelCurrent adaptive frame-budget degrade level: 0 (full quality) .. 4 (max shedding). 0 on unsupported platforms.
واپسی: ValueListenable<int> — Listenable degrade level 0..4.
deviceTiergetterValueListenable<int> get deviceTierStatic device performance tier classified natively at attach: 0 Budget, 1 Low, 2 Mid, 3 Flagship. 3 on unsupported platforms or before first attach.
واپسی: ValueListenable<int> — Listenable device tier 0..3.
perfStatsmethodasyncFuture<EffectsPerfStats?> perfStats({bool reset = false})Pulls a snapshot of native frame-budget telemetry (over-budget rate + frame-time distribution). Returns null on web/unsupported or with no native session.
پیرامیٹرز
resetboolڈیفالٹ = falseClear counters after reading so the next call measures a fresh window.
واپسی: Future<EffectsPerfStats?> — Telemetry snapshot, or null if unavailable.
renderTestFramemethodasyncFuture<EffectsTestFrame?> renderTestFrame(Uint8List rgba, {required int width, required int height})Runs an RGBA8888 image through the native COLOR grade with current settings and returns the processed RGBA8888 (CPU-vs-GPU parity harness). Call with effects disabled. Returns null if unavailable.
پیرامیٹرز
rgbaUint8ListلازمیRGBA8888 row-major input, width*height*4 bytes.
widthintلازمیInput image width in pixels.
heightintلازمیInput image height in pixels.
واپسی: Future<EffectsTestFrame?> — Graded output frame, or null if unavailable.
Beauty & color setters
Skin smoothing, whitening, LUT filters, and the color-post (glow/grain/vignette) tail.
setEnabledmethodasyncFuture<void> setEnabled(bool enabled)Master on/off switch. When off the native pipeline is a 1:1 passthrough.
پیرامیٹرز
enabledboolلازمیWhether effects are applied.
واپسی: Future<void> — Completes when applied.
setSmoothingmethodasyncFuture<void> setSmoothing(double amount)Skin-smoothing strength, 0.0..1.0 (frequency-separation / bilateral).
پیرامیٹرز
amountdoubleلازمیSmoothing strength, 0.0..1.0 (0 = off).
واپسی: Future<void> — Completes when applied.
setWhiteningmethodasyncFuture<void> setWhitening(double amount)Whitening / brightness strength, 0.0..1.0.
پیرامیٹرز
amountdoubleلازمیWhitening strength, 0.0..1.0 (0 = off).
واپسی: Future<void> — Completes when applied.
setFiltermethodasyncFuture<void> setFilter(String? lutAssetKey, {double intensity = 1.0})Apply a LUT color filter by key (null clears it). See VideoEffectsFilters.
پیرامیٹرز
lutAssetKeyString?لازمیFilter key (e.g. 'warm'), or null to clear.
intensitydoubleڈیفالٹ = 1.0Blend amount, 0.0..1.0.
واپسی: Future<void> — Completes when applied.
setBackgroundBlurmethodasyncFuture<void> setBackgroundBlur(double amount)Background-blur strength, 0.0..1.0 (selfie segmentation + blur).
پیرامیٹرز
amountdoubleلازمیBlur strength, 0.0..1.0 (0 = off).
واپسی: Future<void> — Completes when applied.
setGlowmethodasyncFuture<void> setGlow(double amount)Soft glow / bloom (Orton) strength, 0.0..1.0. The highest-impact beauty color post effect.
پیرامیٹرز
amountdoubleلازمیGlow strength, 0.0..1.0 (0 = off).
واپسی: Future<void> — Completes when applied.
setGrainmethodasyncFuture<void> setGrain(double amount)Film-grain amount, 0.0..1.0 (animated per frame).
پیرامیٹرز
amountdoubleلازمیGrain amount, 0.0..1.0 (0 = off).
واپسی: Future<void> — Completes when applied.
setVignettemethodasyncFuture<void> setVignette(double amount)Vignette strength, 0.0..1.0 (darkens frame corners).
پیرامیٹرز
amountdoubleلازمیVignette strength, 0.0..1.0 (0 = off).
واپسی: Future<void> — Completes when applied.
setTextureDetailmethodasyncFuture<void> setTextureDetail(double amount)Pore/texture retained by frequency-separation smoothing, 0.0..1.0 (0 = plastic, 1 = full texture). Only affects skin when smoothing > 0.
پیرامیٹرز
amountdoubleلازمیTexture retention, 0.0..1.0.
واپسی: Future<void> — Completes when applied.
setClaritymethodasyncFuture<void> setClarity(double amount)Local-contrast clarity, signed -1.0..1.0. Positive = punchy/pop, negative = soft dreamy skin. 0 = off.
پیرامیٹرز
amountdoubleلازمیSigned clarity, -1.0..1.0.
واپسی: Future<void> — Completes when applied.
Skin retouch & tone
Selective brightening (teeth/eye/under-eye) and skin-tone presets/shift.
setTeethWhiteningmethodasyncFuture<void> setTeethWhitening(double amount)Teeth-whitening strength, 0.0..1.0 (0 = off).
پیرامیٹرز
amountdoubleلازمیTeeth-whitening strength, 0.0..1.0.
واپسی: Future<void> — Completes when applied.
setEyeBrighteningmethodasyncFuture<void> setEyeBrightening(double amount)Eye-white (sclera) brightening, 0.0..1.0 (0 = off).
پیرامیٹرز
amountdoubleلازمیEye-white brightening strength, 0.0..1.0.
واپسی: Future<void> — Completes when applied.
setUnderEyeBrighteningmethodasyncFuture<void> setUnderEyeBrightening(double amount)Under-eye (tear-trough) brightening, 0.0..1.0 (0 = off).
پیرامیٹرز
amountdoubleلازمیUnder-eye brightening strength, 0.0..1.0.
واپسی: Future<void> — Completes when applied.
setSkinColormethodasyncFuture<void> setSkinColor(String? presetKey)Apply a skin-tone preset by key (null clears it). See VideoEffectsSkinTones.
پیرامیٹرز
presetKeyString?لازمیSkin-tone preset key (e.g. 'nuanbai'), or null to clear.
واپسی: Future<void> — Completes when applied.
setSkinToneShiftmethodasyncFuture<void> setSkinToneShift(double amount)Skin-tone shift, signed -1.0..1.0: warms (+) or cools (-) skin via hue rotation gated by the adaptive skin mask. 0 = off.
پیرامیٹرز
amountdoubleلازمیSigned skin-tone shift, -1.0..1.0.
واپسی: Future<void> — Completes when applied.
setSegmentationSkinmethodasyncFuture<void> setSegmentationSkin(bool enabled)Use multiclass segmentation to refine the skin region so skin effects apply to actual skin. Loads a larger/slower model. Default off.
پیرامیٹرز
enabledboolلازمیWhether segmentation-refined skin masking is on.
واپسی: Future<void> — Completes when applied.
Makeup, sculpt & reshape setters
Landmark-driven makeup recolor, dodge/burn sculpt, and liquify reshape.
setEyeColormethodasyncFuture<void> setEyeColor(String? hex, {double opacity = 0.5})Recolor the iris with hex (e.g. '#3366CC', null clears it).
پیرامیٹرز
hexString?لازمیIris color hex, or null to clear.
opacitydoubleڈیفالٹ = 0.5Recolor strength, 0.0..1.0.
واپسی: Future<void> — Completes when applied.
setLipstickmethodasyncFuture<void> setLipstick(String? hex, {double opacity = 0.6, String finish = 'satin', String style = 'full'})Apply lipstick in hex (null clears it). finish: matte/satin/gloss. style: full/ombre/blurred.
پیرامیٹرز
hexString?لازمیLipstick color hex, or null to clear.
opacitydoubleڈیفالٹ = 0.6Strength, 0.0..1.0.
finishStringڈیفالٹ = 'satin'matte, satin, or gloss.
styleStringڈیفالٹ = 'full'full, ombre, or blurred.
واپسی: Future<void> — Completes when applied.
setEyeshadowmethodasyncFuture<void> setEyeshadow(String? hex, {double opacity = 0.45, String? color2, double shimmer = 0})Apply eyeshadow in hex (null clears it). color2 gives a two-tone gradient; shimmer adds sparkle.
پیرامیٹرز
hexString?لازمیEyeshadow color hex, or null to clear.
opacitydoubleڈیفالٹ = 0.45Strength, 0.0..1.0.
color2String?ڈیفالٹ = nullSecond hex for a two-tone (darker lash-line) gradient.
shimmerdoubleڈیفالٹ = 0Sparkle amount, 0.0..1.0.
واپسی: Future<void> — Completes when applied.
setBlushmethodasyncFuture<void> setBlush(String? hex, {double opacity = 0.4})Apply blush in hex (null clears it).
پیرامیٹرز
hexString?لازمیBlush color hex, or null to clear.
opacitydoubleڈیفالٹ = 0.4Strength, 0.0..1.0.
واپسی: Future<void> — Completes when applied.
setEyelinermethodasyncFuture<void> setEyeliner(String? hex, {double opacity = 0.7, String style = 'classic'})Apply eyeliner in hex (null clears it). style: classic or wing (adds an outer flick).
پیرامیٹرز
hexString?لازمیEyeliner color hex, or null to clear.
opacitydoubleڈیفالٹ = 0.7Strength, 0.0..1.0.
styleStringڈیفالٹ = 'classic'classic or wing.
واپسی: Future<void> — Completes when applied.
setMakeupLookmethodasyncFuture<void> setMakeupLook(MakeupLook? look)Apply a coordinated MakeupLook in one call (lipstick + finish, eyeshadow, blush, eye color). Null clears all makeup regions. See VideoEffectsMakeup.looks.
پیرامیٹرز
lookMakeupLook?لازمیThe look to apply, or null to clear all makeup.
واپسی: Future<void> — Completes when applied.
setContourmethodasyncFuture<void> setContour(double amount)Contour (cool-gray cheek/nose burn) strength, 0.0..1.0 (0 = off).
پیرامیٹرز
amountdoubleلازمیContour strength, 0.0..1.0.
واپسی: Future<void> — Completes when applied.
setHighlightmethodasyncFuture<void> setHighlight(double amount)Highlight (warm-white dodge on high points) strength, 0.0..1.0 (0 = off).
پیرامیٹرز
amountdoubleلازمیHighlight strength, 0.0..1.0.
واپسی: Future<void> — Completes when applied.
setEyeEnlargemethodasyncFuture<void> setEyeEnlarge(double amount)Eye-enlarge reshape strength, 0.0..1.0 (0 = off).
پیرامیٹرز
amountdoubleلازمیEye-enlarge strength, 0.0..1.0.
واپسی: Future<void> — Completes when applied.
setFaceSlimmethodasyncFuture<void> setFaceSlim(double amount)Face-slim reshape strength, 0.0..1.0 (0 = off).
پیرامیٹرز
amountdoubleلازمیFace-slim strength, 0.0..1.0.
واپسی: Future<void> — Completes when applied.
setNoseNarrowmethodasyncFuture<void> setNoseNarrow(double amount)Nose-narrow reshape strength, 0.0..1.0 (0 = off).
پیرامیٹرز
amountdoubleلازمیNose-narrow strength, 0.0..1.0.
واپسی: Future<void> — Completes when applied.
setLipPlumpmethodasyncFuture<void> setLipPlump(double amount)Lip-plump reshape strength, 0.0..1.0 (0 = off).
پیرامیٹرز
amountdoubleلازمیLip-plump strength, 0.0..1.0.
واپسی: Future<void> — Completes when applied.
setChinShortenmethodasyncFuture<void> setChinShorten(double amount)Chin-shorten reshape strength, 0.0..1.0 (0 = off).
پیرامیٹرز
amountdoubleلازمیChin-shorten strength, 0.0..1.0.
واپسی: Future<void> — Completes when applied.
Accessories setters
Toggle landmark-positioned PNG overlays. One toggle per accessory.
setGlassesmethodasyncFuture<void> setGlasses(bool enabled)Toggle the glasses accessory overlay.
پیرامیٹرز
enabledboolلازمیWhether the glasses overlay is shown.
واپسی: Future<void> — Completes when applied.
setSunglassesmethodasyncFuture<void> setSunglasses(bool enabled)Toggle the sunglasses accessory overlay.
پیرامیٹرز
enabledboolلازمیWhether the sunglasses overlay is shown.
واپسی: Future<void> — Completes when applied.
setCrownmethodasyncFuture<void> setCrown(bool enabled)Toggle the crown accessory overlay.
پیرامیٹرز
enabledboolلازمیWhether the crown overlay is shown.
واپسی: Future<void> — Completes when applied.
setCatEarsmethodasyncFuture<void> setCatEars(bool enabled)Toggle the cat-ears accessory overlay.
پیرامیٹرز
enabledboolلازمیWhether the cat-ears overlay is shown.
واپسی: Future<void> — Completes when applied.
setFlowerCrownmethodasyncFuture<void> setFlowerCrown(bool enabled)Toggle the flower-crown accessory overlay.
پیرامیٹرز
enabledboolلازمیWhether the flower-crown overlay is shown.
واپسی: Future<void> — Completes when applied.
setPartyHatmethodasyncFuture<void> setPartyHat(bool enabled)Toggle the party-hat accessory overlay.
پیرامیٹرز
enabledboolلازمیWhether the party-hat overlay is shown.
واپسی: Future<void> — Completes when applied.
setBunnyEarsmethodasyncFuture<void> setBunnyEars(bool enabled)Toggle the bunny-ears accessory overlay.
پیرامیٹرز
enabledboolلازمیWhether the bunny-ears overlay is shown.
واپسی: Future<void> — Completes when applied.
setMustachemethodasyncFuture<void> setMustache(bool enabled)Toggle the mustache accessory overlay.
پیرامیٹرز
enabledboolلازمیWhether the mustache overlay is shown.
واپسی: Future<void> — Completes when applied.
setHalomethodasyncFuture<void> setHalo(bool enabled)Toggle the halo accessory overlay.
پیرامیٹرز
enabledboolلازمیWhether the halo overlay is shown.
واپسی: Future<void> — Completes when applied.
Built-in UI
Drop-in bottom sheet that drives a processor with Beauty/Filters/Makeup/Accessories tabs.
VideoEffectsSheetclassclass VideoEffectsSheetSelf-contained beauty & filters bottom sheet (Beauty / Filters / Makeup / Accessories tabs) that drives a VideoEffectsProcessor. Dark over-video styling; accent from theme primary; auto Arabic labels.
VideoEffectsSheet.showmethodasyncstatic Future<void> show(BuildContext context, {required VideoEffectsProcessor processor, double heightFactor = defaultHeightFactor})Opens the beauty & filters sheet for processor. Turns the master switch on (idempotent), then shows a modal bottom sheet. Returns when dismissed.
پیرامیٹرز
contextBuildContextلازمیBuild context to show the modal in.
processorVideoEffectsProcessorلازمیThe processor the sheet controls.
heightFactordoubleڈیفالٹ = defaultHeightFactor (0.25)Sheet height as a fraction of screen height.
واپسی: Future<void> — Completes when the sheet is dismissed.
defaultHeightFactorpropertystatic const double defaultHeightFactor = 0.25Default sheet height as a fraction of the screen height (1/4).
واپسی: double — 0.25
Catalogs (filters, skin tones, accessories, makeup)
Pure-data catalogs of bundled LUT filters, skin-tone presets, accessories, and makeup shades/looks.
VideoEffectsFiltersclassclass VideoEffectsFiltersCatalog of bundled LUT color filters (45+ entries). Static-only (private constructor).
VideoEffectsFilters.allpropertystatic const List<VideoEffectFilter> allAll bundled LUT filters, in display order (fresh, night, autumn, clean_girl, teal_orange, etc.).
واپسی: List<VideoEffectFilter> — Bundled filter catalog.
VideoEffectsFilters.assetFormethodstatic String? assetFor(String? key)The LUT asset path for a filter key, or null for an unknown/cleared key.
پیرامیٹرز
keyString?لازمیFilter key to resolve.
واپسی: String? — Asset path or null.
VideoEffectsFilters.previewFormethodstatic String previewFor(String? key)Preview thumbnail asset path for a filter key (portrait with filter applied). Null gives the unfiltered 'none' preview.
پیرامیٹرز
keyString?لازمیFilter key, or null for the 'none' preview.
واپسی: String — Preview asset path.
VideoEffectsFilters.skinPreviewFormethodstatic String skinPreviewFor(String? key)Preview thumbnail asset path for a skin-tone preset (same portrait, skin LUT grade).
پیرامیٹرز
keyString?لازمیSkin-tone key, or null for the 'none' preview.
واپسی: String — Preview asset path.
VideoEffectFilterclassclass VideoEffectFilter { const VideoEffectFilter(this.key, this.label, this.asset); }A bundled LUT color filter: stable key, human label, and 512x512 LUT PNG asset path.
پیرامیٹرز
keyStringلازمیStable key passed to setFilter, e.g. 'fresh'.
labelStringلازمیHuman-readable label, e.g. 'Fresh'.
assetStringلازمیPackaged asset path of the LUT PNG.
VideoEffectsSkinTonesclassclass VideoEffectsSkinTonesCatalog of bundled skin-tone presets (Warm/Cool/Pink/Wheat/Tan). Static-only. Has all (List<VideoEffectSkinTone>) and byKey(String?).
VideoEffectsSkinTones.byKeymethodstatic VideoEffectSkinTone? byKey(String? key)Look up a skin-tone preset by key, or null for unknown/null.
پیرامیٹرز
keyString?لازمیSkin-tone preset key.
واپسی: VideoEffectSkinTone? — Preset or null.
VideoEffectsAccessoriesclassclass VideoEffectsAccessoriesCatalog of bundled PNG accessories (glasses, crown, catEars, sunglasses, flowerCrown, partyHat, bunnyEars, mustache, halo). Static-only.
VideoEffectsAccessories.allpropertystatic const List<VideoEffectAccessory> allAll bundled accessories, each with a key matching the EffectsState toggle.
واپسی: List<VideoEffectAccessory> — Accessory catalog.
VideoEffectsAccessories.assetFormethodstatic String? assetFor(String? key)The PNG asset path for an accessory key, or null for an unknown key.
پیرامیٹرز
keyString?لازمیAccessory key to resolve.
واپسی: String? — Asset path or null.
VideoEffectsMakeupclassclass VideoEffectsMakeupCurated makeup shades + full looks. Static-only. Exposes lipstick, eyeshadow, blush, eyeColor (List<MakeupShade>) and looks (List<MakeupLook>).
VideoEffectsMakeup.lookspropertystatic const List<MakeupLook> looksCoordinated full looks (lip + eyeshadow + blush [+ eye color]): natural, glam, soft_rose, bold_berry, sunkissed, smoky_night.
واپسی: List<MakeupLook> — Curated full looks.
VideoEffectsMakeup.lookByKeymethodstatic MakeupLook? lookByKey(String? key)Look up a coordinated MakeupLook by key, or null for unknown/null.
پیرامیٹرز
keyString?لازمیLook key.
واپسی: MakeupLook? — Look or null.
Models & data types
Immutable state snapshot, catalog item types, and telemetry/parity result types.
EffectsStateclassclass EffectsState { const EffectsState({bool enabled = false, double smoothing = 0, ... bool halo = false}); }Immutable snapshot of active video-effect settings (~50 fields: enabled, smoothing, whitening, filterKey/filterIntensity, makeup hex+opacity, sculpt/reshape scalars, accessory bools). All intensities normalized 0.0..1.0.
پیرامیٹرز
enabledboolڈیفالٹ = falseMaster switch.
smoothingdoubleڈیفالٹ = 0Skin-smoothing strength.
filterKeyString?ڈیفالٹ = nullActive LUT filter key, or null.
filterIntensitydoubleڈیفالٹ = 1.0Blend amount for filterKey.
……Plus whitening, glow, grain, vignette, clarity, makeup hex/opacity fields, reshape/sculpt scalars, and accessory bools.
copyWithmethodEffectsState copyWith({bool? enabled, double? smoothing, Object? filterKey = _unset, ...})Returns a copy with the given fields changed. Nullable fields use an _unset sentinel so passing null clears (vs leaving unchanged).
پیرامیٹرز
……Any subset of EffectsState fields to override.
واپسی: EffectsState — A new modified state.
toMapmethodMap<String, dynamic> toMap()Serialized form sent to the native pipeline over the method channel.
واپسی: Map<String, dynamic> — All effect fields as a map.
VideoEffectSkinToneclassconst VideoEffectSkinTone(this.key, this.label, this.skinAsset, this.bgAsset)A skin-tone preset (dual-LUT grade): a skin LUT over skin regions plus a background LUT elsewhere.
پیرامیٹرز
keyStringلازمیStable preset key, e.g. 'nuanbai'.
labelStringلازمیHuman label, e.g. 'Warm'.
skinAssetStringلازمیSkin-region LUT asset path.
bgAssetStringلازمیBackground LUT asset path.
VideoEffectAccessoryclassconst VideoEffectAccessory(this.key, this.label, this.asset)A landmark-positioned PNG accessory overlay.
پیرامیٹرز
keyStringلازمیStable key matching the EffectsState toggle, e.g. 'glasses'.
labelStringلازمیHuman-readable label.
assetStringلازمیPackaged transparent PNG asset path.
MakeupShadeclassconst MakeupShade(this.key, this.label, this.hex, this.opacity)A curated makeup shade: a hex color plus recommended opacity for one region. Feed hex+opacity into the matching setter.
پیرامیٹرز
keyStringلازمیStable key, e.g. 'classic_red'.
labelStringلازمیHuman label, e.g. 'Classic Red'.
hexStringلازمی#RRGGBB color.
opacitydoubleلازمیRecommended strength, 0.0..1.0.
MakeupLookclassconst MakeupLook(this.key, this.label, {String? lipstick, double lipstickOpacity = 0.6, String lipFinish = 'satin', String? eyeshadow, ...})A full makeup look bundling coordinated shades across regions. Apply with setMakeupLook. Has a preview getter for the thumbnail asset path.
پیرامیٹرز
keyStringلازمیStable look key.
labelStringلازمیHuman label.
lipstickString?ڈیفالٹ = nullLipstick hex.
lipFinishStringڈیفالٹ = 'satin'matte, satin, or gloss.
eyeshadowString?ڈیفالٹ = nullEyeshadow hex (plus blush, eyeColor, and per-region opacities).
EffectsPerfStatsclassclass EffectsPerfStats { const EffectsPerfStats({required int frames, ... required double frameMs}); }Immutable snapshot of native frame-budget telemetry: frame counts, over-budget/over-frame counts, raise/lower events, per-level frames, mean/p50/p95/p99/max ms, histogram bins, device tier, and budget/frame thresholds.
پیرامیٹرز
framesintلازمیTotal frames timed since last reset.
overBudgetintلازمیFrames slower than budgetMs.
……Plus overFrame, raiseEvents, lowerEvents, levelFrames, meanMs, maxMs, p50/p95/p99Ms, binMs, bins, tier, budgetMs, frameMs.
overBudgetRategetterdouble get overBudgetRateFraction of frames slower than budgetMs (0.0..1.0). The primary perf signal.
واپسی: double — Over-budget fraction.
overFrameRategetterdouble get overFrameRateFraction of frames slower than frameMs — i.e. frames that actually dropped.
واپسی: double — Dropped-frame fraction.
EffectsPerfStats.fromMapmethodstatic EffectsPerfStats? fromMap(Map<String, dynamic>? m)Builds a snapshot from the native channel map; null for a null/empty map.
پیرامیٹرز
mMap<String, dynamic>?لازمیNative telemetry map.
واپسی: EffectsPerfStats? — Snapshot or null.
EffectsTestFrameclassconst EffectsTestFrame({required Uint8List rgba, required int width, required int height})Result of renderTestFrame: an RGBA8888 image produced by running a known input through the native color grade with current settings.
پیرامیٹرز
rgbaUint8ListلازمیGraded pixels, RGBA8888 row-major, alpha opaque.
widthintلازمیImage width in pixels.
heightintلازمیImage height in pixels.
FrameDiffclassclass FrameDiff { const FrameDiff({required int maxDelta, required double meanDelta, required int pixels, required int diffPixels, required int threshold}); }A per-channel difference summary between two RGBA8888 buffers (pure Dart, offline-testable). Has diffFraction getter and a static compare().
پیرامیٹرز
maxDeltaintلازمیLargest absolute per-channel delta (0..255).
meanDeltadoubleلازمیMean absolute per-channel delta over RGB.
pixelsintلازمیTotal pixels compared.
diffPixelsintلازمیPixels differing by more than threshold.
thresholdintلازمیPer-channel delta counted as different.
FrameDiff.comparemethodstatic FrameDiff compare(Uint8List a, Uint8List b, {int threshold = 2})Compares two RGBA8888 buffers on RGB channels (alpha ignored). Returns a zeroed diff when sizes mismatch or are empty.
پیرامیٹرز
aUint8ListلازمیFirst RGBA8888 buffer.
bUint8ListلازمیSecond RGBA8888 buffer.
thresholdintڈیفالٹ = 2Per-channel delta above which a pixel counts as different.
واپسی: FrameDiff — The difference summary.
UTD کے ساتھ تعمیر کے لیے تیار ہیں؟
اپنا اکاؤنٹ بنائیں، اپنے ماسٹر والٹ کو فنڈ کریں، اور جن سروسز کی ضرورت ہے انہیں آن کریں۔