Skip to content

Commit

Permalink
Merge pull request #104 from khanjasir90/khanjasir90/row-docs
Browse files Browse the repository at this point in the history
docs: added mirai row docs
  • Loading branch information
divyanshub024 authored Jan 15, 2025
2 parents c70e477 + af59783 commit dc82811
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions website/docs/widgets/row.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Row

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

## Properties

| Property | Type | Description |
| -------- | ----------------------- | ------------------------------------ |
| mainAxisAlignment | `MainAxisAlignment` | How the children should be placed along the main axis. |
| crossAxisAlignment | `CrossAxisAlignment` | How the children should be placed along the cross axis. |
| mainAxisSize | `MainAxisSize` | How much space should be occupied in the main axis. |
| textDirection | `TextDirection` | Determines the order to lay children out horizontally and how to interpret start and end in the horizontal direction. |
| spacing | `double` | How much space to place between children in the main axis. |
| children | `List<Map<String,dynamic>>` | The widgets below this widget in the tree. |

## Example JSON

```json
{
"type": "row",
"mainAxisAlignment": "center",
"crossAxisAlignment": "center",
"spacing": 12,
"children": [
{
"type": "image",
"src": "https://images.pexels.com/photos/2718416/pexels-photo-2718416.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2",
"width": 100
},
{
"type": "image",
"src": "https://images.pexels.com/photos/121629/pexels-photo-121629.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2",
"width": 100
},
{
"type": "image",
"src": "https://images.pexels.com/photos/1414642/pexels-photo-1414642.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2",
"width": 100
}
]
}
```

0 comments on commit dc82811

Please sign in to comment.