Zoom Switch Control

Defined in library scandit_datacapture_core_ui

ZoomSwitchControl
class ZoomSwitchControl : Control

Added in version 6.10.0

Control that allows switching between configurable camera zoom levels. The available zoom levels are filtered based on the camera hardware capabilities.

You can add this control to a view by calling DataCaptureView.addControl().

ZoomSwitchControl()
 ZoomSwitchControl()

Added in version 8.3.0

Initializes a new ZoomSwitchControl.

zoomedOutImage
Image? get zoomedOutImage

Added in version 6.10.0

Deprecated since version 8.4: This property is deprecated and will be removed in a future release.

The button image displayed when the zoom level is set to 1x.

zoomedOutPressedImage
Image? get zoomedOutPressedImage

Added in version 6.10.0

Deprecated since version 8.4: This property is deprecated and will be removed in a future release.

The button image displayed when the zoom level is set to 1x and the button is pressed.

zoomedInImage
Image? get zoomedInImage

Added in version 6.10.0

Deprecated since version 8.4: This property is deprecated and will be removed in a future release.

The button image displayed when the zoom level is set to 2x.

zoomedInPressedImage
Image? get zoomedInPressedImage

Added in version 6.10.0

Deprecated since version 8.4: This property is deprecated and will be removed in a future release.

The button image displayed when the zoom level is set to 2x and pressed.

setZoomedOutImage(image)
Future<void> setZoomedOutImage(Image? image)

Added in version 6.10.0

Deprecated since version 8.4: This method is deprecated and will be removed in a future release.

The button image resource displayed when the zoom level is set to 1x.

setZoomedOutPressedImage(image)
Future<void> setZoomedOutPressedImage(Image? image)

Added in version 6.10.0

Deprecated since version 8.4: This method is deprecated and will be removed in a future release.

The button image resource displayed when the zoom level is set to 1x and the button is pressed.

setZoomedInImage(image)
Future<void> setZoomedInImage(Image? image)

Added in version 6.10.0

Deprecated since version 8.4: This method is deprecated and will be removed in a future release.

The button image resource displayed when the zoom level is set to 2x.

setZoomedInPressedImage(image)
Future<void> setZoomedInPressedImage(Image? image)

Added in version 6.10.0

Deprecated since version 8.4: This method is deprecated and will be removed in a future release.

The button image resource displayed when the zoom level is set to 2x and pressed.

contentDescriptionWhenZoomedOut
String? contentDescriptionWhenZoomedOut

Added in version 8.3.0

Content description text used for the control button when zoomed out (Android only).

Note

This property is only used on Android. For iOS, use accessibilityLabelWhenZoomedOut instead.

contentDescriptionWhenZoomedIn
String? contentDescriptionWhenZoomedIn

Added in version 8.3.0

Content description text used for the control button when zoomed in (Android only).

Note

This property is only used on Android. For iOS, use accessibilityLabelWhenZoomedIn instead.

accessibilityLabelWhenZoomedOut
String? accessibilityLabelWhenZoomedOut

Added in version 8.3.0

Accessibility label text used for the control button when zoomed out (iOS only).

Note

This property is only used on iOS. For Android, use contentDescriptionWhenZoomedOut instead.

accessibilityLabelWhenZoomedIn
String? accessibilityLabelWhenZoomedIn

Added in version 8.3.0

Accessibility label text used for the control button when zoomed in (iOS only).

Note

This property is only used on iOS. For Android, use contentDescriptionWhenZoomedIn instead.

accessibilityHintWhenZoomedOut
String? accessibilityHintWhenZoomedOut

Added in version 8.3.0

Accessibility hint text used for the control button when zoomed out.

Note

This property is only used on iOS. Android does not have an equivalent accessibility hint concept.

accessibilityHintWhenZoomedIn
String? accessibilityHintWhenZoomedIn

Added in version 8.3.0

Accessibility hint text used for the control button when zoomed in.

Note

This property is only used on iOS. Android does not have an equivalent accessibility hint concept.

orientation
ZoomSwitchOrientation orientation

Added in version 8.4.0

The orientation of the zoom switch control. Defaults to ZoomSwitchOrientation.defaultOrientation.

isAlwaysExpanded
bool isAlwaysExpanded

Added in version 8.4.0

When true, the control is always shown in its expanded state, displaying all zoom levels regardless of user interaction, and isExpanded is always true. When false, the control can be collapsed. Defaults to false.

isExpanded
bool isExpanded

Added in version 8.4.0

Whether the control is currently expanded, showing all zoom levels. Can be set programmatically to expand or collapse the control. When isAlwaysExpanded is true, this property always returns true and setting it has no effect.

selectedZoomLevel
double get selectedZoomLevel

Added in version 8.4.0

The currently selected zoom level.

accessibilityLabel
String accessibilityLabel

Added in version 8.4.0

The accessibility label. The placeholder <level> is replaced with the zoom factor of each button. Defaults to "Zoom <level>".

accessibilityHint
String accessibilityHint

Added in version 8.4.0

The accessibility hint. Defaults to "Adjusts the camera zoom level".

selectZoomLevel(zoomLevel)
Future<double> selectZoomLevel(double zoomLevel)

Added in version 8.4.0

Selects the given zoom level, clamped to the range supported by the camera hardware. Returns the actual zoom level that was applied.