onFaceSnapshot property

void Function(List<Face>)? onFaceSnapshot
final

You can get hold of the faces, that unlocked the device via a call back function. For this function to be initialized you need to set the isBlocInitializeAbove to true and make sure you initialize the FaceDetectionBloc a widget above and call the initializeCam event prior to calling the FaceDetectionLock for example

  MaterialApp(
  home: BlocProvider(
      create:(context) => FaceDetectionBloc(cameraController: controller, onFaceSnapshot: callbackFunction )
                ..add(const _FaceDetectionEvent.initializeCam());
      child: BodyWidget()
     )
)

Implementation

final void Function(List<Face>)? onFaceSnapshot;