CameraMacOSDevice.fromMap constructor

CameraMacOSDevice.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory CameraMacOSDevice.fromMap(Map<String, dynamic> map) {
  return CameraMacOSDevice(
    deviceId: map['deviceId'] ?? '',
    manufacturer: map['manufacturer'],
    localizedName: map['localizedName'],
    deviceType: CameraMacOSDeviceType.values.safeElementAt(
            map["deviceType"] ?? CameraMacOSDeviceType.unknown.index) ??
        CameraMacOSDeviceType.unknown,
  );
}