positioned method

Widget positioned({
  1. double? top,
  2. double? bottom,
  3. double? left,
  4. double? right,
  5. double? height,
  6. double? width,
  7. bool isFilled = false,
})

Extension for Stack Positioned

Implementation

Widget positioned(
    {double? top,
    double? bottom,
    double? left,
    double? right,
    double? height,
    double? width,
    bool isFilled = false}) {
  return isFilled
      ? Positioned.fill(
          key: key,
          top: top,
          bottom: bottom,
          left: left,
          right: right,
          child: this,
        )
      : Positioned(
          key: key,
          top: top,
          bottom: bottom,
          left: left,
          right: right,
          height: height,
          width: width,
          child: this,
        );
}