from static method

CSSCalc? from(
  1. Object? calc
)
override

Implementation

static CSSCalc? from(Object? calc) {
  if (calc == null) return null;

  if (calc is CSSCalc) {
    return calc;
  } else if (calc is String) {
    return CSSCalc.parse(calc);
  }

  return null;
}