getBoxShadow method

BoxShadow? getBoxShadow(
  1. Map? spec
)

Implementation

BoxShadow? getBoxShadow(Map? spec) {
  if (spec == null || spec.isEmpty) {
    return null;
  }

  return BoxShadow(
    color: parseColor(spec["color"], defaultColor: const Color(0xFF000000)),
    blurRadius: parseDouble(spec["blurRadius"], defaultValue: 0.0),
    spreadRadius: parseDouble(spec["spreadRadius"], defaultValue: 0.0),
    offset: getOffset(spec["offset"]) ?? Offset.zero,
  );
}