• Creates an animation that changes one or more style 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<WidgetStyle>>

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

    • Optional defaultFrom: MaybeArray<number>

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

    • Optional defaultTo: MaybeArray<number>

      Optional default ending value or array of ending values for the style 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.