background method

Widget background({
  1. EdgeInsetsGeometry? padding,
  2. Border? border,
  3. Color color = Colors.green,
  4. double radius = 0,
  5. List<BoxShadow>? boxShadow,
  6. Gradient? gradient,
})

Implementation

Widget background(
    {
      EdgeInsetsGeometry? padding,
      Border? border,
      Color color = Colors.green,
      double radius = 0,
      List<BoxShadow>? boxShadow,
      Gradient? gradient,
    }) {
  return Container(
    padding: padding,
    decoration: BoxDecoration(
      color: color,
      borderRadius: radius == 0 ? null : BorderRadius.circular(radius),
      border: border,
      boxShadow: boxShadow,
      gradient: gradient,
    ),
    child: this,
  );
}