Attendance validation involving Location Detection + Facial Recoginition with Liveness Detection
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
/// Result from a face liveness check.
|
||||
class FaceLivenessResult {
|
||||
final Uint8List imageBytes;
|
||||
final String? imagePath;
|
||||
FaceLivenessResult({required this.imageBytes, this.imagePath});
|
||||
}
|
||||
|
||||
/// Run face liveness detection. Returns captured photo or null if cancelled.
|
||||
/// Stub implementation for unsupported platforms.
|
||||
Future<FaceLivenessResult?> runFaceLiveness(
|
||||
BuildContext context, {
|
||||
int requiredBlinks = 3,
|
||||
}) async {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Compare a captured face photo with enrolled face photo bytes.
|
||||
/// Returns similarity score 0.0 (no match) to 1.0 (perfect match).
|
||||
/// Stub returns 0.0.
|
||||
Future<double> compareFaces(
|
||||
Uint8List capturedBytes,
|
||||
Uint8List enrolledBytes,
|
||||
) async {
|
||||
return 0.0;
|
||||
}
|
||||
Reference in New Issue
Block a user