boxShadows method

List<IrShadow> boxShadows(
  1. DartValue? v
)

Implementation

List<IrShadow> boxShadows(DartValue? v) {
  final d = deref(v);
  if (d is! ListValue) return const [];
  return [
    for (final item in d.items)
      if (deref(item) case ObjectValue(type: 'BoxShadow') && final s)
        IrShadow(
          color: color(s['color']) ?? IrColor.black,
          x: _offset(s['offset']).$1,
          y: _offset(s['offset']).$2,
          blur: number(s['blurRadius']) ?? 0,
          spread: number(s['spreadRadius']) ?? 0,
        ),
  ];
}