axis property

Axis? axis
final

The Axis to restrict this draggable's movement, if specified.

When axis is set to Axis.horizontal, this widget can only be dragged horizontally. Behavior is similar for Axis.vertical.

Defaults to allowing drag on both Axis.horizontal and Axis.vertical.

When null, allows drag on both Axis.horizontal and Axis.vertical.

For the direction of gestures this widget competes with to start a drag event, see Draggable.affinity.

Implementation

final Axis? axis;