Closed munum closed 1 year ago
I think it is due as this example has a canvas above the preview. That's not a bug.
The canvas has been put in this example only as a demo.
I think it is due as this example has a canvas above the preview. That's not a bug.
The canvas has been put in this example only as a demo.
Is there a way to make focus work even when there's a canvas? I imagine zoom doesn't work in this example either because of the canvas.
Just wrap the content printed above CameraAwesomeBuilder
with an IgnorePointer
and you will again have access to the built-in gestures of CamerAwesome:
Positioned(
top: 132,
bottom: 132,
left: 0,
right: 0,
child: IgnorePointer(
child: AnimatedBuilder(
animation: animation,
builder: (context, widget) {
return CustomPaint(
painter: FaceDetectorPainter(
faces, absoluteImageSize, rotation, animation),
);
}),
),
)
Just wrap the content printed above
CameraAwesomeBuilder
with anIgnorePointer
and you will again have access to the built-in gestures of CamerAwesome:Positioned( top: 132, bottom: 132, left: 0, right: 0, child: IgnorePointer( child: AnimatedBuilder( animation: animation, builder: (context, widget) { return CustomPaint( painter: FaceDetectorPainter( faces, absoluteImageSize, rotation, animation), ); }), ), )
Thank you. Would it be a good idea to make a pull request for this?
This example is not supposed to be perfect, it's just there to show how one could do this kind of things. You might do them differently in a real app (splitting logic and UI for instance).
I will still include it in a PR I am working on as it's a small change that does no harm :)
I'm closing this issue since the PR that includes this change has been merged to master
.
Feel free to open new issues if necessary :)
Steps to Reproduce
Run
ai_analysis_faces
and tap on preview screen.Expected results
Focus on tapped position.
Actual results
No focus action is triggered.
About your device