backgroundColor method

Widget backgroundColor(
  1. Color color
)

Applies a decoration to the widget with a background color.

Implementation

Widget backgroundColor(Color color) {
  return DecoratedBox(
    decoration: BoxDecoration(color: color),
    child: this,
  );
}