icon method
Creates a copy of this ButtonStyle but with padding is EdgeInsets.zero and squared size.
Implementation
ButtonStyle icon({
BoxShape shape = BoxShape.circle,
double? size,
}) {
return copyWith(
shape: shape,
width: size ?? defaults.height,
height: size ?? defaults.height,
padding: EdgeInsets.zero,
);
}