Files
flutterApp/lib/features/v2/usb_camera/domain/usb_camera_device.dart

37 lines
1001 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/// USB(UVC)摄像头设备实体。
class UsbCameraDevice {
const UsbCameraDevice({
required this.deviceId,
this.vendorId,
this.productId,
this.productName,
this.supportedResolutions = const [],
});
/// 系统分配的设备标识(重启可能变化,仅做本次会话使用)。
final String deviceId;
final int? vendorId;
final int? productId;
final String? productName;
/// 支持的分辨率字符串,例如 "1920x1080" / "1280x720"。
final List<String> supportedResolutions;
UsbCameraDevice copyWith({
String? deviceId,
int? vendorId,
int? productId,
String? productName,
List<String>? supportedResolutions,
}) {
return UsbCameraDevice(
deviceId: deviceId ?? this.deviceId,
vendorId: vendorId ?? this.vendorId,
productId: productId ?? this.productId,
productName: productName ?? this.productName,
supportedResolutions: supportedResolutions ?? this.supportedResolutions,
);
}
}