isBlocInitializeAbove property

bool? isBlocInitializeAbove
final

Set this to true if you which to initialize the blocProvider higher in the widget tree and use the FaceDetectionLock widget in different places in your app. for instance;

  BlocProvider.value(
    value: FaceDetectionBloc()
            ..add(FaceDetectionEvent.initializeCam()),
    child: WidgetToSecureOrParentOfWidgetToSecure()
);

then use the FaceDetectionLock as follows

    return FaceDetectionLock(
      isBlocInitializeAbove: true,
      body: WidgetToSecure(),
  );

Implementation

final bool? isBlocInitializeAbove;