Skip to content

AnimationStyle

Used to override the default parameters of an animation.

Note

If duration and reverse_duration are set to Duration(), the corresponding animation will be disabled. See no_animation() method for a convenient way to create such an instance.

Properties

Methods

  • copy

    Returns a copy of this object with the specified properties overridden.

  • no_animation

    Creates an instance of AnimationStyle with no animation.

Properties#

curve #

curve: AnimationCurve | None = None

The curve to use for the animation.

duration #

duration: DurationValue | None = None

The duration of the animation.

reverse_curve #

reverse_curve: AnimationCurve | None = None

The curve to use for the reverse animation.

reverse_duration #

reverse_duration: DurationValue | None = None

The duration of the reverse animation.

Methods#

copy #

copy(
    *,
    duration: DurationValue | None = None,
    reverse_duration: DurationValue | None = None,
    curve: AnimationCurve | None = None,
    reverse_curve: AnimationCurve | None = None,
) -> AnimationStyle

Returns a copy of this object with the specified properties overridden.

no_animation #

no_animation() -> AnimationStyle

Creates an instance of AnimationStyle with no animation.