json_flit 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -0
  3. data/Gemfile.lock +29 -3
  4. data/README.md +3 -5
  5. data/demo/.ruby-version +1 -0
  6. data/demo/Gemfile +73 -0
  7. data/demo/Gemfile.lock +218 -0
  8. data/demo/Procfile.dev +3 -0
  9. data/demo/README.md +24 -0
  10. data/demo/Rakefile +6 -0
  11. data/demo/app/assets/builds/.keep +0 -0
  12. data/demo/app/assets/fonts/Lato-Regular.ttf +0 -0
  13. data/demo/app/assets/fonts/MetalMania-Regular.ttf +0 -0
  14. data/demo/app/assets/images/.keep +0 -0
  15. data/demo/app/assets/images/image1.jpg +0 -0
  16. data/demo/app/assets/images/image10.jpg +0 -0
  17. data/demo/app/assets/images/image11.jpg +0 -0
  18. data/demo/app/assets/images/image12.jpg +0 -0
  19. data/demo/app/assets/images/image13.jpg +0 -0
  20. data/demo/app/assets/images/image14.jpg +0 -0
  21. data/demo/app/assets/images/image15.jpg +0 -0
  22. data/demo/app/assets/images/image16.jpg +0 -0
  23. data/demo/app/assets/images/image17.jpg +0 -0
  24. data/demo/app/assets/images/image2.jpg +0 -0
  25. data/demo/app/assets/images/image3.jpg +0 -0
  26. data/demo/app/assets/images/image4.jpg +0 -0
  27. data/demo/app/assets/images/image5.jpg +0 -0
  28. data/demo/app/assets/images/image6.jpg +0 -0
  29. data/demo/app/assets/images/image7.jpg +0 -0
  30. data/demo/app/assets/images/image8.jpg +0 -0
  31. data/demo/app/assets/images/image9.jpg +0 -0
  32. data/demo/app/assets/images/profile.jpg +0 -0
  33. data/demo/app/assets/images/visa.svg +1 -0
  34. data/demo/app/assets/pages/align.json +182 -0
  35. data/demo/app/assets/pages/animated_align.json +50 -0
  36. data/demo/app/assets/pages/animated_container.json +56 -0
  37. data/demo/app/assets/pages/animated_cross_fade.json +63 -0
  38. data/demo/app/assets/pages/animated_default_text_style.json +53 -0
  39. data/demo/app/assets/pages/animated_opacity.json +49 -0
  40. data/demo/app/assets/pages/animated_padding.json +50 -0
  41. data/demo/app/assets/pages/animated_physical_model.json +73 -0
  42. data/demo/app/assets/pages/animated_positioned.json +54 -0
  43. data/demo/app/assets/pages/animated_positioned_directional.json +60 -0
  44. data/demo/app/assets/pages/animated_size.json +61 -0
  45. data/demo/app/assets/pages/animated_switcher.json +62 -0
  46. data/demo/app/assets/pages/animated_theme.json +52 -0
  47. data/demo/app/assets/pages/aspect_ratio.json +124 -0
  48. data/demo/app/assets/pages/asset_images.json +667 -0
  49. data/demo/app/assets/pages/bank_example.json +913 -0
  50. data/demo/app/assets/pages/baseline.json +81 -0
  51. data/demo/app/assets/pages/buttons.json +139 -0
  52. data/demo/app/assets/pages/card.json +121 -0
  53. data/demo/app/assets/pages/center.json +25 -0
  54. data/demo/app/assets/pages/checkbox.json +77 -0
  55. data/demo/app/assets/pages/circular_progress_indicator.json +45 -0
  56. data/demo/app/assets/pages/clips.json +156 -0
  57. data/demo/app/assets/pages/conditional.json +197 -0
  58. data/demo/app/assets/pages/cupertino_switch.yaml +72 -0
  59. data/demo/app/assets/pages/decorated_box.json +38 -0
  60. data/demo/app/assets/pages/directionality.json +31 -0
  61. data/demo/app/assets/pages/dynamic.json +299 -0
  62. data/demo/app/assets/pages/fitted_box.json +41 -0
  63. data/demo/app/assets/pages/for_each.json +130 -0
  64. data/demo/app/assets/pages/form.json +276 -0
  65. data/demo/app/assets/pages/fractional_translation.json +31 -0
  66. data/demo/app/assets/pages/fractionally_sized_box.json +34 -0
  67. data/demo/app/assets/pages/gestures.json +83 -0
  68. data/demo/app/assets/pages/grid_view.json +217 -0
  69. data/demo/app/assets/pages/image_page.json +32 -0
  70. data/demo/app/assets/pages/images.json +89 -0
  71. data/demo/app/assets/pages/indexed_stack.json +101 -0
  72. data/demo/app/assets/pages/input_error.json +64 -0
  73. data/demo/app/assets/pages/interactive_viewer.json +30 -0
  74. data/demo/app/assets/pages/intrinsic_height.json +63 -0
  75. data/demo/app/assets/pages/intrinsic_width.json +63 -0
  76. data/demo/app/assets/pages/issue_10.json +23 -0
  77. data/demo/app/assets/pages/issue_109.json +65 -0
  78. data/demo/app/assets/pages/issue_11.json +23 -0
  79. data/demo/app/assets/pages/issue_12.json +34 -0
  80. data/demo/app/assets/pages/issue_20_list.json +31 -0
  81. data/demo/app/assets/pages/issue_20_single.json +31 -0
  82. data/demo/app/assets/pages/issue_30.json +35 -0
  83. data/demo/app/assets/pages/layout_builder.json +403 -0
  84. data/demo/app/assets/pages/length.json +125 -0
  85. data/demo/app/assets/pages/limited_box.json +33 -0
  86. data/demo/app/assets/pages/linear_progress_indicator.json +25 -0
  87. data/demo/app/assets/pages/list_view.json +410 -0
  88. data/demo/app/assets/pages/measured.json +266 -0
  89. data/demo/app/assets/pages/offstage.json +50 -0
  90. data/demo/app/assets/pages/opacity.json +136 -0
  91. data/demo/app/assets/pages/overflow_box.json +52 -0
  92. data/demo/app/assets/pages/placeholder.json +57 -0
  93. data/demo/app/assets/pages/popup_menu_button.json +38 -0
  94. data/demo/app/assets/pages/radio.json +60 -0
  95. data/demo/app/assets/pages/rich_text.json +45 -0
  96. data/demo/app/assets/pages/scroll_view.json +974 -0
  97. data/demo/app/assets/pages/semantics.json +212 -0
  98. data/demo/app/assets/pages/set_default_value.json +77 -0
  99. data/demo/app/assets/pages/simple_page.json +25 -0
  100. data/demo/app/assets/pages/slivers.json +268 -0
  101. data/demo/app/assets/pages/switch.json +77 -0
  102. data/demo/app/assets/pages/theme.json +228 -0
  103. data/demo/app/assets/pages/tooltip.json +77 -0
  104. data/demo/app/assets/pages/tween_animation.json +43 -0
  105. data/demo/app/assets/pages/variables.json +64 -0
  106. data/demo/app/assets/pages/wrap.json +117 -0
  107. data/demo/app/assets/stylesheets/application.css +1 -0
  108. data/demo/app/assets/stylesheets/application.tailwind.css +13 -0
  109. data/demo/app/assets/widgets/issue_24.json +42 -0
  110. data/demo/app/channels/application_cable/channel.rb +4 -0
  111. data/demo/app/channels/application_cable/connection.rb +4 -0
  112. data/demo/app/controllers/application_controller.rb +2 -0
  113. data/demo/app/controllers/concerns/.keep +0 -0
  114. data/demo/app/controllers/welcome_controller.rb +22 -0
  115. data/demo/app/helpers/application_helper.rb +2 -0
  116. data/demo/app/helpers/welcome_helper.rb +2 -0
  117. data/demo/app/javascript/application.js +3 -0
  118. data/demo/app/javascript/controllers/application.js +9 -0
  119. data/demo/app/javascript/controllers/hello_controller.js +7 -0
  120. data/demo/app/javascript/controllers/index.js +8 -0
  121. data/demo/app/jobs/application_job.rb +7 -0
  122. data/demo/app/mailers/application_mailer.rb +4 -0
  123. data/demo/app/models/application_record.rb +3 -0
  124. data/demo/app/models/concerns/.keep +0 -0
  125. data/demo/app/views/layouts/application.html.erb +16 -0
  126. data/demo/app/views/layouts/mailer.html.erb +13 -0
  127. data/demo/app/views/layouts/mailer.text.erb +1 -0
  128. data/demo/app/views/welcome/index.html.erb +5 -0
  129. data/demo/app/views/welcome/show.html.erb +6 -0
  130. data/demo/bin/bundle +109 -0
  131. data/demo/bin/dev +8 -0
  132. data/demo/bin/rails +4 -0
  133. data/demo/bin/rake +4 -0
  134. data/demo/bin/setup +33 -0
  135. data/demo/config/application.rb +37 -0
  136. data/demo/config/boot.rb +4 -0
  137. data/demo/config/cable.yml +11 -0
  138. data/demo/config/credentials.yml.enc +1 -0
  139. data/demo/config/database.yml +25 -0
  140. data/demo/config/environment.rb +5 -0
  141. data/demo/config/environments/development.rb +68 -0
  142. data/demo/config/environments/production.rb +87 -0
  143. data/demo/config/environments/test.rb +60 -0
  144. data/demo/config/initializers/assets.rb +12 -0
  145. data/demo/config/initializers/content_security_policy.rb +25 -0
  146. data/demo/config/initializers/filter_parameter_logging.rb +8 -0
  147. data/demo/config/initializers/inflections.rb +16 -0
  148. data/demo/config/initializers/permissions_policy.rb +11 -0
  149. data/demo/config/locales/en.yml +33 -0
  150. data/demo/config/puma.rb +43 -0
  151. data/demo/config/routes.rb +5 -0
  152. data/demo/config/storage.yml +34 -0
  153. data/demo/config/tailwind.config.js +22 -0
  154. data/demo/config.ru +6 -0
  155. data/demo/db/development.sqlite3 +0 -0
  156. data/demo/db/seeds.rb +7 -0
  157. data/demo/lib/assets/.keep +0 -0
  158. data/demo/lib/tasks/.keep +0 -0
  159. data/demo/log/.keep +0 -0
  160. data/demo/public/404.html +67 -0
  161. data/demo/public/422.html +67 -0
  162. data/demo/public/500.html +66 -0
  163. data/demo/public/apple-touch-icon-precomposed.png +0 -0
  164. data/demo/public/apple-touch-icon.png +0 -0
  165. data/demo/public/favicon.ico +0 -0
  166. data/demo/public/robots.txt +1 -0
  167. data/demo/storage/.keep +0 -0
  168. data/demo/tmp/.keep +0 -0
  169. data/demo/tmp/pids/.keep +0 -0
  170. data/demo/tmp/storage/.keep +0 -0
  171. data/demo/vendor/.keep +0 -0
  172. data/lib/json_flit/registry.rb +144 -0
  173. data/lib/json_flit/version.rb +1 -1
  174. metadata +185 -3
