applyConstraint method

Widget applyConstraint({
  1. ConstraintId? id,
  2. double width = wrapContent,
  3. double height = wrapContent,
  4. double? size,
  5. ConstraintAlign? left,
  6. ConstraintAlign? top,
  7. ConstraintAlign? right,
  8. ConstraintAlign? bottom,
  9. ConstraintAlign? baseline,
  10. EdgeInsets clickPadding = EdgeInsets.zero,
  11. CLVisibility visibility = visible,
  12. bool percentageMargin = false,
  13. EdgeInsets margin = EdgeInsets.zero,
  14. EdgeInsets goneMargin = EdgeInsets.zero,
  15. TextBaseline textBaseline = TextBaseline.alphabetic,
  16. int? zIndex,
  17. Offset translate = Offset.zero,
  18. bool translateConstraint = false,
  19. double widthPercent = 1,
  20. double heightPercent = 1,
  21. PercentageAnchor widthPercentageAnchor = PercentageAnchor.constraint,
  22. PercentageAnchor heightPercentageAnchor = PercentageAnchor.constraint,
  23. double horizontalBias = 0.5,
  24. double verticalBias = 0.5,
  25. ConstraintId? topLeftTo,
  26. ConstraintId? topCenterTo,
  27. ConstraintId? topRightTo,
  28. ConstraintId? centerLeftTo,
  29. ConstraintId? centerTo,
  30. ConstraintId? centerRightTo,
  31. ConstraintId? bottomLeftTo,
  32. ConstraintId? bottomCenterTo,
  33. ConstraintId? bottomRightTo,
  34. ConstraintId? centerHorizontalTo,
  35. ConstraintId? centerVerticalTo,
  36. ConstraintId? outTopLeftTo,
  37. ConstraintId? outTopCenterTo,
  38. ConstraintId? outTopRightTo,
  39. ConstraintId? outCenterLeftTo,
  40. ConstraintId? outCenterRightTo,
  41. ConstraintId? outBottomLeftTo,
  42. ConstraintId? outBottomCenterTo,
  43. ConstraintId? outBottomRightTo,
  44. ConstraintId? centerTopLeftTo,
  45. ConstraintId? centerTopCenterTo,
  46. ConstraintId? centerTopRightTo,
  47. ConstraintId? centerCenterLeftTo,
  48. ConstraintId? centerCenterRightTo,
  49. ConstraintId? centerBottomLeftTo,
  50. ConstraintId? centerBottomCenterTo,
  51. ConstraintId? centerBottomRightTo,
  52. OnLayoutCallback? layoutCallback,
  53. OnPaintCallback? paintCallback,
  54. double chainWeight = 1,
  55. bool percentageTranslate = false,
  56. double minWidth = 0,
  57. double maxWidth = matchParent,
  58. double minHeight = 0,
  59. double maxHeight = matchParent,
  60. double? widthHeightRatio,
  61. bool? ratioBaseOnWidth,
  62. int? eIndex,
  63. PinnedInfo? pinnedInfo,
  64. List<ConstraintId>? anchors,
  65. CalcSizeCallback? calcSizeCallback,
  66. CalcOffsetCallback? calcOffsetCallback,
})

Implementation

Widget applyConstraint({
  ConstraintId? id,
  double width = wrapContent,
  double height = wrapContent,
  double? size,
  ConstraintAlign? left,
  ConstraintAlign? top,
  ConstraintAlign? right,
  ConstraintAlign? bottom,
  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, // default is child index
  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,
  ConstraintId? topLeftTo,
  ConstraintId? topCenterTo,
  ConstraintId? topRightTo,
  ConstraintId? centerLeftTo,
  ConstraintId? centerTo,
  ConstraintId? centerRightTo,
  ConstraintId? bottomLeftTo,
  ConstraintId? bottomCenterTo,
  ConstraintId? bottomRightTo,
  ConstraintId? centerHorizontalTo,
  ConstraintId? centerVerticalTo,
  ConstraintId? outTopLeftTo,
  ConstraintId? outTopCenterTo,
  ConstraintId? outTopRightTo,
  ConstraintId? outCenterLeftTo,
  ConstraintId? outCenterRightTo,
  ConstraintId? outBottomLeftTo,
  ConstraintId? outBottomCenterTo,
  ConstraintId? outBottomRightTo,
  ConstraintId? centerTopLeftTo,
  ConstraintId? centerTopCenterTo,
  ConstraintId? centerTopRightTo,
  ConstraintId? centerCenterLeftTo,
  ConstraintId? centerCenterRightTo,
  ConstraintId? centerBottomLeftTo,
  ConstraintId? centerBottomCenterTo,
  ConstraintId? centerBottomRightTo,
  OnLayoutCallback? layoutCallback,
  OnPaintCallback? paintCallback,
  double chainWeight = 1,
  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,
}) {
  return Constrained(
    key: key,
    constraint: Constraint(
      id: id,
      width: width,
      height: height,
      size: size,
      left: left,
      top: top,
      right: right,
      bottom: bottom,
      baseline: baseline,
      clickPadding: clickPadding,
      visibility: visibility,
      percentageMargin: percentageMargin,
      margin: margin,
      goneMargin: goneMargin,
      textBaseline: textBaseline,
      zIndex: zIndex,
      translate: translate,
      translateConstraint: translateConstraint,
      widthPercent: widthPercent,
      heightPercent: heightPercent,
      widthPercentageAnchor: widthPercentageAnchor,
      heightPercentageAnchor: heightPercentageAnchor,
      horizontalBias: horizontalBias,
      verticalBias: verticalBias,
      topLeftTo: topLeftTo,
      topCenterTo: topCenterTo,
      topRightTo: topRightTo,
      centerLeftTo: centerLeftTo,
      centerTo: centerTo,
      centerRightTo: centerRightTo,
      bottomLeftTo: bottomLeftTo,
      bottomCenterTo: bottomCenterTo,
      bottomRightTo: bottomRightTo,
      centerHorizontalTo: centerHorizontalTo,
      centerVerticalTo: centerVerticalTo,
      layoutCallback: layoutCallback,
      paintCallback: paintCallback,
      percentageTranslate: percentageTranslate,
      minWidth: minWidth,
      maxWidth: maxWidth,
      minHeight: minHeight,
      maxHeight: maxHeight,
      widthHeightRatio: widthHeightRatio,
      ratioBaseOnWidth: ratioBaseOnWidth,
      outTopLeftTo: outTopLeftTo,
      outTopCenterTo: outTopCenterTo,
      outTopRightTo: outTopRightTo,
      outCenterLeftTo: outCenterLeftTo,
      outCenterRightTo: outCenterRightTo,
      outBottomLeftTo: outBottomLeftTo,
      outBottomCenterTo: outBottomCenterTo,
      outBottomRightTo: outBottomRightTo,
      centerTopLeftTo: centerTopLeftTo,
      centerTopCenterTo: centerTopCenterTo,
      centerTopRightTo: centerTopRightTo,
      centerCenterLeftTo: centerCenterLeftTo,
      centerCenterRightTo: centerCenterRightTo,
      centerBottomLeftTo: centerBottomLeftTo,
      centerBottomCenterTo: centerBottomCenterTo,
      centerBottomRightTo: centerBottomRightTo,
      eIndex: eIndex,
      pinnedInfo: pinnedInfo,
      anchors: anchors,
      calcSizeCallback: calcSizeCallback,
      calcOffsetCallback: calcOffsetCallback,
    ),
    child: this,
  ).enter();
}