From 72fa65f2117cb0b468753cc898f48038eec2adca Mon Sep 17 00:00:00 2001 From: Divyanshu Bhargava Date: Tue, 7 Jan 2025 10:57:46 +0400 Subject: [PATCH 1/9] chore: Add `.netlify` folder to gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 92082f19..682e2ccc 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,6 @@ mason-lock.json *.flutter-plugins-dependencies *.flutter-plugins + +# Local Netlify folder +.netlify From e505a091972552d81361640632ba4e5cb05a9399 Mon Sep 17 00:00:00 2001 From: Mohd Jasir Khan Date: Tue, 7 Jan 2025 15:29:11 +0530 Subject: [PATCH 2/9] feat: added listview docs --- website/docs/widgets/listview.md | 207 +++++++++++++++++++++++++++++++ 1 file changed, 207 insertions(+) create mode 100644 website/docs/widgets/listview.md diff --git a/website/docs/widgets/listview.md b/website/docs/widgets/listview.md new file mode 100644 index 00000000..9ae26de2 --- /dev/null +++ b/website/docs/widgets/listview.md @@ -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 | `MiraiPadding` | 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>` | The widgets below this widget in the tree. | +| separator | `Map` | 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 + } + } + ] +} +``` + From 0cffe717fce097958dbcb0903dc3de0d4b27c603 Mon Sep 17 00:00:00 2001 From: Mohd Jasir Khan Date: Tue, 7 Jan 2025 15:49:49 +0530 Subject: [PATCH 3/9] fix: replace miraipadding with MiraiEdgeInsets --- website/docs/widgets/listview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/widgets/listview.md b/website/docs/widgets/listview.md index 9ae26de2..e16bac3a 100644 --- a/website/docs/widgets/listview.md +++ b/website/docs/widgets/listview.md @@ -12,7 +12,7 @@ To know more about the listview widget in Flutter, refer to the [official docume | 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 | `MiraiPadding` | The amount of space by which to inset the children. | +| 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. | From 1296313829668d7355d396efaa95c877aa5f05aa Mon Sep 17 00:00:00 2001 From: Divyanshu Bhargava Date: Wed, 8 Jan 2025 16:14:21 +0400 Subject: [PATCH 4/9] chore: update Podfile.lock for mirai gallery --- examples/mirai_gallery/ios/Podfile.lock | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/examples/mirai_gallery/ios/Podfile.lock b/examples/mirai_gallery/ios/Podfile.lock index 44e75d23..1a8fb039 100644 --- a/examples/mirai_gallery/ios/Podfile.lock +++ b/examples/mirai_gallery/ios/Podfile.lock @@ -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 From 4751bfcce6259d3cac2cc9ab18c3c84e3d559358 Mon Sep 17 00:00:00 2001 From: Divyanshu Bhargava Date: Wed, 8 Jan 2025 16:14:31 +0400 Subject: [PATCH 5/9] chore: update README.md --- packages/mirai/README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/mirai/README.md b/packages/mirai/README.md index 4559cd32..139d1ffb 100644 --- a/packages/mirai/README.md +++ b/packages/mirai/README.md @@ -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 πŸš€ @@ -406,12 +415,11 @@ Check out the [Mirai Gallery](https://github.com/BuildMirai/mirai/tree/dev/examp - [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/ \ No newline at end of file From 8afc66c484a2a005e766b3f9f618fa48756ac08b Mon Sep 17 00:00:00 2001 From: Divyanshu Bhargava Date: Wed, 8 Jan 2025 16:15:20 +0400 Subject: [PATCH 6/9] chore: update README.md --- packages/mirai/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mirai/README.md b/packages/mirai/README.md index 139d1ffb..6aa5efe1 100644 --- a/packages/mirai/README.md +++ b/packages/mirai/README.md @@ -408,7 +408,7 @@ Check out the [Mirai Gallery](https://github.com/BuildMirai/mirai/tree/dev/examp ## Contributors ✨ - + Mirai Contributors ## Maintainers From e67a236cad25bf72092856e5f0a96b778c0f6c36 Mon Sep 17 00:00:00 2001 From: Divyanshu Bhargava Date: Wed, 8 Jan 2025 16:37:12 +0400 Subject: [PATCH 7/9] chore: update CHANGELOG.md.md --- packages/mirai/CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/mirai/CHANGELOG.md b/packages/mirai/CHANGELOG.md index 070281db..08bc9730 100644 --- a/packages/mirai/CHANGELOG.md +++ b/packages/mirai/CHANGELOG.md @@ -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 From 3efded119adebb7cfa4a2c3bd6fcfc6299a10639 Mon Sep 17 00:00:00 2001 From: Divyanshu Bhargava Date: Wed, 8 Jan 2025 16:37:23 +0400 Subject: [PATCH 8/9] chore: update to v0.8.0 --- packages/mirai/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mirai/pubspec.yaml b/packages/mirai/pubspec.yaml index 90f7c486..0822a5fe 100644 --- a/packages/mirai/pubspec.yaml +++ b/packages/mirai/pubspec.yaml @@ -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: From df276974bb6e976e9c5b2fe9baddd606b639c444 Mon Sep 17 00:00:00 2001 From: Divyanshu Bhargava Date: Wed, 8 Jan 2025 16:42:17 +0400 Subject: [PATCH 9/9] chore: update mirai gallery pubspec.lock --- examples/mirai_gallery/pubspec.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/mirai_gallery/pubspec.lock b/examples/mirai_gallery/pubspec.lock index 45ffc0cc..3f09c13f 100644 --- a/examples/mirai_gallery/pubspec.lock +++ b/examples/mirai_gallery/pubspec.lock @@ -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: