-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Mirai grid view example to the gallery
- Loading branch information
1 parent
d938d60
commit 033da5b
Showing
2 changed files
with
258 additions
and
0 deletions.
There are no files selected for viewing
227 changes: 227 additions & 0 deletions
227
examples/mirai_gallery/assets/json/grid_view_example.json
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,227 @@ | ||
{ | ||
"type": "scaffold", | ||
"appBar": { | ||
"type": "appBar", | ||
"title": { | ||
"type": "text", | ||
"data": "Grid View Example" | ||
} | ||
}, | ||
"body": { | ||
"type": "padding", | ||
"padding": { | ||
"left": 10, | ||
"top": 10, | ||
"right": 10, | ||
"bottom": 10 | ||
}, | ||
"child": { | ||
"type": "gridView", | ||
"crossAxisCount": 2, | ||
"crossAxisSpacing": 10.0, | ||
"mainAxisSpacing": 10.0, | ||
"children": [ | ||
{ | ||
"type": "container", | ||
"decoration": { | ||
"type": "boxDecoration", | ||
"color": "#FFCDD2", | ||
"borderRadius": { | ||
"all": 8.0 | ||
} | ||
}, | ||
"child": { | ||
"type": "center", | ||
"child": { | ||
"type": "text", | ||
"data": "Item 1", | ||
"style": { | ||
"color": "#B71C1C" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "container", | ||
"decoration": { | ||
"type": "boxDecoration", | ||
"color": "#C8E6C9", | ||
"borderRadius": { | ||
"all": 8.0 | ||
} | ||
}, | ||
"child": { | ||
"type": "center", | ||
"child": { | ||
"type": "text", | ||
"data": "Item 2", | ||
"style": { | ||
"color": "#1B5E20" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "container", | ||
"decoration": { | ||
"type": "boxDecoration", | ||
"color": "#BBDEFB", | ||
"borderRadius": { | ||
"all": 8.0 | ||
} | ||
}, | ||
"child": { | ||
"type": "center", | ||
"child": { | ||
"type": "text", | ||
"data": "Item 3", | ||
"style": { | ||
"color": "#0D47A1" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "container", | ||
"decoration": { | ||
"type": "boxDecoration", | ||
"color": "#FFF9C4", | ||
"borderRadius": { | ||
"all": 8.0 | ||
} | ||
}, | ||
"child": { | ||
"type": "center", | ||
"child": { | ||
"type": "text", | ||
"data": "Item 4", | ||
"style": { | ||
"color": "#F57F17" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "container", | ||
"decoration": { | ||
"type": "boxDecoration", | ||
"color": "#FFCCBC", | ||
"borderRadius": { | ||
"all": 8.0 | ||
} | ||
}, | ||
"child": { | ||
"type": "center", | ||
"child": { | ||
"type": "text", | ||
"data": "Item 5", | ||
"style": { | ||
"color": "#BF360C" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "container", | ||
"decoration": { | ||
"type": "boxDecoration", | ||
"color": "#B2EBF2", | ||
"borderRadius": { | ||
"all": 8.0 | ||
} | ||
}, | ||
"child": { | ||
"type": "center", | ||
"child": { | ||
"type": "text", | ||
"data": "Item 6", | ||
"style": { | ||
"color": "#006064" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "container", | ||
"decoration": { | ||
"type": "boxDecoration", | ||
"color": "#F8BBD0", | ||
"borderRadius": { | ||
"all": 8.0 | ||
} | ||
}, | ||
"child": { | ||
"type": "center", | ||
"child": { | ||
"type": "text", | ||
"data": "Item 7", | ||
"style": { | ||
"color": "#880E4F" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "container", | ||
"decoration": { | ||
"type": "boxDecoration", | ||
"color": "#D1C4E9", | ||
"borderRadius": { | ||
"all": 8.0 | ||
} | ||
}, | ||
"child": { | ||
"type": "center", | ||
"child": { | ||
"type": "text", | ||
"data": "Item 8", | ||
"style": { | ||
"color": "#311B92" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "container", | ||
"decoration": { | ||
"type": "boxDecoration", | ||
"color": "#C5CAE9", | ||
"borderRadius": { | ||
"all": 8.0 | ||
} | ||
}, | ||
"child": { | ||
"type": "center", | ||
"child": { | ||
"type": "text", | ||
"data": "Item 9", | ||
"style": { | ||
"color": "#1A237E" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "container", | ||
"decoration": { | ||
"type": "boxDecoration", | ||
"color": "#FFE0B2", | ||
"borderRadius": { | ||
"all": 8.0 | ||
} | ||
}, | ||
"child": { | ||
"type": "center", | ||
"child": { | ||
"type": "text", | ||
"data": "Item 10", | ||
"style": { | ||
"color": "#E65100" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
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