Options class
The core api for Graph Options.
图配置项
Constructors
- Options()
Properties
- backgroundBuilder ↔ BackgroundBuilder
-
use for create background widget.
getter/setter pair
- batchIndex ↔ int
-
@en: Calculate the current batch of layout in batches
getter/setter pair
- edgePanelBuilder ↔ EdgePanelBuilder?
-
The builder of the edge data panel, triggered when the mouse hovers.
getter/setter pair
- edgeShape ↔ EdgeShape
-
set shape strategy for components of edge.
getter/setter pair
- enableHit ↔ bool
-
if enable hit.
getter/setter pair
- graph ↔ Graph
-
getter/setter pair
- graphComponentBuilder ↔ GraphComponentBuilder
-
getter/setter pair
- graphStyle ↔ GraphStyle
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- horizontalControllerHeight ↔ double
-
@en: the horizontal controller panel height. Default to
50
getter/setter pair -
horizontalPanelVisible
↔ ValueNotifier<
bool> -
getter/setter pair
- hoverable ↔ bool
-
getter/setter pair
- imgUrlGetter ↔ String? Function(Vertex)
-
@en: the url getter of vertex image.
getter/setter pair
-
offset
↔ ValueNotifier<
Offset> -
@en: The offset of the canvas relative to viewport.
getter/setter pair
- onPointerHover ↔ void Function(PointerHoverEvent)
-
getter/setter pair
- onPointerSignal ↔ void Function(PointerSignalEvent)
-
getter/setter pair
- onPointerUp ↔ void Function(PointerUpEvent)
-
getter/setter pair
- onScaleStart ↔ void Function(ScaleStartDetails)
-
getter/setter pair
- onScaleUpdate ↔ void Function(ScaleUpdateDetails)
-
getter/setter pair
- onVertexTapCancel ↔ dynamic Function(Vertex vertex, dynamic)?
-
@en: event callback when tap cancel on vertex.
getter/setter pair
- onVertexTapDown ↔ dynamic Function(Vertex vertex, dynamic)?
-
@en: event callback when tap down on vertex.
getter/setter pair
- onVertexTapUp ↔ dynamic Function(Vertex vertex, dynamic)?
-
@en: event callback when tap up on vertex.
getter/setter pair
- panDelta → Vector2
-
@en: The drag range of the touchpad is used to distinguish whether it triggers a node click event or a pure drag event
final
- panelDelay ↔ Duration?
-
@en: the delay of overlay disappear.
getter/setter pair
-
pause
↔ ValueNotifier<
bool> -
@en: an custom vertex component constructor.
getter/setter pair
- perBatchTotal ↔ int
-
@en: Due to the large amount of data, layout calculations can easily get stuck in the UI,
so data is calculated in batches to update section positions
Default: Update the positions of 100 vertexes in a single updategetter/setter pair - pointer → Vector2
-
@en: The position of the mouse in the initial state.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scale
↔ ValueNotifier<
double> -
@en: Real time zoom factor of canvas.
getter/setter pair
- scaleRange ↔ Vector2
-
@en: the graph scale range. default to
Vector2(0.05, 5)
getter/setter pair - scaleVal ↔ double
-
@en: Canvas zoom factor during the most recent touchpad zoom.
getter/setter pair
- showText ↔ bool
-
@en: if show text in vertex. default
vertex.id
, if you want to show other text, you can settextGetter
.getter/setter pair -
size
↔ ValueNotifier<
Size> -
getter/setter pair
- textGetter ↔ String Function(Vertex)
-
@en: the text getter of vertex.
getter/setter pair
- vertexPanelBuilder ↔ VertexPanelBuilder?
-
The builder of the vertex panel, triggered when the mouse hovers.
getter/setter pair
- vertexShape ↔ VertexShape
-
set shape strategy for components of vertex.
getter/setter pair
- vertexTapUpPanel ↔ Widget?
-
getter/setter pair
-
vertexTapUpPanelVisible
↔ ValueNotifier<
bool> -
@en: The visual status of the panel when a vertex is clicked
getter/setter pair
- vertexTapUpPanelWidth ↔ double
-
@en: the vertex tap up panel width. Default to
430
getter/setter pair -
verticalControllerVisible
↔ ValueNotifier<
bool> -
getter/setter pair
- verticalControllerWidth ↔ double
-
@en: the vertical controller panel width. Default to
340
getter/setter pair - visibleWorldRect → Rect
-
@en: The coordinates formed by the viewport on the canvas
no setter
- zoomPerScrollUnit ↔ double
-
@en
@zh: 鼠标滚轮,滚动次数转换成缩放比例的系数
scale.value = scrollDelta.dy.sign * zoomPerScrollUnit
getter/setter pair
Methods
-
currantBatchRange(
) → List< int> - @en: Retrieve the index range of the current batch in the vertex collection
-
globalToLocal(
Vector2 global, {double? scale}) → Vector2 - @en: Convert coordinates from viewport to coordinates within the canvas.
-
hideHorizontalOverlay(
) → void -
hideVertexTapUpPanel(
) → void -
hideVerticalPanel(
) → void -
keepCenter(
double oldScale, double newScale, Size size, Offset localPosition, ValueNotifier< Offset> offset) → void -
@en: When the canvas undergoes a zoom operation,
make the canvas zoom in and out with the mouse focus as the center. -
localToGlobal(
Vector2 position) → Vector2 - @en: Convert the coordinates within the canvas to the coordinates in viewport.
-
mergeGraph(
dynamic graphData, {bool manual = true}) → void - @en: Merge the graph data.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refreshData(
dynamic data) → void - @en: Refresh graph data.
-
run(
) → dynamic -
setDefaultVertexColor(
) → dynamic - @en: Set default colors for different labels.
-
showVertexTapUpPanel(
) → void -
showVerticalPanel(
) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited