LinkData class
Class that carries all link data.
- Mixed-in types
Constructors
-
LinkData({required String id, required String sourceComponentId, required String targetComponentId, LinkStyle? linkStyle, required List<
Offset> linkPoints, dynamic data}) - Represents data of a link/connection in the model.
-
LinkData.fromJson(Map<
String, dynamic> json, {dynamic decodeCustomLinkData(Map<String, dynamic> json)?})
Properties
- areJointsVisible ↔ bool
-
Defines the visibility of link's joints.
getter/setter pair
- data ↔ dynamic
-
Dynamic data for you to define your own data for this link.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- id → String
-
Unique link id.
final
-
linkPoints
→ List<
Offset> -
Points from which the link is drawn on canvas.
final
- linkStyle → LinkStyle
-
Defines link design such as color, width and arrowheads.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourceComponentId → String
-
Id of source component.
final
- targetComponentId → String
-
Id of target component.
final
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
determineLinkSegmentIndex(
Offset position, Offset canvasPosition, double canvasScale) → int? - If a link is compound from more than one segments this returns an index of the link segment, which was tapped on.
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
getLinkPoints(
) → List< Offset> - Returns list of all point of the link.
-
hideJoints(
) → void - Hides all link's joint.
-
insertMiddlePoint(
Offset position, int index) → void -
Adds a new point to link on
point
location. -
moveAllMiddlePoints(
Offset position) → void -
Updates all link's middle points position by
offset
. -
moveMiddlePoint(
Offset offset, int index) → void -
Updates link's point position by
offset
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
removeMiddlePoint(
int index) → void -
Removes the point on
index
^th place from the link. -
setEnd(
Offset end) → void - Sets the position of the last point of the link which lies on the target component.
-
setEndpoints(
Offset start, Offset end) → void - Sets the position of both first and last point of the link.
-
setMiddlePointPosition(
Offset position, int index) → void -
Sets the new position (
point
) to the existing link's point. -
setStart(
Offset start) → void - Sets the position of the first point of the link which lies on the source component.
-
showJoints(
) → void - Makes all link's joint visible.
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
-
updateLink(
) → void - Updates this link on the canvas.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited