getMaterialTapTargetSize method

MaterialTapTargetSize getMaterialTapTargetSize (MaterialButton button)

The minimum size of the button's tap target.

Returns the button's MaterialButton.tapTargetSize if it is non-null.

Otherwise the value of the materialTapTargetSize constructor parameter is returned if that's non-null.

Otherwise MaterialTapTargetSize.padded is returned.

Implementation

MaterialTapTargetSize getMaterialTapTargetSize(MaterialButton button) {
  return button.materialTapTargetSize ?? _materialTapTargetSize ?? MaterialTapTargetSize.padded;
}