getCameraInfo static method

Future<CameraInfo> getCameraInfo(
  1. int cameraId
)

Retrieves information about a particular camera.

If getNumberOfCameras returns N, the valid id is 0 to N-1.

Implementation

static Future<CameraInfo> getCameraInfo(int cameraId) async {
  final Map<String, dynamic> infoMap =
      await (CameraChannel.channel.invokeMapMethod<String, dynamic>(
    'Camera#getCameraInfo',
    <String, dynamic>{'cameraId': cameraId},
  ) as FutureOr<Map<String, dynamic>>);

  return CameraInfo.fromMap(infoMap);
}