HitTestResult class

Result of a hit test operation.

Contains information about what element (if any) was found at the tested position.

Constructors

HitTestResult({String? nodeId, String? portId, String? connectionId, bool? isOutput, Offset? position, HitTarget hitType = HitTarget.canvas})
const

Properties

connectionId → String?
The ID of the hit connection (if hitType is HitTarget.connection).
final
hashCode → int
The hash code for this object.
no setterinherited
hitType → HitTarget
The type of element that was hit.
final
isCanvas → bool
Returns true if empty canvas was hit (no elements).
no setter
isConnection → bool
Returns true if a connection was hit.
no setter
isNode → bool
Returns true if a node was hit.
no setter
isOutput → bool?
Whether the hit port is an output port.
final
isPort → bool
Returns true if a port was hit.
no setter
nodeId → String?
The ID of the hit node (if hitType is HitTarget.node or HitTarget.port).
final
portId → String?
The ID of the hit port (if hitType is HitTarget.port).
final
position → Offset?
The position where the hit occurred in graph coordinates.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited