CrosshairBehavior class

This class has the properties of the crosshair behavior.

Crosshair behavior has the activation mode and line type property to set the behavior of the crosshair. It also has the property to customize the appearance.

Provide options for activation mode, line type, line color, line width, hide delay for customizing the behavior of the crosshair.

Constructors

CrosshairBehavior({ActivationMode activationMode = ActivationMode.longPress, CrosshairLineType lineType = CrosshairLineType.both, List<double>? lineDashArray, bool enable = false, Color? lineColor, double lineWidth = 1, bool shouldAlwaysShow = false, double hideDelay = 0})
Creating an argument constructor of CrosshairBehavior class.

Properties

activationMode ActivationMode
Gesture for activating the crosshair.
final
enable bool
Toggles the visibility of the crosshair.
final
hashCode int
The hash code for this object.
no setteroverride
hideDelay double
Time delay for hiding the crosshair.
final
lineColor Color?
Color of the crosshair line.
final
lineDashArray List<double>?
Dashes of the crosshair line.
final
lineType CrosshairLineType
Type of crosshair line.
final
lineWidth double
Width of the crosshair line.
final
parentBox RenderBox?
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldAlwaysShow bool
Enables or disables the crosshair.
final

Methods

hide() → void
Hides the crosshair if it is displayed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
show(dynamic x, double y, [String coordinateUnit = 'point']) → void
Displays the crosshair at the specified x and y-positions.
showByIndex(int pointIndex) → void
Displays the crosshair at the specified point index.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override