detectLivelyness method
Future<M7CapturedImage?>
detectLivelyness(
- BuildContext context, {
- required M7DetectionConfig config,
A single line functoin to detect weather the face is live or not. Parameters: -
- context: - Positional Parameter that will accept a
BuildContext
using which it will redirect the a new screen. - config: - Accepts a
M7DetectionConfig
object which will hold all the setup config of the package.
Implementation
Future<M7CapturedImage?> detectLivelyness(
BuildContext context, {
required M7DetectionConfig config,
}) async {
_safeAreaPadding = MediaQuery.of(context).padding;
final M7CapturedImage? capturedFacePath = await Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => Platform.isIOS
? M7LivelynessDetectionScreenV1(
config: config,
)
: M7LivelynessDetectionPageV2(
config: config,
),
),
);
return capturedFacePath;
}