backgroundColor method

DecoratedBox backgroundColor(
  1. Color? color
)

Extension for coloring a widget with DecoratedBox

Implementation

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