buildBackground method

Widget buildBackground({
  1. Widget? background,
  2. Color? color,
})

Builds a container with widget background or color. Defaults to a white background.

Implementation

Widget buildBackground({Widget? background, Color? color}) {
  if (background != null) return background;
  if (color != null) return Container(color: color);

  return Container(color: Colors.white);
}