expressionToWidth static method

Width? expressionToWidth(
  1. Expression value
)

Implementation

static Width? expressionToWidth(css.Expression value) {
  if ((value is css.LiteralTerm) && value.text == 'auto') {
    return Width.auto();
  } else {
    final computedValue = expressionToLengthOrPercent(value);
    return Width(computedValue.value, computedValue.unit);
  }
}