Skip to content

Commit 57117e6

Browse files
Merge pull request #94 from khanjasir90/khanjasir90/padding-docs
docs: added mirai padding docs
2 parents b1aeabd + 328e30d commit 57117e6

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

website/docs/widgets/padding.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Padding
2+
3+
Mirai padding allows you to build the Flutter padding widget using JSON.
4+
To know more about the padding widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Padding-class.html).
5+
6+
## Properties
7+
8+
| Property | Type | Description |
9+
| --- |-------------------|---------------------------------------------------|
10+
| padding | `MiraiEdgeInsets` | The amount of space by which to inset the child. Examples: `"padding": 12` for uniform padding, `"padding": {"left": 0, "right": 0}` for specific sides, or `{"padding": [8, 12, 8, 12]}` for left, top, right, bottom. |
11+
| child | `Map<String,dynamic>` | The widget below this widget in the tree. |
12+
13+
## Example JSON
14+
15+
```json
16+
{
17+
"type": "padding",
18+
"padding": {
19+
"left": 0,
20+
"right": 0
21+
},
22+
"child": {
23+
"type": "container",
24+
"color": "#672BFF",
25+
"clipBehavior": "hardEdge",
26+
"height": 75,
27+
"width": 700
28+
}
29+
}
30+
```

0 commit comments

Comments
 (0)