scale method

  1. @override
BoxDecoration scale(
  1. double factor
)
override

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

Implementation

@override
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 as List<BoxShadow>, factor),
    gradient: gradient?.scale(factor),
    shape: shape,
  );
}