Skip to content

Instantly share code, notes, and snippets.

@Ramko9999
Created June 22, 2020 23:28
Show Gist options
  • Save Ramko9999/421ea039dc292bcdd747b54c740daae7 to your computer and use it in GitHub Desktop.
Save Ramko9999/421ea039dc292bcdd747b54c740daae7 to your computer and use it in GitHub Desktop.
Widget getCameraDisplay(){
double width = MediaQuery.of(context).size.width;
double height = MediaQuery.of(context).size.height;
if(_isCameraInitialized){
return Container(
height: height * 0.75,
width: width * 0.9,
child: CameraPreview(_camera)
);
}
else{
return Center(
child: Text(
"The Camera is not avaliable!"
)
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment