scale method

BoxDecoration scale (double factor)

Returns a new box decoration that is scaled by the given factor.

Implementation

BoxDecoration scale(double factor) {
  return BoxDecoration(
    color: Color.lerp(null, color, factor),
    image: image, // TODO(ianh): fade the image from transparent
    border: BoxBorder.lerp(null, border, factor),
    borderRadius: BorderRadiusGeometry.lerp(null, borderRadius, factor),
    boxShadow: BoxShadow.lerpList(null, boxShadow, factor),
    gradient: gradient?.scale(factor),
    shape: shape,
  );
}