rebase static method

ButtonStyle rebase(
  1. ButtonStyle? style, {
  2. MaterialStateProperty<Color?>? backgroundColor,
})

Method for modifying final properties.

Implementation

static ButtonStyle rebase(
  ButtonStyle? style, {
  MaterialStateProperty<Color?>? backgroundColor,
}) {
  return ButtonStyle(
    backgroundColor: backgroundColor ?? style?.backgroundColor,
  );
}