transform property
Implementation
@override
List<CSSFunctionalNotation>? get transform => _transform;
set
transform
(List<CSSFunctionalNotation> ? value)
Implementation
set transform(List<CSSFunctionalNotation>? value) {
// Even if the transform value has not changed, ensure the cached
// transformMatrix is cleared so any animation-driven state is dropped
// and the effective transform recomputes from the current value.
if (_transform == value) {
// If a transform transition is currently running, let the
// animation own matrix updates.
if (this is CSSRenderStyle && (this as CSSRenderStyle).isTransitionRunning(TRANSFORM)) {
return;
}
// Otherwise, clear cached matrix and repaint so the effective transform
// recomputes from the current value (handles var()/percent changes).
_transformMatrix = null;
markNeedsPaint();
return;
}
_transform = value;
_transformMatrix = null;
// Mark the compositing state for this render object as dirty
// cause it will create new layer when transform is valid.
if (value != null) {
markNeedsCompositingBitsUpdate();
}
// Transform effect the stacking context.
if (isParentRenderLayoutBox()) {
markParentNeedsSort();
}
// Transform stage are applied at paint stage, should avoid re-layout.
markNeedsPaint();
}