maybeParse static method

BoxShadowValueList? maybeParse(
  1. dynamic value
)

Implementation

static BoxShadowValueList? maybeParse(dynamic value) {
  if (value == null) return null;

  if (value is List) {
    final list = value.map(BoxShadowValue.maybeParse).toList();
    final shadows = list.whereNotNull().toList();
    return BoxShadowValueList(shadows);
  } else {
    return BoxShadowValueList(
      [BoxShadowValue.maybeParse(value)].whereNotNull().toList(),
    );
  }
}