pub fn use_animation_with_dependencies<Animated: AnimatedValue, D: 'static + Clone + PartialEq>(
dependencies: &D,
run: impl 'static + FnMut(&mut AnimConfiguration, &D) -> Animated,
) -> UseAnimation<Animated>Expand description
Like use_animation but supports passing manual dependencies.
fn app() -> impl IntoElement {
let animation = use_animation_with_dependencies(&other_value, |conf, other_value| {
conf.on_change(OnChange::Rerun);
AnimNum::new(0., *other_value).time(50)
});
// ...
}