Closed nasirdev74 closed 1 year ago
hi, try putting the CameraPreview widget in Container with white color.
ClipRRect( borderRadius: BorderRadius.circular(3), child: Transform.scale( scale: cameraController!.value.aspectRatio, child: AspectRatio( aspectRatio:cameraController!.value.aspectRatio, child: Center( child: WidgetsToImage( controller: takeDocPictureController.widgetsToImageController, child: Container( color: Colors.white, child: CameraPreview(cameraController!), ) ), ), ), ), )
it will appered
I'm using camera plugin to take picture. my camera preview widget is a small widget not full screen. but when I take picture, the camera controller takes picture from full screen camera. So I wanted to use this package to take picture only the part is visible in my screen. but it takes a black image only.