Skip to content

Commit

Permalink
Merge branch 'main' into yousufmyk/feature/replace_image_network
Browse files Browse the repository at this point in the history
  • Loading branch information
divyanshub024 authored Feb 29, 2024
2 parents 39362da + a403f12 commit a711197
Show file tree
Hide file tree
Showing 44 changed files with 917 additions and 139 deletions.
34 changes: 34 additions & 0 deletions examples/mirai_gallery/assets/json/home_screen.json
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,40 @@
"assetPath": "assets/json/chip_example.json"
}
}
},
{
"type": "listTile",
"leading": {
"type": "icon",
"iconType": "material",
"icon": "wrap_text"
},
"title": {
"type": "text",
"data": "Wrap",
"align": "center",
"style": {
"fontSize": 21
}
},
"subtitle": {
"type": "text",
"data": "A widget to creates a wrap layout",
"align": "center",
"style": {
"fontSize": 12
}
},
"isThreeLine": true,
"style": "list",
"onTap": {
"actionType": "navigate",
"navigationStyle": "push",
"widgetJson": {
"type": "exampleScreen",
"assetPath": "assets/json/wrap_example.json"
}
}
}
]
}
Expand Down
180 changes: 180 additions & 0 deletions examples/mirai_gallery/assets/json/wrap_example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
{
"type": "scaffold",
"appBar": {
"type": "appBar",
"title": {
"type": "text",
"data": "Wrap Demo"
}
},
"body": {
"type": "center",
"child": {
"type": "wrap",
"spacing": 8.0,
"runSpacing": 4.0,
"children": [
{
"type": "container",
"color": "#FFCDD2",
"width": 100,
"height": 100,
"child": {
"type": "center",
"child": {
"type": "text",
"data": "1",
"style": {
"color": "#FFFFFF"
}
}
}
},
{
"type": "container",
"color": "#F8BBD0",
"width": 100,
"height": 100,
"child": {
"type": "center",
"child": {
"type": "text",
"data": "2",
"style": {
"color": "#FFFFFF"
}
}
}
},
{
"type": "container",
"color": "#E1BEE7",
"width": 100,
"height": 100,
"child": {
"type": "center",
"child": {
"type": "text",
"data": "3",
"style": {
"color": "#FFFFFF"
}
}
}
},
{
"type": "container",
"color": "#D1C4E9",
"width": 100,
"height": 100,
"child": {
"type": "center",
"child": {
"type": "text",
"data": "4",
"style": {
"color": "#FFFFFF"
}
}
}
},
{
"type": "container",
"color": "#C5CAE9",
"width": 100,
"height": 100,
"child": {
"type": "center",
"child": {
"type": "text",
"data": "5",
"style": {
"color": "#FFFFFF"
}
}
}
},
{
"type": "container",
"color": "#BBDEFB",
"width": 100,
"height": 100,
"child": {
"type": "center",
"child": {
"type": "text",
"data": "6",
"style": {
"color": "#FFFFFF"
}
}
}
},
{
"type": "container",
"color": "#B3E5FC",
"width": 100,
"height": 100,
"child": {
"type": "center",
"child": {
"type": "text",
"data": "7",
"style": {
"color": "#FFFFFF"
}
}
}
},
{
"type": "container",
"color": "#B2EBF2",
"width": 100,
"height": 100,
"child": {
"type": "center",
"child": {
"type": "text",
"data": "8",
"style": {
"color": "#FFFFFF"
}
}
}
},
{
"type": "container",
"color": "#B2DFDB",
"width": 100,
"height": 100,
"child": {
"type": "center",
"child": {
"type": "text",
"data": "9",
"style": {
"color": "#FFFFFF"
}
}
}
},
{
"type": "container",
"color": "#C8E6C9",
"width": 100,
"height": 100,
"child": {
"type": "center",
"child": {
"type": "text",
"data": "10",
"style": {
"color": "#FFFFFF"
}
}
}
}
]
}
}
}
2 changes: 2 additions & 0 deletions packages/mirai/lib/src/framework/mirai.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:flutter/services.dart';
import 'package:mirai/src/action_parsers/action_parsers.dart';
import 'package:mirai/src/action_parsers/mirai_network_request/mirai_network_request_parser.dart';
import 'package:mirai/src/framework/mirai_registry.dart';
import 'package:mirai/src/parsers/mirai_wrap/mirai_wrap.dart';
import 'package:mirai/src/parsers/parsers.dart';
import 'package:mirai/src/services/mirai_network_service.dart';
import 'package:mirai/src/utils/log.dart';
Expand Down Expand Up @@ -67,6 +68,7 @@ class Mirai {
const MiraiGridViewParser(),
const MiraiBottomNavigationViewParser(),
const MiraiDefaultBottomNavigationControllerParser(),
const MiraiWrapParser(),
];

static final _actionParsers = <MiraiActionParser>[
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a711197

Please sign in to comment.