Skip to content

Commit

Permalink
Merge pull request #94 from khanjasir90/khanjasir90/padding-docs
Browse files Browse the repository at this point in the history
docs: added mirai padding docs
  • Loading branch information
divyanshub024 authored Jan 12, 2025
2 parents b1aeabd + 328e30d commit 57117e6
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions website/docs/widgets/padding.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Padding

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

## Properties

| Property | Type | Description |
| --- |-------------------|---------------------------------------------------|
| 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. |
| child | `Map<String,dynamic>` | The widget below this widget in the tree. |

## Example JSON

```json
{
"type": "padding",
"padding": {
"left": 0,
"right": 0
},
"child": {
"type": "container",
"color": "#672BFF",
"clipBehavior": "hardEdge",
"height": 75,
"width": 700
}
}
```

0 comments on commit 57117e6

Please sign in to comment.