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,197 @@
|
|
1
|
+
{
|
2
|
+
"type": "scaffold",
|
3
|
+
"args": {
|
4
|
+
"appBar": {
|
5
|
+
"type": "app_bar",
|
6
|
+
"args": {
|
7
|
+
"title": {
|
8
|
+
"type": "text",
|
9
|
+
"args": {
|
10
|
+
"text": "Conditional"
|
11
|
+
}
|
12
|
+
}
|
13
|
+
}
|
14
|
+
},
|
15
|
+
"body": {
|
16
|
+
"type": "safe_area",
|
17
|
+
"child": {
|
18
|
+
"type": "padding",
|
19
|
+
"args": {
|
20
|
+
"padding": 16
|
21
|
+
},
|
22
|
+
"child": {
|
23
|
+
"type": "column",
|
24
|
+
"args": {
|
25
|
+
"mainAxisSize": "max"
|
26
|
+
},
|
27
|
+
"children": [
|
28
|
+
{
|
29
|
+
"type": "row",
|
30
|
+
"args": {
|
31
|
+
"mainAxisAlignment": "spaceEvenly"
|
32
|
+
},
|
33
|
+
"children": [
|
34
|
+
{
|
35
|
+
"type": "elevated_button",
|
36
|
+
"id": "button1",
|
37
|
+
"args": {
|
38
|
+
"onPressed": "${set_value('button', 1)}"
|
39
|
+
},
|
40
|
+
"child": {
|
41
|
+
"type": "text",
|
42
|
+
"args": {
|
43
|
+
"text": "One"
|
44
|
+
}
|
45
|
+
}
|
46
|
+
},
|
47
|
+
{
|
48
|
+
"type": "elevated_button",
|
49
|
+
"id": "button2",
|
50
|
+
"args": {
|
51
|
+
"onPressed": "${set_value('button', 2)}"
|
52
|
+
},
|
53
|
+
"child": {
|
54
|
+
"type": "text",
|
55
|
+
"args": {
|
56
|
+
"text": "Two"
|
57
|
+
}
|
58
|
+
}
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"type": "elevated_button",
|
62
|
+
"id": "button3",
|
63
|
+
"args": {
|
64
|
+
"onPressed": "${set_value('button', 3)}"
|
65
|
+
},
|
66
|
+
"child": {
|
67
|
+
"type": "text",
|
68
|
+
"args": {
|
69
|
+
"text": "Three"
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
]
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"type": "row",
|
77
|
+
"args": {
|
78
|
+
"mainAxisAlignment": "spaceEvenly"
|
79
|
+
},
|
80
|
+
"children": [
|
81
|
+
{
|
82
|
+
"type": "elevated_button",
|
83
|
+
"args": {
|
84
|
+
"onPressed": "${set_value('button', 4)}"
|
85
|
+
},
|
86
|
+
"child": {
|
87
|
+
"type": "text",
|
88
|
+
"args": {
|
89
|
+
"text": "Four"
|
90
|
+
}
|
91
|
+
}
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"type": "elevated_button",
|
95
|
+
"args": {
|
96
|
+
"onPressed": "${set_value('button', 5)}"
|
97
|
+
},
|
98
|
+
"child": {
|
99
|
+
"type": "text",
|
100
|
+
"args": {
|
101
|
+
"text": "Five"
|
102
|
+
}
|
103
|
+
}
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"type": "elevated_button",
|
107
|
+
"args": {
|
108
|
+
"onPressed": "${set_value('button', 6)}"
|
109
|
+
},
|
110
|
+
"child": {
|
111
|
+
"type": "text",
|
112
|
+
"args": {
|
113
|
+
"text": "Six"
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
117
|
+
]
|
118
|
+
},
|
119
|
+
{
|
120
|
+
"type": "expanded",
|
121
|
+
"child": {
|
122
|
+
"type": "center",
|
123
|
+
"child": {
|
124
|
+
"type": "column",
|
125
|
+
"args": {
|
126
|
+
"mainAxisSize": "min"
|
127
|
+
},
|
128
|
+
"children": [
|
129
|
+
{
|
130
|
+
"type": "text",
|
131
|
+
"args": {
|
132
|
+
"text": "${button}"
|
133
|
+
}
|
134
|
+
},
|
135
|
+
{
|
136
|
+
"type": "stack",
|
137
|
+
"children": [
|
138
|
+
{
|
139
|
+
"type": "conditional",
|
140
|
+
"args": {
|
141
|
+
"conditional": {
|
142
|
+
"values": {
|
143
|
+
"button": "1"
|
144
|
+
}
|
145
|
+
}
|
146
|
+
},
|
147
|
+
"child": {
|
148
|
+
"type": "text",
|
149
|
+
"args": {
|
150
|
+
"text": "You hit the button One"
|
151
|
+
}
|
152
|
+
}
|
153
|
+
},
|
154
|
+
{
|
155
|
+
"type": "conditional",
|
156
|
+
"args": {
|
157
|
+
"conditional": {
|
158
|
+
"values": {
|
159
|
+
"button": "2"
|
160
|
+
}
|
161
|
+
}
|
162
|
+
},
|
163
|
+
"child": {
|
164
|
+
"type": "text",
|
165
|
+
"args": {
|
166
|
+
"text": "You hit the button Two"
|
167
|
+
}
|
168
|
+
}
|
169
|
+
},
|
170
|
+
{
|
171
|
+
"type": "conditional",
|
172
|
+
"args": {
|
173
|
+
"conditional": {
|
174
|
+
"values": {
|
175
|
+
"button": "3"
|
176
|
+
}
|
177
|
+
}
|
178
|
+
},
|
179
|
+
"child": {
|
180
|
+
"type": "text",
|
181
|
+
"args": {
|
182
|
+
"text": "You hit the button Three"
|
183
|
+
}
|
184
|
+
}
|
185
|
+
}
|
186
|
+
]
|
187
|
+
}
|
188
|
+
]
|
189
|
+
}
|
190
|
+
}
|
191
|
+
}
|
192
|
+
]
|
193
|
+
}
|
194
|
+
}
|
195
|
+
}
|
196
|
+
}
|
197
|
+
}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
type: scaffold
|
2
|
+
args:
|
3
|
+
appBar:
|
4
|
+
type: app_bar
|
5
|
+
args:
|
6
|
+
title:
|
7
|
+
type: text
|
8
|
+
args:
|
9
|
+
text: CupertinoSwitch
|
10
|
+
body:
|
11
|
+
type: center
|
12
|
+
child:
|
13
|
+
type: column
|
14
|
+
args:
|
15
|
+
mainAxisSize: min
|
16
|
+
children:
|
17
|
+
- type: row
|
18
|
+
args:
|
19
|
+
mainAxisSize: min
|
20
|
+
children:
|
21
|
+
- type: cupertino_switch
|
22
|
+
args:
|
23
|
+
label: Checked
|
24
|
+
value: true
|
25
|
+
- type: text
|
26
|
+
args:
|
27
|
+
text: Checked
|
28
|
+
|
29
|
+
- type: row
|
30
|
+
args:
|
31
|
+
mainAxisSize: min
|
32
|
+
children:
|
33
|
+
- type: cupertino_switch
|
34
|
+
args:
|
35
|
+
label: Not Checked
|
36
|
+
value: false
|
37
|
+
- type: text
|
38
|
+
args:
|
39
|
+
text: Not Checked
|
40
|
+
|
41
|
+
- type: row
|
42
|
+
args:
|
43
|
+
mainAxisSize: min
|
44
|
+
children:
|
45
|
+
- type: cupertino_switch
|
46
|
+
args:
|
47
|
+
enabled: false
|
48
|
+
label: Disabled
|
49
|
+
- type: text
|
50
|
+
args:
|
51
|
+
text: Disabled
|
52
|
+
|
53
|
+
- type: column
|
54
|
+
args:
|
55
|
+
mainAxisSize: min
|
56
|
+
children:
|
57
|
+
- type: cupertino_switch
|
58
|
+
id: example_switch
|
59
|
+
- type: conditional
|
60
|
+
args:
|
61
|
+
conditional:
|
62
|
+
values:
|
63
|
+
example_switch: true
|
64
|
+
onFalse:
|
65
|
+
type: text
|
66
|
+
args:
|
67
|
+
text: Not Checked
|
68
|
+
|
69
|
+
child:
|
70
|
+
type: text
|
71
|
+
args:
|
72
|
+
text: Checked!
|
@@ -0,0 +1,38 @@
|
|
1
|
+
{
|
2
|
+
"type": "scaffold",
|
3
|
+
"args": {
|
4
|
+
"appBar": {
|
5
|
+
"type": "app_bar",
|
6
|
+
"args": {
|
7
|
+
"title": {
|
8
|
+
"type": "text",
|
9
|
+
"args": {
|
10
|
+
"text": "DecoratedBox"
|
11
|
+
}
|
12
|
+
}
|
13
|
+
}
|
14
|
+
},
|
15
|
+
"body": {
|
16
|
+
"type": "center",
|
17
|
+
"child": {
|
18
|
+
"type": "decorated_box",
|
19
|
+
"args": {
|
20
|
+
"decoration": {
|
21
|
+
"border": {
|
22
|
+
"color": "#6d78b6",
|
23
|
+
"width": 1
|
24
|
+
},
|
25
|
+
"shape": "rectangle"
|
26
|
+
},
|
27
|
+
"position": "foreground"
|
28
|
+
},
|
29
|
+
"child": {
|
30
|
+
"type": "text",
|
31
|
+
"args": {
|
32
|
+
"text": "This is a random widget"
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
@@ -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": "Directionality"
|
11
|
+
}
|
12
|
+
}
|
13
|
+
}
|
14
|
+
},
|
15
|
+
"body": {
|
16
|
+
"type": "center",
|
17
|
+
"child": {
|
18
|
+
"type": "directionality",
|
19
|
+
"args": {
|
20
|
+
"textDirection": "rtl"
|
21
|
+
},
|
22
|
+
"child": {
|
23
|
+
"type": "text",
|
24
|
+
"args": {
|
25
|
+
"text": "This is\na random widget."
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,299 @@
|
|
1
|
+
{
|
2
|
+
"type": "scaffold",
|
3
|
+
"args": {
|
4
|
+
"appBar": {
|
5
|
+
"type": "app_bar",
|
6
|
+
"args": {
|
7
|
+
"title": {
|
8
|
+
"type": "text",
|
9
|
+
"args": {
|
10
|
+
"text": "Dynamic"
|
11
|
+
}
|
12
|
+
}
|
13
|
+
}
|
14
|
+
},
|
15
|
+
"resizeToAvoidBottomInset": true,
|
16
|
+
"body": {
|
17
|
+
"type": "column",
|
18
|
+
"args": {
|
19
|
+
"mainAxisSize": "max"
|
20
|
+
},
|
21
|
+
"children": [
|
22
|
+
{
|
23
|
+
"type": "expanded",
|
24
|
+
"id": "messages",
|
25
|
+
"child": {
|
26
|
+
"type": "save_context",
|
27
|
+
"args": {
|
28
|
+
"key": "dialogContext"
|
29
|
+
},
|
30
|
+
"child": {
|
31
|
+
"type": "dynamic",
|
32
|
+
"id": "items",
|
33
|
+
"args": {
|
34
|
+
"dynamic": {
|
35
|
+
"builderType": "list_view",
|
36
|
+
"childTemplate": {
|
37
|
+
"type": "set_value",
|
38
|
+
"args": {
|
39
|
+
"editDialogData{id}": {
|
40
|
+
"actions": [
|
41
|
+
{
|
42
|
+
"title": {
|
43
|
+
"type": "text",
|
44
|
+
"args": {
|
45
|
+
"text": "Submit"
|
46
|
+
}
|
47
|
+
},
|
48
|
+
"onPressed": "${dynamic('edit{id}Element')}"
|
49
|
+
}
|
50
|
+
],
|
51
|
+
"title": {
|
52
|
+
"type": "text",
|
53
|
+
"args": {
|
54
|
+
"text": "Edit"
|
55
|
+
}
|
56
|
+
},
|
57
|
+
"content": {
|
58
|
+
"type": "form",
|
59
|
+
"child": {
|
60
|
+
"type": "single_child_scroll_view",
|
61
|
+
"args": {
|
62
|
+
"padding": [
|
63
|
+
16,
|
64
|
+
0
|
65
|
+
]
|
66
|
+
},
|
67
|
+
"child": {
|
68
|
+
"type": "container",
|
69
|
+
"args": {
|
70
|
+
"alignment": "topCenter",
|
71
|
+
"width": "infinity"
|
72
|
+
},
|
73
|
+
"child": {
|
74
|
+
"type": "text_form_field",
|
75
|
+
"id": "edit_message_{id}",
|
76
|
+
"args": {
|
77
|
+
"initialValue": "{message}",
|
78
|
+
"decoration": {
|
79
|
+
"hintText": "Write a message"
|
80
|
+
},
|
81
|
+
"validators": [
|
82
|
+
{
|
83
|
+
"type": "required"
|
84
|
+
}
|
85
|
+
]
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
},
|
92
|
+
"remove{id}Element": {
|
93
|
+
"type": "remove",
|
94
|
+
"builder": "items",
|
95
|
+
"target": {
|
96
|
+
"id": "{id}"
|
97
|
+
}
|
98
|
+
},
|
99
|
+
"edit{id}Element": {
|
100
|
+
"type": "edit",
|
101
|
+
"builder": "items",
|
102
|
+
"target": {
|
103
|
+
"id": "{id}"
|
104
|
+
},
|
105
|
+
"values": {
|
106
|
+
"message": "${edit_message_{id}}"
|
107
|
+
}
|
108
|
+
}
|
109
|
+
},
|
110
|
+
"child": {
|
111
|
+
"id": "{id}",
|
112
|
+
"type": "list_tile",
|
113
|
+
"args": {
|
114
|
+
"trailing": {
|
115
|
+
"type": "icon_button",
|
116
|
+
"args": {
|
117
|
+
"icon": {
|
118
|
+
"type": "icon",
|
119
|
+
"args": {
|
120
|
+
"icon": {
|
121
|
+
"codePoint": 61912,
|
122
|
+
"fontFamily": "MaterialIcons",
|
123
|
+
"size": 50
|
124
|
+
}
|
125
|
+
}
|
126
|
+
},
|
127
|
+
"onPressed": "${show_dialog('dialogContext', 'editDialogData{id}')}"
|
128
|
+
}
|
129
|
+
},
|
130
|
+
"onLongPress": "${dynamic('remove{id}Element')}",
|
131
|
+
"title": {
|
132
|
+
"type": "text",
|
133
|
+
"args": {
|
134
|
+
"text": "{message}"
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}
|
138
|
+
}
|
139
|
+
},
|
140
|
+
"initState": [
|
141
|
+
{
|
142
|
+
"id": "1",
|
143
|
+
"message": "First"
|
144
|
+
},
|
145
|
+
{
|
146
|
+
"id": "2",
|
147
|
+
"message": "Second"
|
148
|
+
}
|
149
|
+
]
|
150
|
+
}
|
151
|
+
}
|
152
|
+
}
|
153
|
+
}
|
154
|
+
},
|
155
|
+
{
|
156
|
+
"type": "form",
|
157
|
+
"child": {
|
158
|
+
"type": "single_child_scroll_view",
|
159
|
+
"args": {
|
160
|
+
"padding": [
|
161
|
+
16,
|
162
|
+
0
|
163
|
+
]
|
164
|
+
},
|
165
|
+
"child": {
|
166
|
+
"type": "container",
|
167
|
+
"args": {
|
168
|
+
"alignment": "topCenter",
|
169
|
+
"width": "infinity"
|
170
|
+
},
|
171
|
+
"child": {
|
172
|
+
"type": "container",
|
173
|
+
"args": {
|
174
|
+
"constraints": {
|
175
|
+
"maxWidth": 450
|
176
|
+
}
|
177
|
+
},
|
178
|
+
"child": {
|
179
|
+
"type": "column",
|
180
|
+
"args": {
|
181
|
+
"mainAxisSize": "min"
|
182
|
+
},
|
183
|
+
"children": [
|
184
|
+
{
|
185
|
+
"type": "sized_box",
|
186
|
+
"args": {
|
187
|
+
"height": 16
|
188
|
+
}
|
189
|
+
},
|
190
|
+
{
|
191
|
+
"type": "sized_box",
|
192
|
+
"args": {
|
193
|
+
"height": 8
|
194
|
+
}
|
195
|
+
},
|
196
|
+
{
|
197
|
+
"type": "material",
|
198
|
+
"args": {
|
199
|
+
"borderRadius": 16,
|
200
|
+
"color": "#fff",
|
201
|
+
"elevation": 4,
|
202
|
+
"margin": [
|
203
|
+
0,
|
204
|
+
8
|
205
|
+
],
|
206
|
+
"padding": 16
|
207
|
+
},
|
208
|
+
"child": {
|
209
|
+
"type": "column",
|
210
|
+
"args": {
|
211
|
+
"mainAxisSize": "min"
|
212
|
+
},
|
213
|
+
"children": [
|
214
|
+
{
|
215
|
+
"type": "row",
|
216
|
+
"children": [
|
217
|
+
{
|
218
|
+
"type": "flexible",
|
219
|
+
"child": {
|
220
|
+
"type": "text_form_field",
|
221
|
+
"id": "form_message",
|
222
|
+
"args": {
|
223
|
+
"decoration": {
|
224
|
+
"hintText": "Write a message",
|
225
|
+
"labelText": "Message",
|
226
|
+
"suffixIcon": {
|
227
|
+
"type": "icon_button",
|
228
|
+
"args": {
|
229
|
+
"icon": {
|
230
|
+
"type": "icon",
|
231
|
+
"args": {
|
232
|
+
"icon": {
|
233
|
+
"codePoint": 57704,
|
234
|
+
"fontFamily": "MaterialIcons",
|
235
|
+
"size": 50
|
236
|
+
}
|
237
|
+
}
|
238
|
+
},
|
239
|
+
"onPressed": "${set_value('form_message','')}"
|
240
|
+
}
|
241
|
+
}
|
242
|
+
},
|
243
|
+
"validators": [
|
244
|
+
{
|
245
|
+
"type": "required"
|
246
|
+
}
|
247
|
+
]
|
248
|
+
}
|
249
|
+
}
|
250
|
+
}
|
251
|
+
]
|
252
|
+
}
|
253
|
+
]
|
254
|
+
}
|
255
|
+
},
|
256
|
+
{
|
257
|
+
"type": "set_value",
|
258
|
+
"args": {
|
259
|
+
"dynamicItemsAdd": {
|
260
|
+
"type": "add",
|
261
|
+
"builder": "items",
|
262
|
+
"target": {
|
263
|
+
"index": 0
|
264
|
+
},
|
265
|
+
"values": {
|
266
|
+
"message": "${form_message}"
|
267
|
+
}
|
268
|
+
}
|
269
|
+
},
|
270
|
+
"child": {
|
271
|
+
"type": "elevated_button",
|
272
|
+
"args": {
|
273
|
+
"onPressed": "${dynamic('dynamicItemsAdd')}"
|
274
|
+
},
|
275
|
+
"child": {
|
276
|
+
"type": "container",
|
277
|
+
"args": {
|
278
|
+
"alignment": "center",
|
279
|
+
"width": "infinity"
|
280
|
+
},
|
281
|
+
"child": {
|
282
|
+
"type": "text",
|
283
|
+
"args": {
|
284
|
+
"text": "Add message"
|
285
|
+
}
|
286
|
+
}
|
287
|
+
}
|
288
|
+
}
|
289
|
+
}
|
290
|
+
]
|
291
|
+
}
|
292
|
+
}
|
293
|
+
}
|
294
|
+
}
|
295
|
+
}
|
296
|
+
]
|
297
|
+
}
|
298
|
+
}
|
299
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
{
|
2
|
+
"_designCredit": "https://androidmonks.com/fittedbox-widget/",
|
3
|
+
"type": "scaffold",
|
4
|
+
"args": {
|
5
|
+
"appBar": {
|
6
|
+
"type": "app_bar",
|
7
|
+
"args": {
|
8
|
+
"title": {
|
9
|
+
"type": "text",
|
10
|
+
"args": {
|
11
|
+
"text": "FittedBox"
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}
|
15
|
+
},
|
16
|
+
"backgroundColor": "#e0e0e0",
|
17
|
+
"body": {
|
18
|
+
"type": "list_view",
|
19
|
+
"children": [{
|
20
|
+
"type": "fitted_box",
|
21
|
+
"child": {
|
22
|
+
"type": "row",
|
23
|
+
"children": [{
|
24
|
+
"type": "container",
|
25
|
+
"child": {
|
26
|
+
"type": "network_image",
|
27
|
+
"args": {
|
28
|
+
"src": "https://images.pexels.com/photos/414612/pexels-photo-414612.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}, {
|
32
|
+
"type": "text",
|
33
|
+
"args": {
|
34
|
+
"text": "This is a sample text to understand FittedBox widget"
|
35
|
+
}
|
36
|
+
}]
|
37
|
+
}
|
38
|
+
}]
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|