API ReferenceEnvironment
TickerMode
Enable or disable animation ticking for a subtree.
TickerMode { enabled: bool, child: Widget } gates animation ticks. Disabled
subtrees freeze controllers without unmounting them.
use incular::prelude::*;
fn main() {
let frozen = TickerMode::new(false, Text::new("Frozen"));
println!("enabled: {}", frozen.is_enabled());
let app = Application::new(|_cx| {
TickerMode::new(true, Text::new("Ticking")).into()
})
.expect("valid application");
incular::run(app).expect("run application");
}Pair with cx.reduced_motion() to respect accessibility settings.
Related: AnimationController,
Visibility.