parseBoxShadow static method

BoxShadow? parseBoxShadow(
  1. Object? source,
  2. bool dark
)

Implementation

static BoxShadow? parseBoxShadow(Object? source, bool dark) {
  if (source is! Map || source.isEmpty) return null;
  final shadow = parseShadow(source, dark);
  if (shadow == null) return null;
  return BoxShadow(
    color: shadow.color,
    offset: shadow.offset,
    blurRadius: shadow.blurRadius,
    spreadRadius: parseDouble(source['spreadRadius']) ?? 0,
    blurStyle: parseBlurStyle(source['blurStyle']) ?? BlurStyle.normal,
  );
}