getShape method Null safety

ShapeBorder getShape(
  1. MaterialButton button
)

The shape of the button's Material.

Returns the button's MaterialButton.shape if it is non-null, otherwise shape is returned.

Implementation

ShapeBorder getShape(MaterialButton button) {
  return button.shape ?? shape;
}