@@ -0,0 +1,212 @@
1
+ {
2
+ "type": "scaffold",
3
+ "args": {
4
+ "appBar": {
5
+ "type": "app_bar",
6
+ "args": {
7
+ "title": {
8
+ "type": "text",
9
+ "args": {
10
+ "text": "Form"
11
+ }
12
+ }
13
+ }
14
+ },
15
+ "backgroundColor": "#e0e0e0",
16
+ "body": {
17
+ "type": "safe_area",
18
+ "args": {
19
+ "bottom": true
20
+ },
21
+ "child": {
22
+ "type": "form",
23
+ "child": {
24
+ "type": "single_child_scroll_view",
25
+ "args": {
26
+ "padding": [
27
+ 16,
28
+ 0
29
+ ]
30
+ },
31
+ "child": {
32
+ "type": "container",
33
+ "args": {
34
+ "alignment": "topCenter",
35
+ "width": "infinity"
36
+ },
37
+ "child": {
38
+ "type": "container",
39
+ "args": {
40
+ "constraints": {
41
+ "maxWidth": 450
42
+ }
43
+ },
44
+ "child": {
45
+ "type": "column",
46
+ "args": {
47
+ "mainAxisSize": "min"
48
+ },
49
+ "children": [
50
+ {
51
+ "type": "sized_box",
52
+ "args": {
53
+ "height": 16
54
+ }
55
+ },
56
+ {
57
+ "type": "sized_box",
58
+ "args": {
59
+ "height": 8
60
+ }
61
+ },
62
+ {
63
+ "type": "material",
64
+ "args": {
65
+ "borderRadius": 16,
66
+ "color": "#fff",
67
+ "elevation": 4,
68
+ "margin": [
69
+ 0,
70
+ 8
71
+ ],
72
+ "padding": 16
73
+ },
74
+ "child": {
75
+ "type": "column",
76
+ "args": {
77
+ "mainAxisSize": "min"
78
+ },
79
+ "children": [
80
+ {
81
+ "type": "row",
82
+ "children": [
83
+ {
84
+ "child": {
85
+ "type": "flexible",
86
+ "child": {
87
+ "type": "text_form_field",
88
+ "args": {
89
+ "decoration": {
90
+ "hintText": "John",
91
+ "labelText": "First Name"
92
+ },
93
+ "validators": [
94
+ {
95
+ "type": "required"
96
+ }
97
+ ]
98
+ }
99
+ }
100
+ }
101
+ },
102
+ {
103
+ "type": "sized_box",
104
+ "args": {
105
+ "width": 16
106
+ }
107
+ },
108
+ {
109
+ "type": "flexible",
110
+ "child": {
111
+ "type": "text_form_field",
112
+ "args": {
113
+ "decoration": {
114
+ "hintText": "Doe",
115
+ "labelText": "Last Name"
116
+ },
117
+ "validators": [
118
+ {
119
+ "type": "required"
120
+ }
121
+ ]
122
+ }
123
+ }
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ "type": "sized_box",
129
+ "args": {
130
+ "height": 16
131
+ }
132
+ },
133
+ {
134
+ "type": "text_form_field",
135
+ "args": {
136
+ "decoration": {
137
+ "hintText": "name@example.com",
138
+ "labelText": "Email Address"
139
+ },
140
+ "validators": [
141
+ {
142
+ "type": "required"
143
+ },
144
+ {
145
+ "type": "email"
146
+ }
147
+ ]
148
+ }
149
+ },
150
+ {
151
+ "type": "sized_box",
152
+ "args": {
153
+ "height": 16
154
+ }
155
+ },
156
+ {
157
+ "type": "dropdown_button_form_field",
158
+ "args": {
159
+ "decoration": {
160
+ "labelText": "Email Type"
161
+ },
162
+ "items": [
163
+ "Home",
164
+ "Other",
165
+ "Work"
166
+ ],
167
+ "validators": [
168
+ {
169
+ "type": "required"
170
+ }
171
+ ]
172
+ }
173
+ }
174
+ ]
175
+ }
176
+ },
177
+ {
178
+ "type": "elevated_button",
179
+ "args": {
180
+ "color": "#4a95ec",
181
+ "colorBrightness": "dark",
182
+ "onPressed": "${validateForm('form_context')}"
183
+ },
184
+ "child": {
185
+ "type": "container",
186
+ "args": {
187
+ "alignment": "center",
188
+ "width": "infinity"
189
+ },
190
+ "child": {
191
+ "type": "save_context",
192
+ "args": {
193
+ "key": "form_context"
194
+ },
195
+ "child": {
196
+ "type": "text",
197
+ "args": {
198
+ "text": "Submit"
199
+ }
200
+ }
201
+ }
202
+ }
203
+ }
204
+ ]
205
+ }
206
+ }
207
+ }
208
+ }
209
+ }
210
+ }
211
+ }
212
+ }
@@ -0,0 +1,77 @@
1
+ {
2
+ "type": "set_default_value",
3
+ "args": {
4
+ "default": "set_default_value",
5
+ "nonDefault": "set_default_value"
6
+ },
7
+ "child": {
8
+ "type": "set_value",
9
+ "args": {
10
+ "nonDefault": "set_value"
11
+ },
12
+ "child": {
13
+ "type": "set_default_value",
14
+ "args": {
15
+ "nonDefault": "set_value"
16
+ },
17
+ "child": {
18
+ "type": "scaffold",
19
+ "args": {
20
+ "appBar": {
21
+ "type": "app_bar",
22
+ "args": {
23
+ "title": {
24
+ "type": "text",
25
+ "args": {
26
+ "text": "Set Default Value"
27
+ }
28
+ }
29
+ }
30
+ },
31
+ "body": {
32
+ "type": "center",
33
+ "child": {
34
+ "type": "list_view",
35
+ "children": [
36
+ {
37
+ "type": "list_tile",
38
+ "args": {
39
+ "subtitle": {
40
+ "type": "text",
41
+ "args": {
42
+ "text": "${default}"
43
+ }
44
+ },
45
+ "title": {
46
+ "type": "text",
47
+ "args": {
48
+ "text": "default"
49
+ }
50
+ }
51
+ }
52
+ },
53
+ {
54
+ "type": "list_tile",
55
+ "args": {
56
+ "subtitle": {
57
+ "type": "text",
58
+ "args": {
59
+ "text": "${nonDefault}"
60
+ }
61
+ },
62
+ "title": {
63
+ "type": "text",
64
+ "args": {
65
+ "text": "nonDefault"
66
+ }
67
+ }
68
+ }
69
+ }
70
+ ]
71
+ }
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "type": "scaffold",
3
+ "args": {
4
+ "appBar": {
5
+ "type": "app_bar",
6
+ "args": {
7
+ "title": {
8
+ "type": "text",
9
+ "args": {
10
+ "text": "Simple Page"
11
+ }
12
+ }
13
+ }
14
+ },
15
+ "body": {
16
+ "type": "center",
17
+ "child": {
18
+ "type": "text",
19
+ "args": {
20
+ "text": "Hello World!"
21
+ }
22
+ }
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,268 @@
1
+ {
2
+ "type": "set_value",
3
+ "args": {
4
+ "entries": {
5
+ "values": [
6
+ "align",
7
+ "animated_align",
8
+ "animated_container",
9
+ "animated_cross_fade",
10
+ "animated_default_text_style",
11
+ "animated_opacity",
12
+ "animated_padding",
13
+ "animated_physical_model",
14
+ "animated_positioned",
15
+ "animated_positioned_directional",
16
+ "animated_size",
17
+ "animated_switcher",
18
+ "animated_theme",
19
+ "aspect_ratio",
20
+ "asset_images",
21
+ "bank_example",
22
+ "baseline",
23
+ "buttons",
24
+ "card",
25
+ "center",
26
+ "checkbox",
27
+ "circular_progress_indicator",
28
+ "clips",
29
+ "conditional",
30
+ "cupertino_switch",
31
+ "decorated_box",
32
+ "directionality",
33
+ "dynamic",
34
+ "fitted_box",
35
+ "for_each",
36
+ "form",
37
+ "fractional_translation",
38
+ "fractionally_sized_box",
39
+ "gestures",
40
+ "images",
41
+ "indexed_stack",
42
+ "input_error",
43
+ "interactive_viewer",
44
+ "intrinsic_height",
45
+ "intrinsic_width",
46
+ "issue_10",
47
+ "issue_11",
48
+ "issue_12",
49
+ "issue_20_list",
50
+ "issue_20_single",
51
+ "issue_24",
52
+ "issue_30",
53
+ "layout_builder",
54
+ "limited_box",
55
+ "linear_progress_indicator",
56
+ "list_view",
57
+ "measured",
58
+ "offstage",
59
+ "opacity",
60
+ "overflow_box",
61
+ "placeholder",
62
+ "popup_menu_button",
63
+ "simple_page",
64
+ "switch",
65
+ "theme",
66
+ "tween_animation",
67
+ "variables"
68
+ ]
69
+ },
70
+ "listTemplate": {
71
+ "type": "list_tile",
72
+ "args": {
73
+ "title": {
74
+ "type": "text",
75
+ "args": {
76
+ "text": "${value}"
77
+ }
78
+ }
79
+ }
80
+ },
81
+ "template": {
82
+ "type": "padding",
83
+ "args": {
84
+ "padding": 16.0
85
+ },
86
+ "child": {
87
+ "type": "material",
88
+ "args": {
89
+ "elevation": 2
90
+ },
91
+ "child": {
92
+ "type": "container",
93
+ "args": {
94
+ "color": "#ccc"
95
+ },
96
+ "child": {
97
+ "type": "stack",
98
+ "args": {
99
+ "alignment": "center"
100
+ },
101
+ "children": [
102
+ {
103
+ "type": "opacity",
104
+ "args": {
105
+ "opacity": 0.25
106
+ },
107
+ "child": {
108
+ "type": "placeholder"
109
+ }
110
+ },
111
+ {
112
+ "type": "text",
113
+ "args": {
114
+ "text": "${value}"
115
+ }
116
+ }
117
+ ]
118
+ }
119
+ }
120
+ }
121
+ }
122
+ },
123
+ "child": {
124
+ "type": "scaffold",
125
+ "args": {
126
+ "appBar": {
127
+ "type": "app_bar",
128
+ "args": {
129
+ "title": {
130
+ "type": "text",
131
+ "args": {
132
+ "text": "Slivers"
133
+ }
134
+ }
135
+ }
136
+ },
137
+ "body": {
138
+ "type": "set_scroll_controller",
139
+ "args": {
140
+ "key": "controller"
141
+ },
142
+ "child": {
143
+ "type": "scrollbar",
144
+ "args": {
145
+ "controller": "${controller}"
146
+ },
147
+ "child": {
148
+ "type": "padding",
149
+ "args": {
150
+ "padding": {
151
+ "left": 40,
152
+ "right": 40
153
+ }
154
+ },
155
+ "child": {
156
+ "type": "custom_scroll_view",
157
+ "args": {
158
+ "controller": "${controller}"
159
+ },
160
+ "children": [
161
+ {
162
+ "type": "sliver_padding",
163
+ "args": {
164
+ "padding": {
165
+ "top": 16
166
+ }
167
+ },
168
+ "child": {
169
+ "type": "sliver_to_box_adapter",
170
+ "child": {
171
+ "type": "list_tile",
172
+ "args": {
173
+ "subtitle": {
174
+ "type": "text",
175
+ "args": {
176
+ "text": "max_cross_axis_extent"
177
+ }
178
+ },
179
+ "title": {
180
+ "type": "text",
181
+ "args": {
182
+ "text": "SliverGrid"
183
+ }
184
+ }
185
+ }
186
+ }
187
+ }
188
+ },
189
+ {
190
+ "type": "sliver_grid",
191
+ "args": {
192
+ "gridDelegate": {
193
+ "childAspectRatio": 1.5,
194
+ "crossAxisSpacing": 16.0,
195
+ "mainAxisSpacing": 12.0,
196
+ "maxCrossAxisExtent": 300,
197
+ "type": "max_cross_axis_extent"
198
+ }
199
+ },
200
+ "children": "${for_each(entries['values'], 'template')}"
201
+ },
202
+ {
203
+ "type": "sliver_to_box_adapter",
204
+ "child": {
205
+ "type": "list_tile",
206
+ "args": {
207
+ "title": {
208
+ "type": "text",
209
+ "args": {
210
+ "text": "SliverList"
211
+ }
212
+ }
213
+ }
214
+ }
215
+ },
216
+ {
217
+ "type": "sliver_list",
218
+ "children": "${for_each(entries['values'], 'listTemplate')}"
219
+ },
220
+ {
221
+ "type": "sliver_to_box_adapter",
222
+ "child": {
223
+ "type": "list_tile",
224
+ "args": {
225
+ "subtitle": {
226
+ "type": "text",
227
+ "args": {
228
+ "text": "fixed_cross_axis_count"
229
+ }
230
+ },
231
+ "title": {
232
+ "type": "text",
233
+ "args": {
234
+ "text": "SliverGrid"
235
+ }
236
+ }
237
+ }
238
+ }
239
+ },
240
+ {
241
+ "type": "sliver_padding",
242
+ "args": {
243
+ "padding": {
244
+ "bottom": 16
245
+ }
246
+ },
247
+ "child": {
248
+ "type": "sliver_grid",
249
+ "args": {
250
+ "gridDelegate": {
251
+ "crossAxisCount": 4,
252
+ "childAspectRatio": 0.5,
253
+ "crossAxisSpacing": 8.0,
254
+ "mainAxisSpacing": 12.0,
255
+ "type": "fixed_cross_axis_count"
256
+ }
257
+ },
258
+ "children": "${for_each(entries['values'], 'template')}"
259
+ }
260
+ }
261
+ ]
262
+ }
263
+ }
264
+ }
265
+ }
266
+ }
267
+ }
268
+ }
@@ -0,0 +1,77 @@
1
+ {
2
+ "type": "scaffold",
3
+ "args": {
4
+ "appBar": {
5
+ "type": "app_bar",
6
+ "args": {
7
+ "title": {
8
+ "type": "text",
9
+ "args": {
10
+ "text": "Switch"
11
+ }
12
+ }
13
+ }
14
+ },
15
+ "body": {
16
+ "type": "center",
17
+ "child": {
18
+ "type": "column",
19
+ "args": {
20
+ "mainAxisSize": "min"
21
+ },
22
+ "children": [{
23
+ "type": "row",
24
+ "args": {
25
+ "mainAxisSize": "min"
26
+ },
27
+ "children": [{
28
+ "type": "switch",
29
+ "args": {
30
+ "label": "Checked",
31
+ "value": true
32
+ }
33
+ }, {
34
+ "type": "text",
35
+ "args": {
36
+ "text": "Checked"
37
+ }
38
+ }]
39
+ }, {
40
+ "type": "row",
41
+ "args": {
42
+ "mainAxisSize": "min"
43
+ },
44
+ "children": [{
45
+ "type": "switch",
46
+ "args": {
47
+ "label": "Not Checked",
48
+ "value": false
49
+ }
50
+ }, {
51
+ "type": "text",
52
+ "args": {
53
+ "text": "Not Checked"
54
+ }
55
+ }]
56
+ }, {
57
+ "type": "row",
58
+ "args": {
59
+ "mainAxisSize": "min"
60
+ },
61
+ "children": [{
62
+ "type": "switch",
63
+ "args": {
64
+ "enabled": false,
65
+ "label": "Disabled"
66
+ }
67
+ }, {
68
+ "type": "text",
69
+ "args": {
70
+ "text": "Disabled"
71
+ }
72
+ }]
73
+ }]
74
+ }
75
+ }
76
+ }
77
+ }