resolveTransformForAnimation static method

TransformAnimationValue resolveTransformForAnimation(
  1. String present,
  2. RenderStyle renderStyle
)

Implementation

static TransformAnimationValue resolveTransformForAnimation(String present, RenderStyle renderStyle) {
  final List<CSSFunctionalNotation>? notation = resolveTransform(present);
  Matrix4? frozen;
  if (_shouldFreeze(notation)) {
    // Snapshot the matrix so absolute-length or variable-driven transforms
    // interpolate deterministically between start/end.
    frozen = notation != null ? CSSMatrix.computeTransformMatrix(notation, renderStyle) : null;
  } else {
    // Leave unfrozen so percentage-based transforms (or calc/var that may
    // include percentages) re-resolve against the current reference box.
    frozen = null;
  }
  return TransformAnimationValue(notation, frozenMatrix: frozen);
}