onExpressionDetectResult method
@hidden for internal use only
@detail callback
@author zhushufan.ref
@brief Callback of the result of face detection with Effect SDK.
After calling registerFaceDetectionObserver and setVideoEffectExpressionDetect{@link #IVideoEffect#setVideoEffectExpressionDetect}, you will receive this callback.
@param result Expression detection result. See ExpressionDetectResult{@link #ExpressionDetectResult}.
Implementation
FutureOr<void> onExpressionDetectResult(dynamic result) async {
if ($instance == null || $instance is! IFaceDetectionObserver) {
return;
}
return ($instance as IFaceDetectionObserver).onExpressionDetectResult?.call(
packObject(
result,
() => ExpressionDetectResult.fromMap(
ExpressionDetectResult.deepPackedMapValues(
ExpressionDetectResult.mapMemberToConstructorParams(
result)))));
}