shapeDecoration static method

ShapeDecoration shapeDecoration({
  1. required Color color,
  2. required int depth,
  3. Curvature curvature = Curvature.flat,
  4. Swell swell = Swell.emboss,
  5. double spread = defaultSpread,
  6. Alignment lightSource = defaultLightSource,
  7. ShapeBorder shape = const RoundedRectangleBorder(),
  8. DecorationImage? image,
})

TODO: Write doc.

Implementation

static ShapeDecoration shapeDecoration({
  required Color color,
  required int depth,
  Curvature curvature = Curvature.flat,
  Swell swell = Swell.emboss,
  double spread = defaultSpread,
  Alignment lightSource = defaultLightSource,
  ShapeBorder shape = const RoundedRectangleBorder(),
  DecorationImage? image,
}) =>
    ShapeDecoration(
      shape: shape,
      image: image,
      gradient: linearGradient(
        color: color,
        depth: depth,
        curvature: curvature,
        swell: swell,
        begin: lightSource,
      ),
      shadows: boxShadows(
        color: color,
        depth: depth,
        curvature: curvature,
        swell: swell,
        spread: spread,
        lightSource: lightSource,
      ),
    );