getBoxDecoration method
Implementation
Decoration? getBoxDecoration(Map? spec) {
if (spec == null || spec.isEmpty) return null;
List<BoxShadow>? shadowList;
final shadow = getBoxShadow(spec["boxShadow"]);
if (shadow != null) {
shadowList = [shadow];
}
return BoxDecoration(
color: tryParseColor(spec["color"]),
border: getBorder(spec["border"]),
borderRadius: getBorderRadius(spec["borderRadius"]),
shape: getBoxShape(spec["boxShape"]) ?? BoxShape.rectangle,
boxShadow: shadowList,
gradient: getGradient(spec["gradient"]),
);
}