GestureType enum
Recognized hand gesture types from MediaPipe gesture classifier.
The gesture classifier recognizes 7 distinct gestures plus an "unknown" category for unrecognized hand poses.
Example:
final hands = await detector.detect(imageBytes);
for (final hand in hands) {
if (hand.gesture != null && hand.gesture!.confidence > 0.7) {
switch (hand.gesture!.type) {
case GestureType.thumbUp:
print('Thumbs up detected!');
break;
case GestureType.victory:
print('Peace sign detected!');
break;
default:
break;
}
}
}
Values
- unknown → const GestureType
-
Unrecognized or ambiguous gesture.
- closedFist → const GestureType
-
Closed fist gesture. ✊
- openPalm → const GestureType
-
Open palm with fingers extended. 🖐️
- pointingUp → const GestureType
-
Index finger pointing upward. ☝️
- thumbDown → const GestureType
-
Thumbs down gesture. 👎
- thumbUp → const GestureType
-
Thumbs up gesture. 👍
- victory → const GestureType
-
Victory/peace sign (index and middle fingers extended). ✌️
- iLoveYou → const GestureType
-
"I Love You" sign (thumb, index, and pinky extended). 🤟
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
GestureType> - A constant List of the values in this enum, in order of their declaration.