DragConstraints class

Constraints for drag operations.

Constructors

DragConstraints({double? minX, double? maxX, double? minY, double? maxY})
Creates DragConstraints.
const
DragConstraints.fromRect(Rect rect)
Creates constraints from a Rect.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
maxX double?
The maximum x position.
final
maxY double?
The maximum y position.
final
minX double?
The minimum x position.
final
minY double?
The minimum y position.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

constrain(Offset position) Offset
Constrains a position to the bounds.
contains(Offset position) bool
Whether a position is within the constraints.
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

none → const DragConstraints
No constraints.