setProps method

void setProps({
  1. Object? x,
  2. Object? y,
  3. Object? scaleX,
  4. Object? scaleY,
  5. Object? scale,
  6. Object? rotation,
  7. Object? pivotX,
  8. Object? pivotY,
  9. Object? width,
  10. Object? height,
  11. Object? skewX,
  12. Object? skewY,
  13. Object? rotationX,
  14. Object? rotationY,
  15. Object? alpha,
  16. Color? colorize,
  17. double delay = 0,
  18. bool? visible,
  19. bool immediateRender = true,
})

Sets properties and renders them immediately (using a tween animation with zero duration).

The delay parameter can be used to delay the start of the "empty" tween animation that assigns the values.

This method calls the tween method with the given properties and zero duration to apply the properties immediately.

Implementation

void setProps({
  Object? x,
  Object? y,
  Object? scaleX,
  Object? scaleY,
  Object? scale,
  Object? rotation,
  Object? pivotX,
  Object? pivotY,
  Object? width,
  Object? height,
  Object? skewX,
  Object? skewY,
  Object? rotationX,
  Object? rotationY,
  Object? alpha,
  Color? colorize,
  double delay = 0,
  bool? visible,
  bool immediateRender = true,
}) {
  if (visible != null) {
    this.visible = visible;
  }
  tween(
    duration: 0,
    delay: delay,
    immediateRender: immediateRender,
    x: x,
    y: y,
    scaleX: scaleX,
    scaleY: scaleY,
    scale: scale,
    rotation: rotation,
    pivotX: pivotX,
    pivotY: pivotY,
    width: width,
    colorize: colorize,
    height: height,
    skewX: skewX,
    skewY: skewY,
    alpha: alpha,
    rotationX: rotationX,
    rotationY: rotationY,
  );
}