PositionSnappingOptions class

Snapping options for positioning sprites.

Constructors

PositionSnappingOptions({bool? enabled, double? snapToBottom, bool? snapToHorizontalCenter, double? snapToLeft, double? snapToRight, double? snapToTop, bool? snapToVerticalCenter, double? threshold})
Creates new PositionSnappingOptions.

Properties

enabled bool?
Whether sprites should snap to specific positions during pan interactions. This switch enables or disables position snapping.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snapToBottom double?
The bottom side of a sprite's bounding box snaps to a horizontal line which is shifted from the bottom side of the edited image towards its center by this value. The value is measured in normalized coordinates relative to the smaller side of the edited image. If this value is explicitly set to null this snapping line is disabled.
final
snapToHorizontalCenter bool?
If enabled a sprite's center snaps to the horizontal line through the center of the edited image.
final
snapToLeft double?
The bottom side of a sprite's bounding box snaps to a horizontal line which is shifted from the left side of the edited image towards its center by this value. The value is measured in normalized coordinates relative to the smaller side of the edited image. If this value is explicitly set to null this snapping line is disabled.
final
snapToRight double?
The bottom side of a sprite's bounding box snaps to a horizontal line which is shifted from the right side of the edited image towards its center by this value. The value is measured in normalized coordinates relative to the smaller side of the edited image. If this value is explicitly set to null this snapping line is disabled.
final
snapToTop double?
The bottom side of a sprite's bounding box snaps to a horizontal line which is shifted from the right side of the edited image towards its center by this value. The value is measured in normalized coordinates relative to the smaller side of the edited image. If this value is explicitly set to null this snapping line is disabled.
final
snapToVerticalCenter bool?
If enabled a sprite's center snaps to the vertical line through the center of the edited image.
final
threshold double?
This threshold defines the distance of a pan gesture where snapping at a snap point occurs. It is measured in points.
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

Constants

nullSupported → const List<String>
The keys that can explicitly be set to null.