open static method
Creates a new Camera object to access a particular hardware camera.
If the same camera is opened by other applications, this will throw a
PlatformException
.
You must call release when you are done using the camera, otherwise it will remain locked and be unavailable to other applications.
Your application should only have one Camera object active at a time for a particular hardware camera.
Implementation
static Camera open(int cameraId) {
final Camera camera = Camera._();
CameraChannel.channel.invokeMethod<int>(
'Camera#open',
<String, dynamic>{'cameraId': cameraId, 'cameraHandle': camera.handle},
);
return camera;
}