PositionConstraint constructor

const PositionConstraint({
  1. required PositionUnit position,
  2. PositionUnit min = const PositionFixed(double.negativeInfinity),
  3. PositionUnit max = const PositionFixed(double.infinity),
})

Creates a constrained position unit.

The position is required. If min or max are not provided, they default to negative and positive infinity respectively, effectively having no constraint.

Implementation

const PositionConstraint({
  required this.position,
  this.min = const PositionFixed(double.negativeInfinity),
  this.max = const PositionFixed(double.infinity),
});