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,50 @@
1
+ {
2
+ "type": "scaffold",
3
+ "args": {
4
+ "appBar": {
5
+ "type": "app_bar",
6
+ "args": {
7
+ "title": {
8
+ "type": "text",
9
+ "args": {
10
+ "text": "AnimatedAlign"
11
+ }
12
+ }
13
+ }
14
+ },
15
+ "body": {
16
+ "type": "set_value",
17
+ "args": {
18
+ "customAlign": "topLeft"
19
+ },
20
+ "child": {
21
+ "type": "animated_align",
22
+ "args": {
23
+ "alignment": "${customAlign}",
24
+ "duration": 1000
25
+ },
26
+ "child": {
27
+ "type": "container",
28
+ "args": {
29
+ "color": "#FF0000",
30
+ "height": 20,
31
+ "width": 20
32
+ }
33
+ }
34
+ }
35
+ },
36
+ "floatingActionButton": {
37
+ "type": "elevated_button",
38
+ "id": "press_me_button",
39
+ "args": {
40
+ "onPressed": "${set_value('customAlign', 'topCenter')}"
41
+ },
42
+ "child": {
43
+ "type": "text",
44
+ "args": {
45
+ "text": "Press Me!"
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "type": "scaffold",
3
+ "args": {
4
+ "appBar": {
5
+ "type": "app_bar",
6
+ "args": {
7
+ "title": {
8
+ "type": "text",
9
+ "args": {
10
+ "text": "AnimatedContainer"
11
+ }
12
+ }
13
+ }
14
+ },
15
+ "body": {
16
+ "type": "set_value",
17
+ "args": {
18
+ "customAlign": "topLeft"
19
+ },
20
+ "child": {
21
+ "type": "center",
22
+ "child": {
23
+ "type": "animated_container",
24
+ "args": {
25
+ "alignment": "${customAlign}",
26
+ "color": "#0000FF",
27
+ "duration": 1000,
28
+ "height": 100,
29
+ "width": 100
30
+ },
31
+ "child": {
32
+ "type": "container",
33
+ "args": {
34
+ "color": "#FFF",
35
+ "height": 20,
36
+ "width": 20
37
+ }
38
+ }
39
+ }
40
+ }
41
+ },
42
+ "floatingActionButton": {
43
+ "type": "elevated_button",
44
+ "id": "press_me_button",
45
+ "args": {
46
+ "onPressed": "${set_value('customAlign', 'center')}"
47
+ },
48
+ "child": {
49
+ "type": "text",
50
+ "args": {
51
+ "text": "Press Me!"
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "type": "scaffold",
3
+ "args": {
4
+ "appBar": {
5
+ "type": "app_bar",
6
+ "args": {
7
+ "title": {
8
+ "type": "text",
9
+ "args": {
10
+ "text": "AnimatedCrossFade"
11
+ }
12
+ }
13
+ }
14
+ },
15
+ "body": {
16
+ "type": "set_value",
17
+ "args": {
18
+ "customCrossFadeState": "showFirst"
19
+ },
20
+ "child": {
21
+ "type": "center",
22
+ "child": {
23
+ "type": "animated_cross_fade",
24
+ "args": {
25
+ "crossFadeState": "${customCrossFadeState}",
26
+ "duration": 1000
27
+ },
28
+ "children": [
29
+ {
30
+ "type": "container",
31
+ "args": {
32
+ "color": "#FF0000",
33
+ "height": 100,
34
+ "width": 100
35
+ }
36
+ },
37
+ {
38
+ "type": "container",
39
+ "args": {
40
+ "color": "#FFF000",
41
+ "height": 100,
42
+ "width": 100
43
+ }
44
+ }
45
+ ]
46
+ }
47
+ }
48
+ },
49
+ "floatingActionButton": {
50
+ "type": "elevated_button",
51
+ "id": "press_me_button",
52
+ "args": {
53
+ "onPressed": "${set_value('customCrossFadeState', 'showSecond')}"
54
+ },
55
+ "child": {
56
+ "type": "text",
57
+ "args": {
58
+ "text": "Press Me!"
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "type": "scaffold",
3
+ "args": {
4
+ "appBar": {
5
+ "type": "app_bar",
6
+ "args": {
7
+ "title": {
8
+ "type": "text",
9
+ "args": {
10
+ "text": "AnimatedDefaultTextStyle"
11
+ }
12
+ }
13
+ }
14
+ },
15
+ "body": {
16
+ "type": "set_value",
17
+ "args": {
18
+ "customTextStyle": {
19
+ "color": "#FF0000"
20
+ }
21
+ },
22
+ "child": {
23
+ "type": "center",
24
+ "child": {
25
+ "type": "animated_default_text_style",
26
+ "args": {
27
+ "duration": 1500,
28
+ "style": "${customTextStyle}"
29
+ },
30
+ "child": {
31
+ "type": "text",
32
+ "args": {
33
+ "text": "Random text"
34
+ }
35
+ }
36
+ }
37
+ }
38
+ },
39
+ "floatingActionButton": {
40
+ "type": "elevated_button",
41
+ "id": "press_me_button",
42
+ "args": {
43
+ "onPressed": "${updateCustomTextStyle()}"
44
+ },
45
+ "child": {
46
+ "type": "text",
47
+ "args": {
48
+ "text": "Press Me!"
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "type": "scaffold",
3
+ "args": {
4
+ "appBar": {
5
+ "type": "app_bar",
6
+ "args": {
7
+ "title": {
8
+ "type": "text",
9
+ "args": {
10
+ "text": "AnimatedOpacity"
11
+ }
12
+ }
13
+ }
14
+ },
15
+ "body": {
16
+ "type": "set_value",
17
+ "args": {
18
+ "customOpacity": 1
19
+ },
20
+ "child": {
21
+ "type": "animated_opacity",
22
+ "args": {
23
+ "curve": "${slow_middle_curve}",
24
+ "duration": 1000,
25
+ "opacity": "${customOpacity}"
26
+ },
27
+ "child": {
28
+ "type": "container",
29
+ "args": {
30
+ "color": "#FF0000"
31
+ }
32
+ }
33
+ }
34
+ },
35
+ "floatingActionButton": {
36
+ "type": "elevated_button",
37
+ "id": "press_me_button",
38
+ "args": {
39
+ "onPressed": "${set_value('customOpacity', 0)}"
40
+ },
41
+ "child": {
42
+ "type": "text",
43
+ "args": {
44
+ "text": "Press Me!"
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "type": "scaffold",
3
+ "args": {
4
+ "appBar": {
5
+ "type": "app_bar",
6
+ "args": {
7
+ "title": {
8
+ "type": "text",
9
+ "args": {
10
+ "text": "AnimatedPadding"
11
+ }
12
+ }
13
+ }
14
+ },
15
+ "body": {
16
+ "type": "set_value",
17
+ "args": {
18
+ "customPadding": 1
19
+ },
20
+ "child": {
21
+ "type": "animated_padding",
22
+ "args": {
23
+ "duration": 1000,
24
+ "padding": "${customPadding}"
25
+ },
26
+ "child": {
27
+ "type": "container",
28
+ "args": {
29
+ "color": "#FF0000",
30
+ "height": 20,
31
+ "width": 20
32
+ }
33
+ }
34
+ }
35
+ },
36
+ "floatingActionButton": {
37
+ "type": "elevated_button",
38
+ "id": "press_me_button",
39
+ "args": {
40
+ "onPressed": "${set_value('customPadding', 100)}"
41
+ },
42
+ "child": {
43
+ "type": "text",
44
+ "args": {
45
+ "text": "Press Me!"
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "type": "scaffold",
3
+ "args": {
4
+ "appBar": {
5
+ "type": "app_bar",
6
+ "args": {
7
+ "title": {
8
+ "type": "text",
9
+ "args": {
10
+ "text": "AnimatedPhysicalModel"
11
+ }
12
+ }
13
+ }
14
+ },
15
+ "backgroundColor": "#FFF",
16
+ "body": {
17
+ "type": "set_value",
18
+ "args": {
19
+ "customElevation": 0
20
+ },
21
+ "child": {
22
+ "type": "set_value",
23
+ "args": {
24
+ "customColor": "#FFF"
25
+ },
26
+ "child": {
27
+ "type": "set_value",
28
+ "args": {
29
+ "customBorderRadius": {
30
+ "type": "circular",
31
+ "radius": 10
32
+ }
33
+ },
34
+ "child": {
35
+ "type": "center",
36
+ "child": {
37
+ "type": "animated_physical_model",
38
+ "args": {
39
+ "animateColor": true,
40
+ "borderRadius": "${customBorderRadius}",
41
+ "color": "${customColor}",
42
+ "duration": 1000,
43
+ "elevation": "${customElevation}",
44
+ "shadowColor": "#000",
45
+ "shape": "rectangle"
46
+ },
47
+ "child": {
48
+ "type": "container",
49
+ "args": {
50
+ "height": 100,
51
+ "width": 100
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
58
+ },
59
+ "floatingActionButton": {
60
+ "type": "elevated_button",
61
+ "id": "press_me_button",
62
+ "args": {
63
+ "onPressed": "${set_value('customElevation', 25)}"
64
+ },
65
+ "child": {
66
+ "type": "text",
67
+ "args": {
68
+ "text": "Press Me!"
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "type": "scaffold",
3
+ "args": {
4
+ "appBar": {
5
+ "type": "app_bar",
6
+ "args": {
7
+ "title": {
8
+ "type": "text",
9
+ "args": {
10
+ "text": "AnimatedPositioned"
11
+ }
12
+ }
13
+ }
14
+ },
15
+ "body": {
16
+ "type": "set_value",
17
+ "args": {
18
+ "customHeight": 40
19
+ },
20
+ "child": {
21
+ "type": "stack",
22
+ "children": [
23
+ {
24
+ "type": "animated_positioned",
25
+ "args": {
26
+ "duration": 1000,
27
+ "height": "${customHeight}"
28
+ },
29
+ "child": {
30
+ "type": "container",
31
+ "args": {
32
+ "color": "#FF0000",
33
+ "width": 100
34
+ }
35
+ }
36
+ }
37
+ ]
38
+ }
39
+ },
40
+ "floatingActionButton": {
41
+ "type": "elevated_button",
42
+ "id": "press_me_button",
43
+ "args": {
44
+ "onPressed": "${set_value('customHeight', 100)}"
45
+ },
46
+ "child": {
47
+ "type": "text",
48
+ "args": {
49
+ "text": "Press Me!"
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "type": "scaffold",
3
+ "args": {
4
+ "appBar": {
5
+ "type": "app_bar",
6
+ "args": {
7
+ "title": {
8
+ "type": "text",
9
+ "args": {
10
+ "text": "AnimatedPositionedDirectional"
11
+ }
12
+ }
13
+ }
14
+ },
15
+ "body": {
16
+ "type": "set_value",
17
+ "args": {
18
+ "customWidth": 100
19
+ },
20
+ "child": {
21
+ "type": "stack",
22
+ "children": [
23
+ {
24
+ "type": "directionality",
25
+ "args": {
26
+ "textDirection": "rtl"
27
+ },
28
+ "child": {
29
+ "type": "animated_positioned_directional",
30
+ "args": {
31
+ "duration": 1000,
32
+ "start": 100,
33
+ "width": "${customWidth}"
34
+ },
35
+ "child": {
36
+ "type": "text",
37
+ "args": {
38
+ "text": "Hi! This should be a very very long message with right to left text direction."
39
+ }
40
+ }
41
+ }
42
+ }
43
+ ]
44
+ }
45
+ },
46
+ "floatingActionButton": {
47
+ "type": "elevated_button",
48
+ "id": "press_me_button",
49
+ "args": {
50
+ "onPressed": "${set_value('customWidth', 200)}"
51
+ },
52
+ "child": {
53
+ "type": "text",
54
+ "args": {
55
+ "text": "Press Me!"
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "type": "scaffold",
3
+ "args": {
4
+ "appBar": {
5
+ "type": "app_bar",
6
+ "args": {
7
+ "title": {
8
+ "type": "text",
9
+ "args": {
10
+ "text": "AnimatedSize"
11
+ }
12
+ }
13
+ }
14
+ },
15
+ "body": {
16
+ "type": "set_value",
17
+ "args": {
18
+ "customText": "This is a short text."
19
+ },
20
+ "child": {
21
+ "type": "center",
22
+ "child": {
23
+ "type": "container",
24
+ "args": {
25
+ "decoration": {
26
+ "border": {
27
+ "color": "#000"
28
+ }
29
+ }
30
+ },
31
+ "child": {
32
+ "type": "animated_size",
33
+ "args": {
34
+ "duration": 1000,
35
+ "reverseDuration": 3000
36
+ },
37
+ "child": {
38
+ "type": "text",
39
+ "args": {
40
+ "text": "${customText}"
41
+ }
42
+ }
43
+ }
44
+ }
45
+ }
46
+ },
47
+ "floatingActionButton": {
48
+ "type": "elevated_button",
49
+ "id": "press_me_button",
50
+ "args": {
51
+ "onPressed": "${set_value('customText', 'This is not a short text. This is a very very long text.')}"
52
+ },
53
+ "child": {
54
+ "type": "text",
55
+ "args": {
56
+ "text": "Press Me!"
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "type": "scaffold",
3
+ "args": {
4
+ "appBar": {
5
+ "type": "app_bar",
6
+ "args": {
7
+ "title": {
8
+ "type": "text",
9
+ "args": {
10
+ "text": "AnimatedSwitcher"
11
+ }
12
+ }
13
+ }
14
+ },
15
+ "body": {
16
+ "type": "set_widget",
17
+ "args": {
18
+ "customFirstText": {
19
+ "type": "text",
20
+ "args": {
21
+ "text": "1",
22
+ "style": {
23
+ "fontSize": 64
24
+ }
25
+ }
26
+ },
27
+ "customSecondText": {
28
+ "type": "text",
29
+ "args": {
30
+ "text": "2",
31
+ "style": {
32
+ "fontSize": 64
33
+ }
34
+ }
35
+ }
36
+ },
37
+ "child": {
38
+ "type": "center",
39
+ "child": {
40
+ "type": "animated_switcher",
41
+ "args": {
42
+ "child": "${customFirstText}",
43
+ "duration": 1000
44
+ }
45
+ }
46
+ }
47
+ },
48
+ "floatingActionButton": {
49
+ "type": "elevated_button",
50
+ "id": "press_me_button",
51
+ "args": {
52
+ "onPressed": "${setWidgetByKey('customFirstText', 'customSecondText')}"
53
+ },
54
+ "child": {
55
+ "type": "text",
56
+ "args": {
57
+ "text": "Press Me!"
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "type": "set_value",
3
+ "args": {
4
+ "customColor": "#FF0000"
5
+ },
6
+ "child": {
7
+ "type": "set_value",
8
+ "args": {
9
+ "customThemeData": {
10
+ "appBarTheme": {
11
+ "backgroundColor": "${customColor}"
12
+ }
13
+ }
14
+ },
15
+ "child": {
16
+ "type": "animated_theme",
17
+ "args": {
18
+ "data": "${customThemeData}",
19
+ "duration": 1000
20
+ },
21
+ "child": {
22
+ "type": "scaffold",
23
+ "args": {
24
+ "appBar": {
25
+ "type": "app_bar",
26
+ "args": {
27
+ "title": {
28
+ "type": "text",
29
+ "args": {
30
+ "text": "AnimatedTheme"
31
+ }
32
+ }
33
+ }
34
+ },
35
+ "floatingActionButton": {
36
+ "type": "elevated_button",
37
+ "id": "press_me_button",
38
+ "args": {
39
+ "onPressed": "${set_value('customColor', '#0000FF')}"
40
+ },
41
+ "child": {
42
+ "type": "text",
43
+ "args": {
44
+ "text": "Press Me!"
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }