title: How to set Flutter CameraPreview Size "Fullscreen"
body: <p>Iam using CameraPreview for measuring height of an object,But the issue was i cant able to set cameraPreview height full screen..</p>
  
  <p>I have tried <strong>Positioned widget</strong>, it fills the screen but the image was stretched.
  I have tried <strong>Transform Widget</strong>, but height does not fills fullscreen, white space is coming.Image is not stretched.</p>
  
  <p>Mycode:</p>
  
  <pre><code>final size = MediaQuery.of(context).size;
  final deviceRatio = size.width / size.height;
  
  return Stack(
              children: &lt;Widget&gt;[
                Transform.scale(
                  scale: controller.value.aspectRatio/deviceRatio,
                  child: new AspectRatio(
                    aspectRatio: controller.value.aspectRatio,
                    child: new CameraPreview(controller),
                  ),
                ),);
  </code></pre>
  
  <p><strong>Kindly help me to fit CameraPreview "FULLSCREEN" without image streching..</strong></p>
  
  <p><a href="https://i.stack.imgur.com/MkDBx.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/MkDBx.jpg" alt="enter image description here"></a></p>