CameraConfiguration.fromJson constructor
CameraConfiguration.fromJson( - Map<String, dynamic> json
)
Implementation
factory CameraConfiguration.fromJson(Map<String, dynamic> json) {
return CameraConfiguration(
horizontalFOV: (json['horizontalFOV'] ?? 0.0).toDouble(),
verticalFOV: (json['verticalFOV'] ?? 0.0).toDouble(),
frameWidth: json['frameWidth'] ?? 0,
frameHeight: json['frameHeight'] ?? 0,
pixelFormat: ImagePixelFormatExtension.fromId(json['pixelFormat'] ?? 0),
frameRate: (json['frameRate'] ?? 0.0).toDouble(),
orientation: OrientationTypeExtension.fromId(json['orientation'] ?? 0),
focalLengthHorizontal: (json['focalLengthHorizontal'] ?? 0.0).toDouble(),
focalLengthVertical: (json['focalLengthVertical'] ?? 0.0).toDouble(),
focalLengthMinimum: (json['focalLengthMinimum'] ?? 0.0).toDouble(),
physicalSensorWidth: (json['physicalSensorWidth'] ?? 0.0).toDouble(),
physicalSensorHeight: (json['physicalSensorHeight'] ?? 0.0).toDouble(),
exposure: (json['exposure'] ?? 0.0).toDouble(),
minExposure: (json['minExposure'] ?? 0.0).toDouble(),
maxExposure: (json['maxExposure'] ?? 0.0).toDouble(),
exposureTargetOffset: (json['exposureTargetOffset'] ?? 0.0).toDouble(),
isoValue: (json['isoValue'] ?? 0.0).toDouble(),
minIso: (json['minIso'] ?? 0.0).toDouble(),
maxIso: (json['maxIso'] ?? 0.0).toDouble(),
);
}