Fix .with_child Error in the docs
@@ -44,15 +44,15 @@ To see how this works we will divide our window in four. We'll have two rows and
```rust, noplaypen
fn build_ui() -> impl Widget<()> {
Flex::row()
- .with_child(
+ .with_flex_child(
Flex::column()
- .with_child(Label::new("top left"), 1.0)
- .with_child(Label::new("bottom left"), 1.0),
+ .with_flex_child(Label::new("top left"), 1.0)
+ .with_flex_child(Label::new("bottom left"), 1.0),
1.0)
- .with_child(
+ .with_flex_child(
Flex::column()
- .with_child(Label::new("top right"), 1.0)
- .with_child(Label::new("bottom right"), 1.0),
+ .with_flex_child(Label::new("top right"), 1.0)
+ .with_flex_child(Label::new("bottom right"), 1.0),
1.0)
}
```
@@ -66,15 +66,15 @@ fn build_ui() -> impl Widget<()> {
Padding::new(
10.0,
Flex::row()
- .with_child(
+ .with_flex_child(
Flex::column()
- .with_child(Label::new("top left"), 1.0)
- .with_child(Align::centered(Label::new("bottom left")), 1.0),
+ .with_flex_child(Label::new("top left"), 1.0)
+ .with_flex_child(Align::centered(Label::new("bottom left")), 1.0),
1.0)
.with_child(
Flex::column()
- .with_child(Label::new("top right"), 1.0)
- .with_child(Align::centered(Label::new("bottom right")), 1.0),
+ .with_flex_child(Label::new("top right"), 1.0)
+ .with_flex_child(Align::centered(Label::new("bottom right")), 1.0),
1.0))
}
```
