Center

Centers its child widget within the available space, both horizontally and vertically.

Basic Usage

Center(Text("Hello, World!"))

Options

Center has no options. It simply takes a single child widget.

Examples

// Center a text widget
Center(Text("Centered Text"))

// Center a button
Center(Button("Click Me"))

// Center a column of widgets
Center(
    Column([]any{
        Text("Title"),
        Button("Action"),
    }),
)

// Center within a container
Container(
    Center(Text("Centered in container")),
    Background(Gray100),
)