getElevationShadow function

List<BoxShadow> getElevationShadow({
  1. required double elevation,
  2. Color? shadowColor,
  3. Offset? offset,
})

Implementation

List<BoxShadow> getElevationShadow({
  required double elevation,
  Color? shadowColor,
  Offset? offset,
}) {
  return [
    if (elevation > 0)
      BoxShadow(
        color: shadowColor ?? const Color(0x33000000),
        spreadRadius: 0.25 * elevation,
        blurRadius: 0.5 * elevation,
        offset: offset ?? Offset.zero,
      ),
  ];
}