scale method Null safety

BoxDecoration scale(
  1. double factor

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


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,