【问题标题】:Flutter Live Camera Overlay with other imageFlutter Live Camera Overlay 与其他图像
【发布时间】:2021-01-09 13:09:26
【问题描述】:

我是 Flutter 的新手,正在尝试创建一个相机应用程序。应用程序需要将图像叠加在 Live Camera 之上。完全如图像https://stackoverflow.com/a/62199339/12747470 所示。如果有人可以建议一些参考代码,那就太好了。提前致谢。

【问题讨论】:

    标签: flutter camera


    【解决方案1】:

    试试这个:

    Stack(
      children: <Widget>[
         AspectRatio(
           aspectRatio: controller.value.aspectRatio,
           child: CameraPreview(controller),
         ),
         Image.asset(''),
      ]
    )
    

    【讨论】:

    【解决方案2】:

    在使用相机时,我需要类似的布局。

    Stack(
      children: <Widget>[
         CameraPreview(),
         Align(
            alignment: Alignment.bottomCenter,
            child : Container( 
               height: 120,
               child: Opacity(
                  opacity:0.60,
                  color: Colors.black,
               ),
            ),
         ),
      ]
    )
    

    【讨论】:

    猜你喜欢
    • 2020-04-10
    • 2022-12-09
    • 1970-01-01
    • 1970-01-01
    • 2020-06-01
    • 1970-01-01
    • 2012-09-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多