createThemedShadow function

List<BoxShadow> createThemedShadow(
  1. Color color,
  2. LightSourcePosition lightSourcePosition,
  3. ShadowIntensity shadowIntensity,
  4. ShadowHardness shadowHardness
)

Implementation

List<BoxShadow> createThemedShadow(
    Color color,
    LightSourcePosition lightSourcePosition,
    ShadowIntensity shadowIntensity,
    ShadowHardness shadowHardness) {

  var offset = getOffset(lightSourcePosition);
  var shadowColor = color.withOpacity(getShadowOpacity(shadowIntensity));
  var blurRadius = getShadowBlurRadius(shadowHardness);

  return createShadow(color: color, offset: offset, blurRadius: blurRadius, spreadRadius: 0.0);
}