• Creates an animation that changes one or more properties of a widget over time. The from and to values are either provided directly or through params when calling Widget.animate. Additionally, an easing function can be provided either directly or through params to adjust the animation progress.

    Type Parameters

    Parameters

    • propertyName: MaybeArray<PickNumberKeys<T>>

      The name of the property or array of properties to change.

    • Optional defaultFrom: MaybeArray<number>

      Optional default starting value or array of starting values for the property/properties.

    • Optional defaultTo: MaybeArray<number>

      Optional default ending value or array of ending values for the property/properties.

    • Optional by: EasingFunction

      Optional easing function to adjust the animation progress, can be overridden by params.by.

    Returns Animation<T>

    An Animation object.