scale method

ExpandIconTheme scale(
  1. double factor
)

Returns a scaled copy with all spatial fields multiplied by factor.

Scales: width, height, padding, margin. Leaves untouched: widget, color, expandedColor. Identity: scale(1.0) returns this.

Implementation

ExpandIconTheme scale(double factor) {
  assert(factor > 0, 'scale factor must be > 0, got $factor');
  if (factor == 1.0) return this;
  return copyWith(
    width: width * factor,
    height: height * factor,
    padding: padding * factor,
    margin: margin * factor,
  );
}