CameraImage.fromPlatformData constructor

  1. @Deprecated('Use fromPlatformInterface instead')
CameraImage.fromPlatformData(
  1. Map data
)

Creates a CameraImage from method channel data.

Implementation

@Deprecated('Use fromPlatformInterface instead')
CameraImage.fromPlatformData(Map<dynamic, dynamic> data)
    : format = ImageFormat._fromPlatformData(data['format']),
      height = data['height'] as int,
      width = data['width'] as int,
      lensAperture = data['lensAperture'] as double?,
      sensorExposureTime = data['sensorExposureTime'] as int?,
      sensorSensitivity = data['sensorSensitivity'] as double?,
      planes = List<Plane>.unmodifiable((data['planes'] as List<dynamic>)
          .map<Plane>((dynamic planeData) =>
              Plane._fromPlatformData(planeData as Map<dynamic, dynamic>)));