Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions website/docs/widgets/center.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Center

The Mirai Center allows you to build a Flutter center widget using JSON.
To know more about the center widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Center-class.html).

## Properties

| Property | Type | Description |
|--------------|-------------------------|-----------------------------------------------------|
| widthFactor | `double?` | The factor by which to multiply the child's width. |
| heightFactor | `double?` | The factor by which to multiply the child's height. |
| child | `Map<String, dynamic>?` | The widget to display inside the center. |

## Example JSON

```json
{
"type": "center",
"child": {
"type": "text",
"data": "Hello, World!"
}
}
```