CrosshairBehavior class

Customizes the crosshair.

Inheritance

Constructors

CrosshairBehavior({ActivationMode activationMode, CrosshairLineType lineType, List<double> lineDashArray, bool enable: false, Color lineColor, double lineWidth: 1, bool shouldAlwaysShow: false })

Properties

activationMode ActivationMode
Gesture for activating the crosshair. Crosshair can be activated in tap, double tap and long press. [...]
final
enable bool
Toggles the visibility of the crosshair. [...]
final
lineColor Color
Color of the crosshair line. Color will be applied based on the brightness property of the app. [...]
final
lineDashArray List<double>
Dashes of the crosshair line. Any number of values can be provided in the list. Odd value is considered as rendering size and even value is considered as gap. [...]
final
lineType CrosshairLineType
Type of crosshair line. By default, both vertical and horizontal lines will be displayed. You can change this by specifying values to this property. [...]
final
lineWidth double
Width of the crosshair line. [...]
final
shouldAlwaysShow bool
Enables or disables the crosshair. By default, the crosshair will be hidden on touch. To avoid this, set this property to true. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

hide() → void
Hides the crosshair if it is displayed.
onDoubleTap(double xPos, double yPos) → void
Enables the crosshair on double tap.
override
onLongPress(double xPos, double yPos) → void
Enables the crosshair on long press.
override
onPaint(Canvas canvas) → void
Draws the crosshair.
override
onTouchDown(double xPos, double yPos) → void
Enables the crosshair on touch down.
override
onTouchMove(double xPos, double yPos) → void
Enables the crosshair on touch move.
override
onTouchUp(double xPos, double yPos) → void
Enables the crosshair on touch up.
override
show(double x, double y) → void
Displays the crosshair at the specified x and y-positions.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited