backgroundColor method

Button backgroundColor(
  1. Color? color
)

A modifier that sets its Button's background color

Example:

Button(() => Text('Beautiful colors!'))
    .backgroundColor(Colors.red)

Implementation

Button backgroundColor(Color? color) {
  return _rebase(
    style: FlutterUIButtonStyle.rebase(
      this.style,
      backgroundColor: MaterialStateProperty.all(color),
    ),
  );
}