recordFaceVideo method

Future<File?> recordFaceVideo(
  1. BuildContext context
)

Record a face video using custom camera interface

Implementation

Future<File?> recordFaceVideo(BuildContext context) async {
  try {
    return await Navigator.of(context).push<File>(
      MaterialPageRoute(
        builder: (context) => CustomFaceRecordingWidget(
          onVideoRecorded: (File video) {
            Navigator.of(context).pop(video);
          },
          onCancel: () {
            Navigator.of(context).pop(null);
          },
        ),
      ),
    );
  } catch (e) {
    print('Error recording video: $e');
    rethrow;
  }
}