Resource Base
Table of contents

TorchButton

TorchButton is a class that represents a torch (flashlight) toggle button - allowing the user to customize the torch button of the CameraView how they see fit.

Definition

Assembly: dynamsoft_capture_vision_flutter

class TorchButton

Constructor

TorchButton({
  required this.location,
  this.torchOnImageBase64,
  this.torchOffImageBase64,
});

Properties

Property Description  
location Rect Defines the location of the camera button. This rectangle specifies the button’s position and size on the screen. Coordinates are in logical pixels.
torchOnImageBase64 String Sets the icon image (as a base64 string) that will be displayed when the torch is on.
torchOffImageBase64 String Sets the icon image (as a base64 string) that will be displayed when the torch is off.

location

Sets the location of the torch button as a Rect - this rectangle specifies the button’s position and size on the screen. When creating a custom torch button, this property must be set.

Rect location;

Remarks

When setting the rectangle, please remember that the coordinates are in pixels.

torchOnImageBase64

Sets the icon image (as a base64 string) that will be displayed when the torch is on.

String? torchOnImageBase64;

torchOffImageBase64

Sets the icon image (as a base64 string) that will be displayed when the torch is off.

String? torchOffImageBase64;

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: