Pinned constructor

Pinned({
  1. Key? key,
  2. double? left,
  3. double? leftFraction,
  4. double? right,
  5. double? rightFraction,
  6. double? width,
  7. double? horizontalMiddle,
  8. double? top,
  9. double? topFraction,
  10. double? bottom,
  11. double? bottomFraction,
  12. double? height,
  13. double? verticalMiddle,
  14. required Widget child,
})

Constructs a Pinned instance by building horizontal & vertical Pin instances from semantic parameters. For example, providing left & width parameters would result in a hPin having start and size values.

Implementation

Pinned({
  Key? key,
  double? left,
  double? leftFraction,
  double? right,
  double? rightFraction,
  double? width,
  double? horizontalMiddle,
  double? top,
  double? topFraction,
  double? bottom,
  double? bottomFraction,
  double? height,
  double? verticalMiddle,
  required Widget child,
}) : this.fromPins(
          Pin(
            start: left,
            startFraction: leftFraction,
            end: right,
            endFraction: rightFraction,
            size: width,
            middle: horizontalMiddle,
          ),
          Pin(
            start: top,
            startFraction: topFraction,
            end: bottom,
            endFraction: bottomFraction,
            size: height,
            middle: verticalMiddle,
          ),
          child: child,
          key: key);