icon method

ButtonStyle icon({
  1. BoxShape shape = BoxShape.circle,
  2. double? size,
})

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,
  );
}