face_gesture_detector library
Face Gesture Detector — a Flutter widget that translates camera frames and MediaPipe facial landmarks into high-level semantic callbacks.
Import this barrel file to access all public types:
import 'package:face_gesture_detector/face_gesture_detector.dart';
Classes
- BlinkDetails
- Details emitted when a complete blink cycle is detected.
- BlinkRecognizer
- Recognizes complete blink cycles: open → closed → open.
- BrowDetails
- Details emitted when a sustained brow raise is detected.
- BrowRecognizer
- Detects sustained brow raises by monitoring the browInnerUp blendshape against a configurable threshold for a sustained duration.
- DistanceDetails
- Details emitted when the user's distance category changes.
- FaceDetectedDetails
- Details emitted when a face is detected or lost.
- FaceDetectionOptions
- Options sent to the native platform when starting face detection.
- FaceFrame
- Facial data from a single camera frame processed by the native pipeline.
- FaceGestureConfiguration
- Threshold and behavior configuration for the face gesture detector.
- FaceGestureDetector
- Layer 1 facade widget that translates declarative callbacks into a recognizer map and delegates to RawFaceGestureDetector.
- FaceGestureDetectorController
- Imperative controller for RawFaceGestureDetector.
- FaceGestureDetectorPlatform
- The platform interface for face gesture detection.
- FaceGestureRecognizer
- Base class for all face gesture recognizers.
-
FaceGestureRecognizerFactory<
T extends FaceGestureRecognizer> - Factory that creates a FaceGestureRecognizer instance.
- FaceLandmark
- A single 3D point from the MediaPipe 478-landmark face mesh.
- FacePresenceRecognizer
- Recognizes face appearance and disappearance transitions.
- FrameData
- Raw camera frame data sent to the native platform for processing.
- HeadNodDetails
- Details emitted when a sustained head nod is detected.
- HeadNodRecognizer
- Detects sustained head nods by monitoring the pitch angle against a configurable threshold for a sustained duration.
- HeadTurnDetails
- Details emitted when a sustained head turn is detected.
- HeadTurnRecognizer
- Detects sustained head turns by monitoring the yaw angle against a configurable threshold for a sustained duration.
- ImageQualityMetrics
- Image quality metrics computed on the native side.
- MethodChannelFaceGestureDetector
- MethodChannel implementation of FaceGestureDetectorPlatform.
- MouthDetails
- Details emitted when the mouth opening state changes.
- MouthRecognizer
- Detects sustained mouth opening by monitoring the jawOpen blendshape against a configurable threshold for a sustained duration.
- PoseAngles
- Euler angles derived from the 4×4 facial transformation matrix.
- PoseDetails
- Details emitted when the head pose changes beyond the configured delta.
- PoseRecognizer
- Recognizes significant changes in head pose angles.
- QualityDetails
- Details emitted when image quality metrics change.
- QualityGateRecognizer
- Recognizes changes in image quality and face distance.
- RawFaceGestureDetector
- Layer 2 widget that manages the recognizer lifecycle and frame dispatch.
- RawFaceGestureDetectorState
- Public state so tests and advanced users can call dispatchFrame.
- RawFrameRecognizer
- Simplest recognizer — passes every frame directly to its callback.
- SmileDetails
- Details emitted when a sustained smile is detected.
- SmileRecognizer
- Detects a sustained smile by averaging mouthSmileLeft and mouthSmileRight and comparing against a configurable threshold for a sustained duration.
Enums
- BrightnessCategory
- Classification of the ambient brightness, derived from the Y channel of the camera frame.
- DistanceCategory
- Classification of the user's distance from the camera, derived from the face bounding box ratio relative to the frame.
- FaceBlendshape
- The 52 MediaPipe face blendshapes, ARKit-compatible.
- HeadNodDirection
- Direction of a detected head nod (pitch axis).
- HeadTurnDirection
- Direction of a detected head turn (yaw axis).
Typedefs
- BlinkDetectedCallback = void Function(BlinkDetails details)
- Callback signature for blink detection events.
- BrowRaisedCallback = void Function(BrowDetails details)
- Callback when a sustained brow raise is detected.
- DistanceChangedCallback = void Function(DistanceDetails details)
- FaceDetectedCallback = void Function(FaceDetectedDetails details)
- Callback signatures for face presence events.
- FaceFrameCallback = void Function(FaceFrame frame)
- Callback signature for raw frame passthrough.
- FaceLostCallback = void Function()
- HeadNodCallback = void Function(HeadNodDetails details)
- Callback when a sustained head nod is detected.
- HeadTurnCallback = void Function(HeadTurnDetails details)
- Callback when a sustained head turn is detected.
- MouthOpenedCallback = void Function(MouthDetails details)
- Callback when a sustained mouth opening is detected.
- PoseChangedCallback = void Function(PoseDetails details)
- Callback signature for pose change events.
- QualityChangedCallback = void Function(QualityDetails details)
- Callback signatures for quality gate events.
- SmileCallback = void Function(SmileDetails details)
- Callback when a sustained smile is detected.