简体   繁体   English

相机抖动预览

[英]Camera flutter Preview

在此处输入图片说明 When I opening camera in Pixel, Camera View is different but in phone device its working fine please help me to solve. 当我在Pixel中打开相机时,“相机视图”是不同的,但是在手机设备中,它的工作正常,请帮助我解决。 The camera position in the phone with respect to tab is different. 相对于标签,手机中的相机位置不同。 So, The images stay vertical and don't rotate the 90degrees with the phone. 因此,图像保​​持垂直,并且不会随手机旋转90度。

 return new AspectRatio(
    aspectRatio: controller.value.aspectRatio,
    child: new CameraPreview(
      controller,
    ),
  );

You can use image_picker: "^0.4.5" for get camera image. 您可以使用image_picker:“ ^ 0.4.5”获取摄像机图像。

var image = await ImagePicker.pickImage(source: ImageSource.camera); var image =等待ImagePicker.pickImage(来源:ImageSource.camera);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM