flutter-ml / google_ml_kit_flutter

A flutter plugin that implements Google's standalone ML Kit
MIT License
978 stars 746 forks source link

The method 'getLandmark' isn't defined for the type 'Face' #225

Closed X-SLAYER closed 2 years ago

X-SLAYER commented 2 years ago

after upgrading the google_ml_kit to the newest version 0.8.0 when I wanted to use the getLandmark like it mentionned here google_mlkit_face_detection it didn't work

final FaceLandmark leftEar = face.getLandmark(FaceLandmarkType.leftEar);

but I handle it like that. So i don't know if it should be updated in the code or the document should mention it like the way i did

    final FaceLandmark leftEar = face.landmarks[FaceLandmarkType.leftEar]!;
fbernaly commented 2 years ago

Thanks @X-SLAYER that is the correct way to access the landmarks. We will update the readme, I forgot to update that. Also, you are welcome to send a PR and update the readme.