container method

Widget container({
  1. double? width,
  2. double? height,
  3. Alignment? alignment,
  4. Color? backgroundColor,
  5. double borderWidth = 1,
  6. double radius = 1,
  7. Color borderColor = Colors.transparent,
  8. EdgeInsets? padding,
  9. EdgeInsets? margin,
  10. BoxConstraints? constraints,
})

Implementation

Widget container({
  double? width,
  double? height,
  Alignment? alignment,
  Color? backgroundColor,
  double borderWidth = 1,
  double radius = 1,
  Color borderColor = Colors.transparent,
  EdgeInsets? padding,
  EdgeInsets? margin,
  BoxConstraints? constraints,
}) => Container(
  clipBehavior: Clip.hardEdge,
  constraints: constraints,
  width: width,
  height: height,
  padding: padding,
  margin: margin,
  alignment: alignment,
  decoration: BoxDecoration(
    color: backgroundColor,
    borderRadius: BorderRadius.circular(radius),
    border: Border.all(color: borderColor, width: borderWidth),
  ),
  child: this,
);