boxContainer static method

Container boxContainer({
  1. EdgeInsetsGeometry? margin,
  2. EdgeInsetsGeometry? padding,
  3. CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.start,
  4. Color color = Colors.transparent,
  5. Color borderColor = Colors.transparent,
  6. required List<Widget> children,
  7. double borderWidth = 0.5,
  8. double borderRadius = 10,
})

Box Container

Implementation

static Container boxContainer(
    {EdgeInsetsGeometry? margin,
    EdgeInsetsGeometry? padding,
    CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.start,
    Color color = Colors.transparent,
    Color borderColor = Colors.transparent,
    required List<Widget> children,
    double borderWidth = 0.5,
    double borderRadius = 10}) {
  if (margin == null) margin = EdgeInsets.all(0);
  if (padding == null) padding = EdgeInsets.all(0);
  return Container(
      margin: margin,
      padding: padding,
      decoration: BoxDecoration(
        color: color,
        borderRadius: BorderRadius.circular(borderRadius),
        border: Border.all(
            width: borderWidth, color: borderColor, style: BorderStyle.solid),
      ),
      child: Column(
        crossAxisAlignment: crossAxisAlignment,
        children: children,
      ));
}