containerComponent function

Widget containerComponent(
  1. BuildContext context,
  2. Widget childWidget, {
  3. double? height,
  4. double? width,
  5. EdgeInsetsGeometry? padding,
  6. EdgeInsetsGeometry? margin,
  7. Color? color,
  8. Color? borderColor,
  9. double? borderWidth,
  10. double? borderRadius,
})

Implementation

Widget containerComponent(BuildContext context, Widget childWidget,
    {double? height,
      double? width,
      EdgeInsetsGeometry? padding,
      EdgeInsetsGeometry? margin,
      Color? color,
      Color? borderColor,
      double? borderWidth,
      double? borderRadius}) {
  return Container(
    height: height,
    width: width,
    padding: padding,
    margin: margin,
    decoration: BoxDecoration(
        color: color,
        border: Border.all(color: borderColor!, width: borderWidth!),
        borderRadius: BorderRadius.circular(borderRadius!)),
    child: childWidget,
  );
}