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.
- checksums.yaml +4 -4
- data/Gemfile +3 -0
- data/Gemfile.lock +29 -3
- data/README.md +3 -5
- data/demo/.ruby-version +1 -0
- data/demo/Gemfile +73 -0
- data/demo/Gemfile.lock +218 -0
- data/demo/Procfile.dev +3 -0
- data/demo/README.md +24 -0
- data/demo/Rakefile +6 -0
- data/demo/app/assets/builds/.keep +0 -0
- data/demo/app/assets/fonts/Lato-Regular.ttf +0 -0
- data/demo/app/assets/fonts/MetalMania-Regular.ttf +0 -0
- data/demo/app/assets/images/.keep +0 -0
- data/demo/app/assets/images/image1.jpg +0 -0
- data/demo/app/assets/images/image10.jpg +0 -0
- data/demo/app/assets/images/image11.jpg +0 -0
- data/demo/app/assets/images/image12.jpg +0 -0
- data/demo/app/assets/images/image13.jpg +0 -0
- data/demo/app/assets/images/image14.jpg +0 -0
- data/demo/app/assets/images/image15.jpg +0 -0
- data/demo/app/assets/images/image16.jpg +0 -0
- data/demo/app/assets/images/image17.jpg +0 -0
- data/demo/app/assets/images/image2.jpg +0 -0
- data/demo/app/assets/images/image3.jpg +0 -0
- data/demo/app/assets/images/image4.jpg +0 -0
- data/demo/app/assets/images/image5.jpg +0 -0
- data/demo/app/assets/images/image6.jpg +0 -0
- data/demo/app/assets/images/image7.jpg +0 -0
- data/demo/app/assets/images/image8.jpg +0 -0
- data/demo/app/assets/images/image9.jpg +0 -0
- data/demo/app/assets/images/profile.jpg +0 -0
- data/demo/app/assets/images/visa.svg +1 -0
- data/demo/app/assets/pages/align.json +182 -0
- data/demo/app/assets/pages/animated_align.json +50 -0
- data/demo/app/assets/pages/animated_container.json +56 -0
- data/demo/app/assets/pages/animated_cross_fade.json +63 -0
- data/demo/app/assets/pages/animated_default_text_style.json +53 -0
- data/demo/app/assets/pages/animated_opacity.json +49 -0
- data/demo/app/assets/pages/animated_padding.json +50 -0
- data/demo/app/assets/pages/animated_physical_model.json +73 -0
- data/demo/app/assets/pages/animated_positioned.json +54 -0
- data/demo/app/assets/pages/animated_positioned_directional.json +60 -0
- data/demo/app/assets/pages/animated_size.json +61 -0
- data/demo/app/assets/pages/animated_switcher.json +62 -0
- data/demo/app/assets/pages/animated_theme.json +52 -0
- data/demo/app/assets/pages/aspect_ratio.json +124 -0
- data/demo/app/assets/pages/asset_images.json +667 -0
- data/demo/app/assets/pages/bank_example.json +913 -0
- data/demo/app/assets/pages/baseline.json +81 -0
- data/demo/app/assets/pages/buttons.json +139 -0
- data/demo/app/assets/pages/card.json +121 -0
- data/demo/app/assets/pages/center.json +25 -0
- data/demo/app/assets/pages/checkbox.json +77 -0
- data/demo/app/assets/pages/circular_progress_indicator.json +45 -0
- data/demo/app/assets/pages/clips.json +156 -0
- data/demo/app/assets/pages/conditional.json +197 -0
- data/demo/app/assets/pages/cupertino_switch.yaml +72 -0
- data/demo/app/assets/pages/decorated_box.json +38 -0
- data/demo/app/assets/pages/directionality.json +31 -0
- data/demo/app/assets/pages/dynamic.json +299 -0
- data/demo/app/assets/pages/fitted_box.json +41 -0
- data/demo/app/assets/pages/for_each.json +130 -0
- data/demo/app/assets/pages/form.json +276 -0
- data/demo/app/assets/pages/fractional_translation.json +31 -0
- data/demo/app/assets/pages/fractionally_sized_box.json +34 -0
- data/demo/app/assets/pages/gestures.json +83 -0
- data/demo/app/assets/pages/grid_view.json +217 -0
- data/demo/app/assets/pages/image_page.json +32 -0
- data/demo/app/assets/pages/images.json +89 -0
- data/demo/app/assets/pages/indexed_stack.json +101 -0
- data/demo/app/assets/pages/input_error.json +64 -0
- data/demo/app/assets/pages/interactive_viewer.json +30 -0
- data/demo/app/assets/pages/intrinsic_height.json +63 -0
- data/demo/app/assets/pages/intrinsic_width.json +63 -0
- data/demo/app/assets/pages/issue_10.json +23 -0
- data/demo/app/assets/pages/issue_109.json +65 -0
- data/demo/app/assets/pages/issue_11.json +23 -0
- data/demo/app/assets/pages/issue_12.json +34 -0
- data/demo/app/assets/pages/issue_20_list.json +31 -0
- data/demo/app/assets/pages/issue_20_single.json +31 -0
- data/demo/app/assets/pages/issue_30.json +35 -0
- data/demo/app/assets/pages/layout_builder.json +403 -0
- data/demo/app/assets/pages/length.json +125 -0
- data/demo/app/assets/pages/limited_box.json +33 -0
- data/demo/app/assets/pages/linear_progress_indicator.json +25 -0
- data/demo/app/assets/pages/list_view.json +410 -0
- data/demo/app/assets/pages/measured.json +266 -0
- data/demo/app/assets/pages/offstage.json +50 -0
- data/demo/app/assets/pages/opacity.json +136 -0
- data/demo/app/assets/pages/overflow_box.json +52 -0
- data/demo/app/assets/pages/placeholder.json +57 -0
- data/demo/app/assets/pages/popup_menu_button.json +38 -0
- data/demo/app/assets/pages/radio.json +60 -0
- data/demo/app/assets/pages/rich_text.json +45 -0
- data/demo/app/assets/pages/scroll_view.json +974 -0
- data/demo/app/assets/pages/semantics.json +212 -0
- data/demo/app/assets/pages/set_default_value.json +77 -0
- data/demo/app/assets/pages/simple_page.json +25 -0
- data/demo/app/assets/pages/slivers.json +268 -0
- data/demo/app/assets/pages/switch.json +77 -0
- data/demo/app/assets/pages/theme.json +228 -0
- data/demo/app/assets/pages/tooltip.json +77 -0
- data/demo/app/assets/pages/tween_animation.json +43 -0
- data/demo/app/assets/pages/variables.json +64 -0
- data/demo/app/assets/pages/wrap.json +117 -0
- data/demo/app/assets/stylesheets/application.css +1 -0
- data/demo/app/assets/stylesheets/application.tailwind.css +13 -0
- data/demo/app/assets/widgets/issue_24.json +42 -0
- data/demo/app/channels/application_cable/channel.rb +4 -0
- data/demo/app/channels/application_cable/connection.rb +4 -0
- data/demo/app/controllers/application_controller.rb +2 -0
- data/demo/app/controllers/concerns/.keep +0 -0
- data/demo/app/controllers/welcome_controller.rb +22 -0
- data/demo/app/helpers/application_helper.rb +2 -0
- data/demo/app/helpers/welcome_helper.rb +2 -0
- data/demo/app/javascript/application.js +3 -0
- data/demo/app/javascript/controllers/application.js +9 -0
- data/demo/app/javascript/controllers/hello_controller.js +7 -0
- data/demo/app/javascript/controllers/index.js +8 -0
- data/demo/app/jobs/application_job.rb +7 -0
- data/demo/app/mailers/application_mailer.rb +4 -0
- data/demo/app/models/application_record.rb +3 -0
- data/demo/app/models/concerns/.keep +0 -0
- data/demo/app/views/layouts/application.html.erb +16 -0
- data/demo/app/views/layouts/mailer.html.erb +13 -0
- data/demo/app/views/layouts/mailer.text.erb +1 -0
- data/demo/app/views/welcome/index.html.erb +5 -0
- data/demo/app/views/welcome/show.html.erb +6 -0
- data/demo/bin/bundle +109 -0
- data/demo/bin/dev +8 -0
- data/demo/bin/rails +4 -0
- data/demo/bin/rake +4 -0
- data/demo/bin/setup +33 -0
- data/demo/config/application.rb +37 -0
- data/demo/config/boot.rb +4 -0
- data/demo/config/cable.yml +11 -0
- data/demo/config/credentials.yml.enc +1 -0
- data/demo/config/database.yml +25 -0
- data/demo/config/environment.rb +5 -0
- data/demo/config/environments/development.rb +68 -0
- data/demo/config/environments/production.rb +87 -0
- data/demo/config/environments/test.rb +60 -0
- data/demo/config/initializers/assets.rb +12 -0
- data/demo/config/initializers/content_security_policy.rb +25 -0
- data/demo/config/initializers/filter_parameter_logging.rb +8 -0
- data/demo/config/initializers/inflections.rb +16 -0
- data/demo/config/initializers/permissions_policy.rb +11 -0
- data/demo/config/locales/en.yml +33 -0
- data/demo/config/puma.rb +43 -0
- data/demo/config/routes.rb +5 -0
- data/demo/config/storage.yml +34 -0
- data/demo/config/tailwind.config.js +22 -0
- data/demo/config.ru +6 -0
- data/demo/db/development.sqlite3 +0 -0
- data/demo/db/seeds.rb +7 -0
- data/demo/lib/assets/.keep +0 -0
- data/demo/lib/tasks/.keep +0 -0
- data/demo/log/.keep +0 -0
- data/demo/public/404.html +67 -0
- data/demo/public/422.html +67 -0
- data/demo/public/500.html +66 -0
- data/demo/public/apple-touch-icon-precomposed.png +0 -0
- data/demo/public/apple-touch-icon.png +0 -0
- data/demo/public/favicon.ico +0 -0
- data/demo/public/robots.txt +1 -0
- data/demo/storage/.keep +0 -0
- data/demo/tmp/.keep +0 -0
- data/demo/tmp/pids/.keep +0 -0
- data/demo/tmp/storage/.keep +0 -0
- data/demo/vendor/.keep +0 -0
- data/lib/json_flit/registry.rb +144 -0
- data/lib/json_flit/version.rb +1 -1
- metadata +185 -3
@@ -0,0 +1,130 @@
|
|
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
|
+
"template": {
|
71
|
+
"type": "list_tile",
|
72
|
+
"args": {
|
73
|
+
"subtitle": {
|
74
|
+
"type": "text",
|
75
|
+
"args": {
|
76
|
+
"text": "${key}"
|
77
|
+
}
|
78
|
+
},
|
79
|
+
"title": {
|
80
|
+
"type": "text",
|
81
|
+
"args": {
|
82
|
+
"text": "${value}"
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
87
|
+
},
|
88
|
+
"child": {
|
89
|
+
"type": "scaffold",
|
90
|
+
"args": {
|
91
|
+
"appBar": {
|
92
|
+
"type": "app_bar",
|
93
|
+
"args": {
|
94
|
+
"title": {
|
95
|
+
"type": "row",
|
96
|
+
"args": {
|
97
|
+
"crossAxisAlignment": "start",
|
98
|
+
"mainAxisAlignment": "start",
|
99
|
+
"mainAxisSize": "min"
|
100
|
+
},
|
101
|
+
"children": [
|
102
|
+
{
|
103
|
+
"type": "text",
|
104
|
+
"args": {
|
105
|
+
"text": "For Each ("
|
106
|
+
}
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"type": "text",
|
110
|
+
"args": {
|
111
|
+
"text": "${length(entries['values'])}"
|
112
|
+
}
|
113
|
+
},
|
114
|
+
{
|
115
|
+
"type": "text",
|
116
|
+
"args": {
|
117
|
+
"text": ")"
|
118
|
+
}
|
119
|
+
}
|
120
|
+
]
|
121
|
+
}
|
122
|
+
}
|
123
|
+
},
|
124
|
+
"body": {
|
125
|
+
"type": "list_view",
|
126
|
+
"children": "${for_each(entries['values'], 'template')}"
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
130
|
+
}
|
@@ -0,0 +1,276 @@
|
|
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
|
+
"type": "flexible",
|
85
|
+
"child": {
|
86
|
+
"type": "semantics",
|
87
|
+
"args": {
|
88
|
+
"sortKey": {
|
89
|
+
"order": 0.0,
|
90
|
+
"textField": true
|
91
|
+
}
|
92
|
+
},
|
93
|
+
"child": {
|
94
|
+
"type": "exclude_semantics",
|
95
|
+
"child": {
|
96
|
+
"type": "text_form_field",
|
97
|
+
"id": "first_name",
|
98
|
+
"args": {
|
99
|
+
"decoration": {
|
100
|
+
"hintText": "John",
|
101
|
+
"labelText": "First Name",
|
102
|
+
"suffixIcon": {
|
103
|
+
"type": "icon_button",
|
104
|
+
"args": {
|
105
|
+
"icon": {
|
106
|
+
"type": "icon",
|
107
|
+
"args": {
|
108
|
+
"icon": {
|
109
|
+
"codePoint": 57704,
|
110
|
+
"fontFamily": "MaterialIcons",
|
111
|
+
"size": 50
|
112
|
+
}
|
113
|
+
}
|
114
|
+
},
|
115
|
+
"onPressed": "${set_value('first_name','')}"
|
116
|
+
}
|
117
|
+
}
|
118
|
+
},
|
119
|
+
"validators": [
|
120
|
+
{
|
121
|
+
"type": "required"
|
122
|
+
}
|
123
|
+
]
|
124
|
+
}
|
125
|
+
}
|
126
|
+
}
|
127
|
+
}
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"type": "sized_box",
|
131
|
+
"args": {
|
132
|
+
"width": 16
|
133
|
+
}
|
134
|
+
},
|
135
|
+
{
|
136
|
+
"type": "flexible",
|
137
|
+
"child": {
|
138
|
+
"type": "merge_semantics",
|
139
|
+
"child": {
|
140
|
+
"type": "text_form_field",
|
141
|
+
"id": "last_name",
|
142
|
+
"args": {
|
143
|
+
"decoration": {
|
144
|
+
"hintText": "Doe",
|
145
|
+
"labelText": "Last Name",
|
146
|
+
"suffixIcon": {
|
147
|
+
"type": "icon_button",
|
148
|
+
"args": {
|
149
|
+
"icon": {
|
150
|
+
"type": "icon",
|
151
|
+
"args": {
|
152
|
+
"icon": {
|
153
|
+
"codePoint": 57704,
|
154
|
+
"fontFamily": "MaterialIcons",
|
155
|
+
"size": 50
|
156
|
+
}
|
157
|
+
}
|
158
|
+
},
|
159
|
+
"onPressed": "${set_value('last_name','')}"
|
160
|
+
}
|
161
|
+
}
|
162
|
+
},
|
163
|
+
"validators": [
|
164
|
+
{
|
165
|
+
"type": "required"
|
166
|
+
}
|
167
|
+
]
|
168
|
+
}
|
169
|
+
}
|
170
|
+
}
|
171
|
+
}
|
172
|
+
]
|
173
|
+
},
|
174
|
+
{
|
175
|
+
"type": "sized_box",
|
176
|
+
"args": {
|
177
|
+
"height": 16
|
178
|
+
}
|
179
|
+
},
|
180
|
+
{
|
181
|
+
"type": "text_form_field",
|
182
|
+
"id": "email_address",
|
183
|
+
"args": {
|
184
|
+
"decoration": {
|
185
|
+
"hintText": "name@example.com",
|
186
|
+
"labelText": "Email Address",
|
187
|
+
"suffixIcon": {
|
188
|
+
"type": "icon_button",
|
189
|
+
"args": {
|
190
|
+
"icon": {
|
191
|
+
"type": "icon",
|
192
|
+
"args": {
|
193
|
+
"icon": {
|
194
|
+
"codePoint": 57704,
|
195
|
+
"fontFamily": "MaterialIcons",
|
196
|
+
"size": 50
|
197
|
+
}
|
198
|
+
}
|
199
|
+
},
|
200
|
+
"onPressed": "${set_value('email_address','')}"
|
201
|
+
}
|
202
|
+
}
|
203
|
+
},
|
204
|
+
"validators": [
|
205
|
+
{
|
206
|
+
"type": "required"
|
207
|
+
},
|
208
|
+
{
|
209
|
+
"type": "email"
|
210
|
+
}
|
211
|
+
]
|
212
|
+
}
|
213
|
+
},
|
214
|
+
{
|
215
|
+
"type": "sized_box",
|
216
|
+
"args": {
|
217
|
+
"height": 16
|
218
|
+
}
|
219
|
+
},
|
220
|
+
{
|
221
|
+
"type": "dropdown_button_form_field",
|
222
|
+
"id": "email_type",
|
223
|
+
"args": {
|
224
|
+
"decoration": {
|
225
|
+
"labelText": "Email Type"
|
226
|
+
},
|
227
|
+
"items": [
|
228
|
+
"Home",
|
229
|
+
"Other",
|
230
|
+
"Work"
|
231
|
+
],
|
232
|
+
"validators": [
|
233
|
+
{
|
234
|
+
"type": "required"
|
235
|
+
}
|
236
|
+
]
|
237
|
+
}
|
238
|
+
}
|
239
|
+
]
|
240
|
+
}
|
241
|
+
},
|
242
|
+
{
|
243
|
+
"type": "elevated_button",
|
244
|
+
"id": "submit_button",
|
245
|
+
"args": {
|
246
|
+
"onPressed": "${validateForm('form_context')}"
|
247
|
+
},
|
248
|
+
"child": {
|
249
|
+
"type": "container",
|
250
|
+
"args": {
|
251
|
+
"alignment": "center",
|
252
|
+
"width": "infinity"
|
253
|
+
},
|
254
|
+
"child": {
|
255
|
+
"type": "save_context",
|
256
|
+
"args": {
|
257
|
+
"key": "form_context"
|
258
|
+
},
|
259
|
+
"child": {
|
260
|
+
"type": "text",
|
261
|
+
"args": {
|
262
|
+
"text": "Submit"
|
263
|
+
}
|
264
|
+
}
|
265
|
+
}
|
266
|
+
}
|
267
|
+
}
|
268
|
+
]
|
269
|
+
}
|
270
|
+
}
|
271
|
+
}
|
272
|
+
}
|
273
|
+
}
|
274
|
+
}
|
275
|
+
}
|
276
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
{
|
2
|
+
"type": "scaffold",
|
3
|
+
"args": {
|
4
|
+
"appBar": {
|
5
|
+
"type": "app_bar",
|
6
|
+
"args": {
|
7
|
+
"title": {
|
8
|
+
"type": "text",
|
9
|
+
"args": {
|
10
|
+
"text": "FractionalTranslation"
|
11
|
+
}
|
12
|
+
}
|
13
|
+
}
|
14
|
+
},
|
15
|
+
"body": {
|
16
|
+
"type": "fractional_translation",
|
17
|
+
"args": {
|
18
|
+
"translation": {
|
19
|
+
"dx": 0.1,
|
20
|
+
"dy": 0.1
|
21
|
+
}
|
22
|
+
},
|
23
|
+
"child": {
|
24
|
+
"type": "text",
|
25
|
+
"args": {
|
26
|
+
"text": "Fractional Translation Demo"
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
{
|
2
|
+
"type": "scaffold",
|
3
|
+
"args": {
|
4
|
+
"appBar": {
|
5
|
+
"type": "app_bar",
|
6
|
+
"args": {
|
7
|
+
"title": {
|
8
|
+
"type": "text",
|
9
|
+
"args": {
|
10
|
+
"text": "FractionallySizedBox"
|
11
|
+
}
|
12
|
+
}
|
13
|
+
}
|
14
|
+
},
|
15
|
+
"body": {
|
16
|
+
"type": "container",
|
17
|
+
"args": {
|
18
|
+
"alignment": "center"
|
19
|
+
},
|
20
|
+
"child": {
|
21
|
+
"type": "fractionally_sized_box",
|
22
|
+
"args": {
|
23
|
+
"widthFactor": 0.7
|
24
|
+
},
|
25
|
+
"child": {
|
26
|
+
"type": "text",
|
27
|
+
"args": {
|
28
|
+
"text": "Fractional Sized Box Demo"
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
{
|
2
|
+
"type": "scaffold",
|
3
|
+
"args": {
|
4
|
+
"appBar": {
|
5
|
+
"type": "app_bar",
|
6
|
+
"args": {
|
7
|
+
"title": {
|
8
|
+
"type": "text",
|
9
|
+
"args": {
|
10
|
+
"text": "Gestures"
|
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": "checkbox",
|
29
|
+
"args": {
|
30
|
+
"label": "Ignore Gestures",
|
31
|
+
"value": false
|
32
|
+
},
|
33
|
+
"id": "ignore"
|
34
|
+
}, {
|
35
|
+
"type": "text",
|
36
|
+
"args": {
|
37
|
+
"text": "Ignore taps"
|
38
|
+
}
|
39
|
+
}]
|
40
|
+
}, {
|
41
|
+
"type": "sized_box",
|
42
|
+
"args": {
|
43
|
+
"height": "16"
|
44
|
+
}
|
45
|
+
}, {
|
46
|
+
"type": "ignore_pointer",
|
47
|
+
"args": {
|
48
|
+
"ignoring": "${ignore}"
|
49
|
+
},
|
50
|
+
"child": {
|
51
|
+
"type": "gesture_detector",
|
52
|
+
"args": {
|
53
|
+
"onDoubleTap": "${set_value('gesture', 'double_tap')}",
|
54
|
+
"onTap": "${set_value('gesture', 'tap')}"
|
55
|
+
},
|
56
|
+
"child": {
|
57
|
+
"type": "padding",
|
58
|
+
"args": {
|
59
|
+
"padding": 20
|
60
|
+
},
|
61
|
+
"child": {
|
62
|
+
"type": "text",
|
63
|
+
"args": {
|
64
|
+
"text": "Tap Me!"
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}, {
|
70
|
+
"type": "sized_box",
|
71
|
+
"args": {
|
72
|
+
"height": "16"
|
73
|
+
}
|
74
|
+
}, {
|
75
|
+
"type": "text",
|
76
|
+
"args": {
|
77
|
+
"text": "${gesture}"
|
78
|
+
}
|
79
|
+
}]
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|