verify method

  1. @override
Future<FaceVerificationResult> verify(
  1. Face face
)
override

Verify a detected face against enrolled templates.

Implementation

@override
Future<FaceVerificationResult> verify(Face face) async {
  final features = _extractOrThrow(face);

  final body = await _post('/verify', {'features': features});

  return FaceVerificationResult(
    isMatch: body['isMatch'] as bool,
    confidence: (body['confidence'] as num).toDouble(),
    matchedTemplateId: body['matchedTemplateId'] as String?,
  );
}