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
32 changes: 32 additions & 0 deletions website/docs/widgets/elevated_button.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Elevated Button

The Mirai Elevated Button allows you to build a Flutter elevated button widget using JSON.
To know more about the elevated button widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/material/ElevatedButton-class.html).

## Properties

| Property | Type | Description |
|--------------|-------------------------|------------------------------------------------------------------------------------|
| onPressed | `Map<String, dynamic>?` | The callback that is called when the button is tapped. |
| style | `MiraiButtonStyle?` | The style to apply to the button. |
| autofocus | `bool` | Whether the button should be focused when the page is loaded. Defaults to `false`. |
| clipBehavior | `Clip` | Determines how the content should be clipped. Defaults to `Clip.none`. |
| child | `Map<String, dynamic>` | The widget to display inside the button. |


## Example JSON

```json
{
"type": "elevatedButton",
"onPressed": {},
"style": {
"backgroundColor": "primary",
"foregroundColor": "#FFFFFF"
},
"child": {
"type": "text",
"data": "Click Me!"
}
}
```