0

I am new to flutter and trying to create a camera app. App needs to overlay image on top of Live Camera. Exactly as shown in image https://stackoverflow.com/a/62199339/12747470 . It will be great if someone can suggest some reference code. Thanks in advance.

2 Answers2

1

try this:

Stack(
  children: <Widget>[
     AspectRatio(
       aspectRatio: controller.value.aspectRatio,
       child: CameraPreview(controller),
     ),
     Image.asset(''),
  ]
)
Jim
  • 6,928
  • 1
  • 7
  • 18
  • thank you very much I have a question how to make a program like this in the link https://www.youtube.com/watch?v=E0zVopYLrtQ – mohanad.99 Jun 20 '21 at 21:54
1

I required a similar layout when working on the camera.

Stack(
  children: <Widget>[
     CameraPreview(),
     Align(
        alignment: Alignment.bottomCenter,
        child : Container( 
           height: 120,
           child: Opacity(
              opacity:0.60,
              color: Colors.black,
           ),
        ),
     ),
  ]
)
Calvin Gonsalves
  • 1,738
  • 11
  • 15
  • thank you very much I have a question how to make a program like this in the link https://www.youtube.com/watch?v=E0zVopYLrtQ – mohanad.99 Jun 20 '21 at 21:55