ShapeAdjustment class final

An on-canvas handle bound to the numeric value field, such as an arrow's shaft thickness: dragging it sets the value within the field's bounds. Right/up increase; left/down decrease.

Positions and directions are in unit coordinates of the shape frame and read the shape's current values.

Constructors

ShapeAdjustment({required String field, required String label, double step = .01, double pixelsPerStep = 4, ShapeAdjustmentHandle handle = ShapeAdjustmentHandle.diamond, DiagramPoint? position(Map<String, Object?> values)?, DiagramPoint? direction(Map<String, Object?> values)?, double? drag(Map<String, Object?> values, DiagramPoint delta, double previousValue)?, Iterable<double> snapStops(Map<String, Object?> values, {required bool shiftPressed})?})
const

Properties

direction → DiagramPoint? Function(Map<String, Object?> values)?
The shape-local direction that increases the value; null scrubs right/up.
final
drag → double? Function(Map<String, Object?> values, DiagramPoint delta, double previousValue)?
The value for a unit-coordinate pointer delta, or null to scrub.
final
field → String
The NumberValueField this handle sets; its minimum, maximum and integer constraint bound the handle.
final
handle → ShapeAdjustmentHandle
final
hashCode → int
The hash code for this object.
no setterinherited
label → String
final
pixelsPerStep → double
final
position → DiagramPoint? Function(Map<String, Object?> values)?
Where the handle sits on the geometry; null places it on the frame's top edge.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
snapStops → Iterable<double> Function(Map<String, Object?> values, {required bool shiftPressed})?
Meaningful values for magnetic snapping, or strict snapping with Shift.
final
step → double
final

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