HorizontalLineAddingPreviewMobile class
A class to show a preview and handle adding a HorizontalLineInteractableDrawing to the chart. It's for when we're on InteractiveLayerMobileBehaviour.
This mobile preview provides immediate focus mode by:
- Automatically placing the line at the center of the chart
- Immediately completing the adding process for instant focus mode
- Delegating visual rendering to the main drawing for consistency
- Providing full functionality (drag, neon effects, proper labeling)
- Inheritance
-
- Object
- DrawingAddingPreview<
HorizontalLineInteractableDrawing> - HorizontalLineAddingPreviewMobile
Constructors
- HorizontalLineAddingPreviewMobile({required InteractiveLayerBehaviour interactiveLayerBehaviour, required HorizontalLineInteractableDrawing interactableDrawing, required dynamic onAddingStateChange(AddingStateInfo)})
- Initializes HorizontalLineInteractableDrawing.
Properties
- canStartDragFromEmpty → bool
-
Whether this preview can start a drag gesture even when nothing has
been placed yet, i.e. before hitTest has anything to return
truefor.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The id of the drawing which should be unique for each drawing in
InteractiveLayer.no setteroverride - interactableDrawing → HorizontalLineInteractableDrawing
-
The reference to the InteractableDrawing instance of the drawing tool
that is going to be added.
finalinherited
- interactiveLayerBehaviour → InteractiveLayerBehaviour
-
The current interactive layer behaviour which is active and defines how
this preview should behave.
finalinherited
- onAddingStateChange → dynamic Function(AddingStateInfo)
-
A callback to the current step of the tool adding process.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
hitTest(
Offset offset, EpochToX epochToX, QuoteToY quoteToY) → bool -
Returns
trueif the drawing tool is hit by the given offset.override -
isInViewPort(
EpochRange epochRange, QuoteRange quoteRange) → bool -
Determines if the drawing preview is within the current chart viewport.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onCreateTap(
TapUpDetails details, EpochFromX epochFromX, QuoteFromY quoteFromY, EpochToX epochToX, QuoteToY quoteToY) → void -
Handles tap events during the drawing creation process.
override
-
onDragEnd(
DragEndDetails details, EpochFromX epochFromX, QuoteFromY quoteFromY, EpochToX epochToX, QuoteToY quoteToY) → void -
Handles the end of a drag gesture during drawing creation.
inherited
-
onDragStart(
DragStartDetails details, EpochFromX epochFromX, QuoteFromY quoteFromY, EpochToX epochToX, QuoteToY quoteToY) → void -
Handles the start of a drag gesture during drawing creation.
override
-
onDragUpdate(
DragUpdateDetails details, EpochFromX epochFromX, QuoteFromY quoteFromY, EpochToX epochToX, QuoteToY quoteToY) → void -
Handles updates during a drag gesture for drawing creation.
override
-
onHover(
PointerHoverEvent event, EpochFromX epochFromX, QuoteFromY quoteFromY, EpochToX epochToX, QuoteToY quoteToY) → void -
Handles hover events during drawing creation (desktop platforms).
inherited
-
onLongPressEnd(
EpochFromX epochFromX, QuoteFromY quoteFromY, EpochToX epochToX, QuoteToY quoteToY) → void -
Called when a long press ends on the drawing tool.
inherited
-
onLongPressStart(
Offset localPosition, EpochFromX epochFromX, QuoteFromY quoteFromY, EpochToX epochToX, QuoteToY quoteToY) → void -
Called when a long press starts on the drawing tool.
inherited
-
paint(
Canvas canvas, Size size, EpochToX epochToX, QuoteToY quoteToY, AnimationInfo animationInfo, ChartConfig chartConfig, ChartTheme chartTheme, GetDrawingState drawingState) → void -
Paints the drawing tool on the chart.
override
-
paintOverYAxis(
Canvas canvas, Size size, EpochToX epochToX, QuoteToY quoteToY, EpochFromX? epochFromX, QuoteFromY? quoteFromY, AnimationInfo animationInfo, ChartConfig chartConfig, ChartTheme chartTheme, GetDrawingState getDrawingState) → void -
Paints the drawing tool chart but over the Y-axis.
override
-
shouldRepaint(
Set< DrawingToolState> drawingState, DrawingV2 oldDrawing) → bool -
Determines if the drawing preview needs to be repainted.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited