Function cosmic::iced_widget::center

source ยท
pub fn center<'a, Message, Theme, Renderer>(
    content: impl Into<Element<'a, Message, Theme, Renderer>>,
) -> Container<'a, Message, Theme, Renderer>
where Theme: Catalog + 'a, Renderer: Renderer,
Expand description

Creates a new Container that fills all the available space and centers its contents inside.

This is equivalent to:

let centered = container("Centered!").center(Length::Fill);