Constraint constructor
Constraint({
- ConstraintId? id,
- double width = wrapContent,
- double height = wrapContent,
- double? size,
- @_baseConstraint ConstraintAlign? left,
- @_baseConstraint ConstraintAlign? top,
- @_baseConstraint ConstraintAlign? right,
- @_baseConstraint ConstraintAlign? bottom,
- @_baseConstraint ConstraintAlign? baseline,
- EdgeInsets clickPadding = EdgeInsets.zero,
- CLVisibility visibility = visible,
- bool percentageMargin = false,
- EdgeInsets margin = EdgeInsets.zero,
- EdgeInsets goneMargin = EdgeInsets.zero,
- TextBaseline textBaseline = TextBaseline.alphabetic,
- int? zIndex,
- Offset translate = Offset.zero,
- bool translateConstraint = false,
- double widthPercent = 1,
- double heightPercent = 1,
- PercentageAnchor widthPercentageAnchor = PercentageAnchor.constraint,
- PercentageAnchor heightPercentageAnchor = PercentageAnchor.constraint,
- double horizontalBias = 0.5,
- double verticalBias = 0.5,
- @_wrapperConstraint ConstraintId? topLeftTo,
- @_wrapperConstraint ConstraintId? topCenterTo,
- @_wrapperConstraint ConstraintId? topRightTo,
- @_wrapperConstraint ConstraintId? centerLeftTo,
- @_wrapperConstraint ConstraintId? centerTo,
- @_wrapperConstraint ConstraintId? centerRightTo,
- @_wrapperConstraint ConstraintId? bottomLeftTo,
- @_wrapperConstraint ConstraintId? bottomCenterTo,
- @_wrapperConstraint ConstraintId? bottomRightTo,
- @_wrapperConstraint ConstraintId? centerHorizontalTo,
- @_wrapperConstraint ConstraintId? centerVerticalTo,
- @_wrapperConstraint ConstraintId? outTopLeftTo,
- @_wrapperConstraint ConstraintId? outTopCenterTo,
- @_wrapperConstraint ConstraintId? outTopRightTo,
- @_wrapperConstraint ConstraintId? outCenterLeftTo,
- @_wrapperConstraint ConstraintId? outCenterRightTo,
- @_wrapperConstraint ConstraintId? outBottomLeftTo,
- @_wrapperConstraint ConstraintId? outBottomCenterTo,
- @_wrapperConstraint ConstraintId? outBottomRightTo,
- @_wrapperConstraint ConstraintId? centerTopLeftTo,
- @_wrapperConstraint ConstraintId? centerTopCenterTo,
- @_wrapperConstraint ConstraintId? centerTopRightTo,
- @_wrapperConstraint ConstraintId? centerCenterLeftTo,
- @_wrapperConstraint ConstraintId? centerCenterRightTo,
- @_wrapperConstraint ConstraintId? centerBottomLeftTo,
- @_wrapperConstraint ConstraintId? centerBottomCenterTo,
- @_wrapperConstraint ConstraintId? centerBottomRightTo,
- OnLayoutCallback? layoutCallback,
- OnPaintCallback? paintCallback,
- bool percentageTranslate = false,
- double minWidth = 0,
- double maxWidth = matchParent,
- double minHeight = 0,
- double maxHeight = matchParent,
- double? widthHeightRatio,
- bool? ratioBaseOnWidth,
- int? eIndex,
- PinnedInfo? pinnedInfo,
- List<
ConstraintId> ? anchors, - CalcSizeCallback? calcSizeCallback,
- CalcOffsetCallback? calcOffsetCallback,
Implementation
Constraint({
ConstraintId? id,
this.width = wrapContent,
this.height = wrapContent,
this.size,
@_baseConstraint this.left,
@_baseConstraint this.top,
@_baseConstraint this.right,
@_baseConstraint this.bottom,
@_baseConstraint this.baseline,
this.clickPadding = EdgeInsets.zero,
this.visibility = visible,
this.percentageMargin = false,
this.margin = EdgeInsets.zero,
this.goneMargin = EdgeInsets.zero,
this.textBaseline = TextBaseline.alphabetic,
this.zIndex, // default is child index
this.translate = Offset.zero,
this.translateConstraint = false,
this.widthPercent = 1,
this.heightPercent = 1,
this.widthPercentageAnchor = PercentageAnchor.constraint,
this.heightPercentageAnchor = PercentageAnchor.constraint,
this.horizontalBias = 0.5,
this.verticalBias = 0.5,
@_wrapperConstraint this.topLeftTo,
@_wrapperConstraint this.topCenterTo,
@_wrapperConstraint this.topRightTo,
@_wrapperConstraint this.centerLeftTo,
@_wrapperConstraint this.centerTo,
@_wrapperConstraint this.centerRightTo,
@_wrapperConstraint this.bottomLeftTo,
@_wrapperConstraint this.bottomCenterTo,
@_wrapperConstraint this.bottomRightTo,
@_wrapperConstraint this.centerHorizontalTo,
@_wrapperConstraint this.centerVerticalTo,
@_wrapperConstraint this.outTopLeftTo,
@_wrapperConstraint this.outTopCenterTo,
@_wrapperConstraint this.outTopRightTo,
@_wrapperConstraint this.outCenterLeftTo,
@_wrapperConstraint this.outCenterRightTo,
@_wrapperConstraint this.outBottomLeftTo,
@_wrapperConstraint this.outBottomCenterTo,
@_wrapperConstraint this.outBottomRightTo,
@_wrapperConstraint this.centerTopLeftTo,
@_wrapperConstraint this.centerTopCenterTo,
@_wrapperConstraint this.centerTopRightTo,
@_wrapperConstraint this.centerCenterLeftTo,
@_wrapperConstraint this.centerCenterRightTo,
@_wrapperConstraint this.centerBottomLeftTo,
@_wrapperConstraint this.centerBottomCenterTo,
@_wrapperConstraint this.centerBottomRightTo,
this.layoutCallback,
this.paintCallback,
this.percentageTranslate = false,
this.minWidth = 0,
this.maxWidth = matchParent,
this.minHeight = 0,
this.maxHeight = matchParent,
this.widthHeightRatio,
this.ratioBaseOnWidth,
this.eIndex,
this.pinnedInfo,
this.anchors,
this.calcSizeCallback,
this.calcOffsetCallback,
}) : super(id);