Function use_animation_with_dependencies
pub fn use_animation_with_dependencies<Animated, D>(
dependencies: &D,
run: impl FnMut(&mut AnimConfiguration, &D) -> Animated + 'static,
) -> 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)
});
// ...
}