API ReferenceLayout Widgets
RotatedBox
Quarter-turn rotation about the child center.
RotatedBox { quarter_turns: i32, child: Widget } rotates by integral
quarter-turns (layout swaps axes for odd counts).
use incular::prelude::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let app = Application::new(|_cx| {
Container::builder()
.padding(EdgeInsets::all(24.0))
.alignment(Alignment::CENTER)
.child(RotatedBox::new(1, Text::new("Sideways")))
.build()
.into()
})?;
incular::run(app)?;
Ok(())
}For arbitrary angles use Transform
rotation instead.
Related: Transform.