transformOrigin property

CSSOrigin get transformOrigin

Implementation

CSSOrigin get transformOrigin => _transformOrigin ?? const CSSOrigin(_DEFAULT_TRANSFORM_OFFSET, _DEFAULT_TRANSFORM_ALIGNMENT);
set transformOrigin (CSSOrigin? value)

Implementation

set transformOrigin(CSSOrigin? value) {
  if (_transformOrigin == value) return;
  _transformOrigin = value;

  Offset oldOffset = transformOffset;
  Offset offset = transformOrigin.offset;
  // Transform origin transition by offset
  if (offset.dx != oldOffset.dx || offset.dy != oldOffset.dy) {
    transformOffset = offset;
  }

  Alignment alignment = transformOrigin.alignment;
  Alignment oldAlignment = transformAlignment;
  // Transform origin transition by alignment
  if (alignment.x != oldAlignment.x || alignment.y != oldAlignment.y) {
    transformAlignment = alignment;
  }
}