Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/Yash-Khattar/mirai into feat…
Browse files Browse the repository at this point in the history
…ure/hero
  • Loading branch information
Yash-Khattar committed Jan 8, 2025
2 parents 406e3a2 + 2978cc5 commit 28deb06
Show file tree
Hide file tree
Showing 7 changed files with 238 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ mason-lock.json

*.flutter-plugins-dependencies
*.flutter-plugins

# Local Netlify folder
.netlify
16 changes: 1 addition & 15 deletions examples/mirai_gallery/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,36 +1,22 @@
PODS:
- Flutter (1.0.0)
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- sqflite_darwin (0.0.4):
- Flutter
- FlutterMacOS
- webview_flutter_wkwebview (0.0.1):
- Flutter
- FlutterMacOS

DEPENDENCIES:
- Flutter (from `Flutter`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/darwin`)

EXTERNAL SOURCES:
Flutter:
:path: Flutter
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
sqflite_darwin:
:path: ".symlinks/plugins/sqflite_darwin/darwin"
webview_flutter_wkwebview:
:path: ".symlinks/plugins/webview_flutter_wkwebview/darwin"

SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d
webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4
webview_flutter_wkwebview: 44d4dee7d7056d5ad185d25b38404436d56c547c

PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796

Expand Down
2 changes: 1 addition & 1 deletion examples/mirai_gallery/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ packages:
path: "../../packages/mirai"
relative: true
source: path
version: "0.7.2"
version: "0.8.0"
mirai_framework:
dependency: "direct overridden"
description:
Expand Down
11 changes: 11 additions & 0 deletions packages/mirai/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 0.8.0

* chore] Code Refactoring :) by @divyanshub024
* feat: Add Row and Column Spacing by @divyanshub024
* feat: Add Mirai carousel view with example by @divyanshub024
* feat: Add Mirai colored box parser by @divyanshub024
* fix: Replace cache network image with the Image.network. by @divyanshub024
* feat: Add support for the Divider widget by @bhattkrutij
* feat: added ability to override mirai parsers and action_parsers. by @khanjasir90
* feat: Added support for mirai progress indicators by @ishanvaghani

## 0.7.2

* update Readme
Expand Down
20 changes: 14 additions & 6 deletions packages/mirai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,21 @@
[![Netlify Status](https://api.netlify.com/api/v1/badges/a376dbd3-c928-4d0f-8cfd-6a2ca2dfae5b/deploy-status)](https://app.netlify.com/sites/buildmirai/deploys)

---
# 🚀 Mirai – Server-Driven UI Framework for Flutter

Mirai is a Server-Driven UI (SDUI) framework for Flutter. Mirai allows you to build beautiful cross-platform applications with JSON in real time.
[Mirai][mirai_website] is a powerful Server-Driven UI (SDUI) framework for Flutter, enabling you to build beautiful, cross-platform applications dynamically using JSON in real time.

Try out the [Mirai Playground](https://playground.buildmirai.dev/): A sandbox environment for experimenting with the Mirai SDUI.
Whether you’re building apps for mobile, web, or desktop, Mirai simplifies UI delivery and enhances flexibility without requiring redeployment for every design change.

Developed with 💙 by [Mirai][mirai_link]
- 🛠️ Build Dynamic UIs: Update your app’s UI instantly with JSON configurations.
- 🌍 Cross-Platform: Write once, render anywhere – Flutter does the rest.
- ⚡ Fast Iterations: Make changes on the server and see them live in your app.

### 🌟 Explore Mirai in Action
- 🧪 [Try Mirai Playground](https://playground.buildmirai.dev/) – A sandbox environment for experimenting with Mirai Dynamic UI.
- 📚 [Read the Documentation](https://docs.buildmirai.dev/) – Get started with detailed guides and examples.

Developed with 💙 by [Mirai][mirai_website]

## Installation 🚀

Expand Down Expand Up @@ -399,19 +408,18 @@ Check out the [Mirai Gallery](https://github.com/BuildMirai/mirai/tree/dev/examp
## Contributors ✨

<a href="https://github.com/buildMirai/mirai/graphs/contributors">
<img src="https://contrib.rocks/image?repo=buildMirai/mirai" />
<img src="https://contrib.rocks/image?repo=buildMirai/mirai" alt="Mirai Contributors"/>
</a>

## Maintainers

- [Divyanshu Bhargava][divyanshu_github]

---
[github_stars]: https://img.shields.io/github/stars/buildMirai/mirai
[github_stars_link]: https://github.com/buildMirai/mirai/stargazers
[license_badge]: https://img.shields.io/badge/license-MIT-blue.png
[license_link]: https://opensource.org/licenses/MIT
[mirai_banner]: https://github.com/buildMirai/mirai/blob/dev/assets/mirai_banner.png
[mirai_link]: https://buildmirai.dev/
[form_screen]: https://github.com/buildMirai/mirai/blob/dev/assets/form_screen_image.png
[divyanshu_github]: https://github.com/divyanshub024
[mirai_website]: https://buildmirai.dev/
2 changes: 1 addition & 1 deletion packages/mirai/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: mirai
description: Mirai is a Server-Driven UI (SDUI) framework for Flutter. Mirai allows you to build beautiful cross-platform applications with JSON in real time.
version: 0.7.2
version: 0.8.0
homepage: https://github.com/buildMirai/mirai

environment:
Expand Down
207 changes: 207 additions & 0 deletions website/docs/widgets/listview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
# ListView

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

## Properties

| Property | Type | Description |
| --- |-------------------|---------------------------------------------------|
| scrollDirection | `Axis` | The Axis along which the scroll view's offset increases. |
| reverse | `bool` | Whether the scroll view scrolls in the reading direction. |
| primary | `bool` | Whether this is the primary scroll view. |
| physics | `MiraiScrollPhysics` | How the scroll view should respond to user input. |
| shrinkWrap | `bool` | Whether the extent of the scroll view in the scrollDirection should be determined by the contents being viewed. |
| padding | `MiraiEdgeInsets` | The amount of space by which to inset the children. |
| addAutomaticKeepAlives | `bool` | Determines whether the children should be automatically kept alive (cached) when they are no longer visible, preserving their state. |
| addRepaintBoundaries | `bool` | Determines whether each child widget is wrapped in a RepaintBoundary to optimize rendering by reducing unnecessary repaints. |
| addSemanticIndexes | `bool` | Determines whether semantic indexes are assigned to the children, enabling accessibility tools to understand the order and structure of the list items. |
| cacheExtent | `double` | The viewport has an area before and after the visible area to cache items that are about to become visible when the user scrolls. |
| children | `List<Map<String,dynamic>>` | The widgets below this widget in the tree. |
| separator | `Map<String,dynamic>` | Defines a widget, to display between each pair of list items. |
| semanticChildCount | `int` | The number of children that will contribute semantic information. |
| dragStartBehavior | `DragStartBehavior` | Determines the way that drag start behavior is handled. |
| keyboardDismissBehavior | `ScrollViewKeyboardDismissBehavior` | Defines how this ScrollView will dismiss the keyboard automatically. |
| restorationId | `String` | Restoration ID to save and restore the scroll offset of the scrollable. |
| clipBehavior | `Clip` | The content will be clipped (or not) according to this option. |

## Example JSON

```json
{
"type": "listView",
"shrinkWrap": true,
"separator": {
"type": "container",
"height": 10
},
"children": [
{
"type": "listTile",
"leading": {
"type": "container",
"height": 50,
"width": 50,
"color": "#165FC7",
"child": {
"type": "column",
"mainAxisAlignment": "center",
"crossAxisAlignment": "center",
"children": [
{
"type": "text",
"data": "1",
"style": {
"fontSize": 21
}
}
]
}
},
"title": {
"type": "padding",
"padding": {
"top": 10
},
"child": {
"type": "text",
"data": "Item 1",
"style": {
"fontSize": 18
}
}
},
"subtitle": {
"type": "padding",
"padding": {
"top": 10
},
"child": {
"type": "text",
"data": "Item description",
"style": {
"fontSize": 14
}
}
},
"trailing": {
"type": "icon",
"iconType": "material",
"icon": "more_vert",
"size": 24
}
},
{
"type": "listTile",
"leading": {
"type": "container",
"height": 50,
"width": 50,
"color": "#165FC7",
"child": {
"type": "column",
"mainAxisAlignment": "center",
"crossAxisAlignment": "center",
"children": [
{
"type": "text",
"data": "2",
"style": {
"fontSize": 21
}
}
]
}
},
"title": {
"type": "padding",
"padding": {
"top": 10
},
"child": {
"type": "text",
"data": "Item 2",
"style": {
"fontSize": 18
}
}
},
"subtitle": {
"type": "padding",
"padding": {
"top": 10
},
"child": {
"type": "text",
"data": "Item description",
"style": {
"fontSize": 14
}
}
},
"trailing": {
"type": "icon",
"iconType": "material",
"icon": "more_vert",
"size": 24
}
},
{
"type": "listTile",
"leading": {
"type": "container",
"height": 50,
"width": 50,
"color": "#165FC7",
"child": {
"type": "column",
"mainAxisAlignment": "center",
"crossAxisAlignment": "center",
"children": [
{
"type": "text",
"data": "3",
"style": {
"fontSize": 21
}
}
]
}
},
"title": {
"type": "padding",
"padding": {
"top": 10
},
"child": {
"type": "text",
"data": "Item 3",
"style": {
"fontSize": 18
}
}
},
"subtitle": {
"type": "padding",
"padding": {
"top": 10
},
"child": {
"type": "text",
"data": "Item description",
"style": {
"fontSize": 14
}
}
},
"trailing": {
"type": "icon",
"iconType": "material",
"icon": "more_vert",
"size": 24
}
}
]
}
```

0 comments on commit 28deb06

Please sign in to comment.