Torch Switch Control
Defined in library scandit_datacapture_core_ui
- TorchSwitchControl
class TorchSwitchControl : Control
Added in version 6.8.0
Control that allows to toggle the torch on and off. The torch switch control hides itself automatically in case the active frame source doesn’t have a torch.
You can add this control to a view by calling DataCaptureView.addControl().
- TorchSwitchControl()
TorchSwitchControl()Added in version 8.3.0
Constructor.
- torchOffImage
Image? get torchOffImage
Added in version 6.8.0
Gets the image encoded as a base64 string used for the control button when the torch is off.
- torchOffPressedImage
Image? get torchOffPressedImage
Added in version 6.8.0
Gets the image encoded as a base64 string used for the control button when the torch is off and the button is pressed.
- torchOnImage
Image? get torchOnImage
Added in version 6.8.0
Gets the image encoded in a base64 string used for the control button when the torch is on.
- torchOnPressedImage
Image? get torchOnPressedImage
Added in version 6.8.0
Gets the image encoded as a base64 string used for the control button when the torch is on and the button is pressed.
- accessibilityLabelWhenOff
String? accessibilityLabelWhenOff
Added in version 8.3.0
Accessibility label text used for the control button when the torch is off.
- accessibilityHintWhenOff
String? accessibilityHintWhenOff
Added in version 8.3.0
Accessibility hint text used for the control button when the torch is off.
Note
This property will have no effect when running on Android.
- accessibilityLabelWhenOn
String? accessibilityLabelWhenOn
Added in version 8.3.0
Accessibility label text used for the control button when the torch is on.
- accessibilityHintWhenOn
String? accessibilityHintWhenOn
Added in version 8.3.0
Accessibility hint text used for the control button when the torch is on.
Note
This property will have no effect when running on Android.
- setTorchOffImage(image)
Future<
void> setTorchOffImage(Image? image)Added in version 6.8.0
Sets the resource to use for the control button image when the torch is off.
- setTorchOffPressedImage(image)
Future<
void> setTorchOffPressedImage(Image? image)Added in version 6.8.0
Sets the resource to use for the control button image when the torch is off and the button is pressed.