pub trait StatusTransitionWidget: Debug + 'static {
// Required methods
fn animation(&self) -> AnyAnimation<f64>;
fn build(&self, app: &mut App, context: BuildContext) -> WidgetRef;
// Provided method
fn key(&self) -> Option<&KeyRef> { ... }
}Expand description
A widget that rebuilds when the given animation changes status.
Required Methods§
Sourcefn animation(&self) -> AnyAnimation<f64>
fn animation(&self) -> AnyAnimation<f64>
The animation to which this widget is listening.
Sourcefn build(&self, app: &mut App, context: BuildContext) -> WidgetRef
fn build(&self, app: &mut App, context: BuildContext) -> WidgetRef
Override this method to build widgets that depend on the current status of the animation.
Provided Methods§
Sourcefn key(&self) -> Option<&KeyRef>
fn key(&self) -> Option<&KeyRef>
See Widget::key.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".