openCamera method
Future<void>
openCamera(
- BuildContext context,
- ShowCameraAction cameraAction,
- ScopeManager? scopeManager
override
Opens the configured camera flow.
Implementation
@override
Future<void> openCamera(BuildContext context, ShowCameraAction cameraAction,
ScopeManager? scopeManager) async {
final isDefault = Utils.getBool(
scopeManager?.dataContext.eval(cameraAction.options?['default']),
fallback: false);
if (isDefault && !kIsWeb) {
await defaultCamera(context, cameraAction, scopeManager);
} else {
final faceDetection = scopeManager?.dataContext
.eval(cameraAction.options?['faceDetection'])?['enabled'];
if (Utils.getBool(faceDetection, fallback: false)) {
debugPrint(
'Deprecated: Face detection is no longer available here. Use the "openFaceCamera" action instead.');
}
await bespokeCamera(context, cameraAction, scopeManager);
}
}