tasq/lib/services/face_verification_stub.dart

30 lines
779 B
Dart

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;
}