onExpressionDetectResult method

FutureOr<void> onExpressionDetectResult(
  1. dynamic result
)
override

@hidden for internal use only @detail callback @author zhushufan.ref @brief 特效 SDK 进行人像属性检测结果的回调。
调用 registerFaceDetectionObserver 注册了 IFaceDetectionObserver{@link #IFaceDetectionObserver},并调用 setVideoEffectExpressionDetect{@link #IVideoEffect#setVideoEffectExpressionDetect} 设置开启人像属性检测后,你会收到此回调。 @param result 人像属性检测结果, 参看 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)))));
}