pub struct Transition<S: 'static> { /* private fields */ }Expand description
A finite, multi-property animation driven by a target state S.
Obtained from updateTransition; see the module docs for the overall
model.
Implementations§
Source§impl<S: Clone + 'static> Transition<S>
impl<S: Clone + 'static> Transition<S>
Sourcepub fn target_state(&self) -> S
pub fn target_state(&self) -> S
The state this transition is currently animating towards.
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
true while any child animation is still mid-flight. A transition
with no children yet, or whose children have all settled, reports
false – it is finished only when every child is.
Sourcepub fn animateValue<T: SpringScalar + PartialEq + 'static>(
&self,
target_value: T,
animation: AnimationType,
label: &str,
) -> State<T>
pub fn animateValue<T: SpringScalar + PartialEq + 'static>( &self, target_value: T, animation: AnimationType, label: &str, ) -> State<T>
Generic child animation, built on the same SpringScalar
vector-converter core as crate::animateValueAsState. target_value
is the value this child should hold once the transition settles for
the current Transition::target_state – recomputed by the caller
on every call, exactly like the standalone animate*AsState family.
Sourcepub fn animateFloat(
&self,
target_value: f32,
animation: AnimationType,
label: &str,
) -> State<f32>
pub fn animateFloat( &self, target_value: f32, animation: AnimationType, label: &str, ) -> State<f32>
Child float animation. Mirrors Jetpack Compose’s Transition.animateFloat.
Sourcepub fn animateDp(
&self,
target_value: Dp,
animation: AnimationType,
label: &str,
) -> State<Dp>
pub fn animateDp( &self, target_value: Dp, animation: AnimationType, label: &str, ) -> State<Dp>
Child density-independent-length animation. Mirrors Jetpack Compose’s
Transition.animateDp.
Sourcepub fn animateColor(
&self,
target_value: Color,
animation: AnimationType,
label: &str,
) -> State<Color>
pub fn animateColor( &self, target_value: Color, animation: AnimationType, label: &str, ) -> State<Color>
Child color animation. Mirrors Jetpack Compose’s Transition.animateColor.