You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
diplomatic-quarter/packages/vital_sign_camera/lib/src/auto_focus_system.dart

19 lines
891 B
Dart

/// Indicates a format's autofocus system.
///
/// * `none`: Indicates that autofocus is not available
/// * `contrastDetection`: Indicates that autofocus is achieved by contrast detection. Contrast detection performs a focus scan to find the optimal position
/// * `phaseDetection`: Indicates that autofocus is achieved by phase detection. Phase detection has the ability to achieve focus in many cases without a focus scan. Phase detection autofocus is typically less visually intrusive than contrast detection autofocus
enum AutoFocusSystem { contrastDetection, phaseDetection, none }
AutoFocusSystem autoFocusSystemFromString(String string) {
switch (string) {
case 'contrast-detection':
return AutoFocusSystem.contrastDetection;
case 'phase-detection':
return AutoFocusSystem.phaseDetection;
case 'none':
default:
return AutoFocusSystem.none;
}
}