pub trait AnimatedWidgetBaseState: ImplicitlyAnimatedWidgetStatewhere
Self::Widget: ImplicitlyAnimatedWidget,{
// Provided methods
fn init_state(self: Handle<Self>, app: &mut App) { ... }
fn handle_animation_changed(self: Handle<Self>, app: &mut App) { ... }
}Expand description
A base for widgets with implicit animations that need to rebuild their widget tree as the animation runs.
This calls State::build each frame that the animation ticks. For a
variant that does not rebuild each frame, implement ImplicitlyAnimatedWidgetState
directly.
Implementors must write the ImplicitlyAnimatedWidgetState::for_each_tween method to
allow AnimatedWidgetBaseState to iterate through their widget’s fields and animate
them.
Provided Methods§
Sourcefn init_state(self: Handle<Self>, app: &mut App)
fn init_state(self: Handle<Self>, app: &mut App)
Dart’s AnimatedWidgetBaseState.initState.
Sourcefn handle_animation_changed(self: Handle<Self>, app: &mut App)
fn handle_animation_changed(self: Handle<Self>, app: &mut App)
Dart’s private _handleAnimationChanged.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".