-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from khanjasir90/khanjasir90/padding-docs
docs: added mirai padding docs
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
``` |