resolveValueAsString static method

String resolveValueAsString(
  1. DOMContext? domContext,
  2. num value,
  3. CSSUnit unit, {
  4. bool originalValueAsComment = true,
})

Implementation

static String resolveValueAsString(
    DOMContext? domContext, num value, CSSUnit unit,
    {bool originalValueAsComment = true}) {
  if (domContext != null &&
      domContext.resolveCSSViewportUnit &&
      isCSSViewportUnit(unit) &&
      domContext.viewport != null) {
    var resolvedViewport = domContext.resolveCSSViewportUnitValue(value, unit,
        originalValueAsComment: originalValueAsComment);
    return resolvedViewport;
  } else {
    return valueToString(value, unit);
  }
}