pub fn new(
        value: T,
        duration: Duration,
        curve: impl Into<AnimationCurve>,
        layout: bool,
    ) -> Self {
        Animated {
            start: value.clone(),
            end: value.clone(),
            full_duration: duration.as_secs_f64(),
            current_duration: duration.as_secs_f64(),
            curve: curve.into(),
            layout,

            current: value,
        }
    }
/// Creates a new animation with a start value, a duration and a curve.
/// The paint and layout flags indicate if animate should request paint or layout when the value
/// changes.
Creates a new animation with a start value, a duration and a curve.
The paint and layout flags indicate if animate should request paint or layout when the value
changes.
Creates a new animation with a start value a duration and a curve . The paint and layout flags indicate if animate should request paint or layout when the value changes .
pub fn new(
        value: T,
        duration: Duration,
        curve: impl Into<AnimationCurve>,
        layout: bool,
    ) -> Self {
        Animated {
            start: value.clone(),
            end: value.clone(),
            full_duration: duration.as_secs_f64(),
            current_duration: duration.as_secs_f64(),
            curve: curve.into(),
            layout,
            current: value,
        }
    }
pub fn new ( value : T , duration : Duration , curve : impl Into < AnimationCurve > , layout : bool , ) -> Self { Animated { start : value . clone ( ) , end : value . clone ( ) , full_duration : duration . as_secs_f64 ( ) , current_duration : duration . as_secs_f64 ( ) , curve : curve . into ( ) , layout , current : value , } }
Creates a new animation with a start value, a duration and a curve.
Creates a new animation with a start value a duration and a curve .
value
T
duration
Duration
curve
impl Into<AnimationCurve>
layout
bool