├── .gitignore
├── .idea
├── codeStyles
│ └── Project.xml
├── libraries
│ ├── Dart_SDK.xml
│ ├── Flutter_Plugins.xml
│ └── Flutter_for_Android.xml
├── misc.xml
├── modules.xml
├── runConfigurations
│ └── example_lib_main_dart.xml
└── workspace.xml
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── README_CN.md
├── android
├── .gitignore
├── build.gradle
├── gradle.properties
├── settings.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── java
│ └── yy
│ └── inc
│ └── flutter_animation_set
│ └── FlutterAnimationSetPlugin.java
├── example
├── .gitignore
├── .metadata
├── README.md
├── android
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── yy
│ │ │ │ │ └── inc
│ │ │ │ │ └── flutter_animation_set_example
│ │ │ │ │ └── MainActivity.java
│ │ │ └── res
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── ios
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── flutter_export_environment.sh
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── Runner
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── main.m
├── lib
│ └── main.dart
├── pubspec.lock
├── pubspec.yaml
└── test
│ └── widget_test.dart
├── flutter_animation_set.iml
├── image
├── gif
│ ├── 1.gif
│ ├── 10.gif
│ ├── 11.gif
│ ├── 12.gif
│ ├── 13.gif
│ ├── 14.gif
│ ├── 15.gif
│ ├── 16.gif
│ ├── 17.gif
│ ├── 18.gif
│ ├── 19.gif
│ ├── 2.gif
│ ├── 20.gif
│ ├── 21.gif
│ ├── 3.gif
│ ├── 4.gif
│ ├── 5.gif
│ ├── 6.gif
│ ├── 7.gif
│ ├── 8.gif
│ └── 9.gif
└── readme
│ ├── YYWave.png
│ ├── screenShot1.jpg
│ ├── screenShot2.png
│ ├── screenShot3.png
│ └── screenShot4.png
├── ios
├── .gitignore
├── Assets
│ └── .gitkeep
├── Classes
│ ├── FlutterAnimationSetPlugin.h
│ └── FlutterAnimationSetPlugin.m
└── flutter_animation_set.podspec
├── lib
├── animation_set.dart
├── animator.dart
└── widget
│ ├── behavior_animations.dart
│ └── transition_animations.dart
├── pubspec.lock
├── pubspec.yaml
└── test
└── flutter_animation_set_test.dart
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 | build/
8 |
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/.idea/libraries/Dart_SDK.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/.idea/libraries/Flutter_Plugins.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/Flutter_for_Android.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/example_lib_main_dart.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 | deb
131 | ./gif/
132 | :
133 | *
134 | makeW
135 | )
136 | 700
137 | ./image/gif/
138 | blob
139 | debug
140 | behavior_animation
141 | export
142 | CustomScrollView
143 | A
144 | BoxColor(child:
145 | ))
146 |
147 |
148 | (
149 | .image/gif/
150 | ./image/gif/
151 | :
152 | |
153 | https://github.com/efoxTeam/flutter-animation-set/blob/master/image/gif/
154 | raw
155 | )
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 | 1565757181535
286 |
287 |
288 | 1565757181535
289 |
290 |
291 | 1565785156371
292 |
293 |
294 |
295 | 1565785156371
296 |
297 |
298 | 1565785636850
299 |
300 |
301 |
302 | 1565785636850
303 |
304 |
305 | 1565785920784
306 |
307 |
308 |
309 | 1565785920784
310 |
311 |
312 | 1565785996352
313 |
314 |
315 |
316 | 1565785996352
317 |
318 |
319 | 1565787585178
320 |
321 |
322 |
323 | 1565787585178
324 |
325 |
326 | 1565787611625
327 |
328 |
329 |
330 | 1565787611625
331 |
332 |
333 | 1565791434455
334 |
335 |
336 |
337 | 1565791434455
338 |
339 |
340 | 1565791476882
341 |
342 |
343 |
344 | 1565791476882
345 |
346 |
347 | 1565791613821
348 |
349 |
350 |
351 | 1565791613821
352 |
353 |
354 | 1565791642468
355 |
356 |
357 |
358 | 1565791642468
359 |
360 |
361 | 1565873565444
362 |
363 |
364 |
365 | 1565873565444
366 |
367 |
368 | 1565873607007
369 |
370 |
371 |
372 | 1565873607007
373 |
374 |
375 | 1565873717922
376 |
377 |
378 |
379 | 1565873717922
380 |
381 |
382 | 1565873786835
383 |
384 |
385 |
386 | 1565873786835
387 |
388 |
389 | 1565874769716
390 |
391 |
392 |
393 | 1565874769716
394 |
395 |
396 | 1565875839727
397 |
398 |
399 |
400 | 1565875839727
401 |
402 |
403 | 1565876149190
404 |
405 |
406 |
407 | 1565876149190
408 |
409 |
410 | 1565876326936
411 |
412 |
413 |
414 | 1565876326936
415 |
416 |
417 | 1565876768004
418 |
419 |
420 |
421 | 1565876768004
422 |
423 |
424 | 1565876778946
425 |
426 |
427 |
428 | 1565876778946
429 |
430 |
431 | 1565876793495
432 |
433 |
434 |
435 | 1565876793495
436 |
437 |
438 | 1565877224230
439 |
440 |
441 |
442 | 1565877224230
443 |
444 |
445 | 1565877548990
446 |
447 |
448 |
449 | 1565877548990
450 |
451 |
452 | 1565877952115
453 |
454 |
455 |
456 | 1565877952115
457 |
458 |
459 | 1565877981185
460 |
461 |
462 |
463 | 1565877981185
464 |
465 |
466 | 1565925097630
467 |
468 |
469 |
470 | 1565925097630
471 |
472 |
473 | 1565926120768
474 |
475 |
476 |
477 | 1565926120768
478 |
479 |
480 | 1565926206094
481 |
482 |
483 |
484 | 1565926206094
485 |
486 |
487 | 1565928142470
488 |
489 |
490 |
491 | 1565928142470
492 |
493 |
494 | 1565928300598
495 |
496 |
497 |
498 | 1565928300598
499 |
500 |
501 | 1565930365652
502 |
503 |
504 |
505 | 1565930365652
506 |
507 |
508 | 1566012680238
509 |
510 |
511 |
512 | 1566012680238
513 |
514 |
515 | 1566094888029
516 |
517 |
518 |
519 | 1566094888029
520 |
521 |
522 | 1566094996062
523 |
524 |
525 |
526 | 1566094996062
527 |
528 |
529 | 1566095664830
530 |
531 |
532 |
533 | 1566095664830
534 |
535 |
536 | 1566095905901
537 |
538 |
539 |
540 | 1566095905901
541 |
542 |
543 | 1566096418076
544 |
545 |
546 |
547 | 1566096418076
548 |
549 |
550 | 1566096519578
551 |
552 |
553 |
554 | 1566096519578
555 |
556 |
557 | 1566096594793
558 |
559 |
560 |
561 | 1566096594793
562 |
563 |
564 | 1566102859455
565 |
566 |
567 |
568 | 1566102859455
569 |
570 |
571 | 1566110048396
572 |
573 |
574 |
575 | 1566110048396
576 |
577 |
578 | 1566110095311
579 |
580 |
581 |
582 | 1566110095311
583 |
584 |
585 | 1566110775669
586 |
587 |
588 |
589 | 1566110775669
590 |
591 |
592 | 1566110863630
593 |
594 |
595 |
596 | 1566110863630
597 |
598 |
599 | 1566110920855
600 |
601 |
602 |
603 | 1566110920855
604 |
605 |
606 | 1566111115205
607 |
608 |
609 |
610 | 1566111115205
611 |
612 |
613 | 1566111156106
614 |
615 |
616 |
617 | 1566111156107
618 |
619 |
620 | 1566111496446
621 |
622 |
623 |
624 | 1566111496446
625 |
626 |
627 | 1566111550363
628 |
629 |
630 |
631 | 1566111550363
632 |
633 |
634 |
635 |
636 |
637 |
638 |
639 |
640 |
641 |
642 |
643 |
644 |
645 |
646 |
647 |
648 |
649 |
650 |
651 |
652 |
653 |
654 |
655 |
656 |
657 |
658 |
659 |
660 |
661 |
662 |
663 |
664 |
665 |
666 |
667 |
668 |
669 |
670 |
671 |
672 |
673 |
674 |
675 |
676 |
677 |
678 |
679 |
680 |
681 |
682 |
683 |
684 |
685 |
686 |
687 |
688 |
689 |
690 |
691 |
692 |
693 |
694 |
695 |
696 |
697 |
698 |
699 |
700 |
701 |
702 |
703 |
704 |
705 |
706 |
707 |
708 |
709 |
710 |
711 |
712 |
713 |
714 |
715 |
716 |
717 |
718 |
719 |
720 |
721 |
722 |
723 |
724 |
725 |
726 |
727 |
728 |
729 |
730 |
731 |
732 |
733 |
734 |
735 |
736 |
737 |
738 |
739 |
740 |
741 |
742 |
743 |
744 |
745 |
746 |
747 |
748 |
749 |
750 |
751 |
752 |
753 |
754 |
755 |
756 |
757 |
758 |
759 |
760 |
761 |
762 |
763 |
764 |
765 |
766 |
767 |
768 |
769 |
770 |
771 |
772 |
773 |
774 |
775 |
776 |
777 |
778 |
779 |
780 |
781 |
782 |
783 |
784 |
785 |
786 |
787 |
788 |
789 |
790 |
791 |
792 |
793 |
794 |
795 |
796 |
797 |
798 |
799 |
800 |
801 |
802 |
803 |
804 |
805 |
806 |
807 |
808 |
809 |
810 |
811 |
812 |
813 |
814 |
815 |
816 |
817 |
818 |
819 |
820 |
821 |
822 |
823 |
824 |
825 |
826 |
827 |
828 |
829 |
830 |
831 |
832 |
833 |
834 |
835 |
836 |
837 |
838 |
839 |
840 |
841 |
842 |
843 |
844 |
845 |
846 |
847 |
848 |
849 |
850 |
851 |
852 |
853 |
854 |
855 |
856 |
857 |
858 |
859 |
860 |
861 |
862 |
863 |
864 |
865 |
866 |
867 |
868 |
869 |
870 |
871 |
872 |
873 |
874 |
875 |
876 |
877 |
878 |
879 |
880 |
881 |
882 |
883 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: e40273f79707e35e05fdf806be6f6fba7bebd3f8
8 | channel: unknown
9 |
10 | project_type: plugin
11 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.0.1
2 |
3 | * first release
4 | * welcome to submit bug
5 |
6 | ## 0.0.2
7 |
8 | * update pub read me
9 |
10 | ## 0.0.3
11 |
12 | * add curves learning
13 |
14 | ## 0.0.4
15 |
16 | * add once animation
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ✨ Flutter Animation Set
2 |
3 | [](https://pub.dev/packages/flutter_animation_set)
4 |
5 | **[Lanuage ~~]** [English](README.md) | [中文文档](README_CN.md)
6 |
7 | Simplified Flutter stagger animation.To drive the Flutter stagger animation through a timeline in the form of an animation configuration.You can
8 |
9 | 1. Uses the existing Animation Widget of `Flutter Animation Set`
10 | 2. Use `Flutter Animation Set` to create a new Animation Widget
11 | 3. Contribute your Flutter Animation Set Widget
12 | 4. Watch All of the `Curves` of Flutter in example
13 |
14 | ## 🎖 Installing
15 |
16 | ```yaml
17 | dependencies:
18 | flutter_animation_set: ^0.0.4
19 | ```
20 |
21 | ## ⚡ Use Animation Set Widget
22 |
23 | **1、import**
24 |
25 | ```dart
26 | import 'package:flutter_animation_set/widget/transition_animations.dart';
27 | import 'package:flutter_animation_set/widget/behavior_animations.dart';
28 | ```
29 |
30 | **2、use**
31 |
32 | ```dart
33 | child: YYRotatingPlane(),
34 | ```
35 |
36 | **3、road map**
37 |
38 | > transition_animations
39 |
40 |
41 |
42 |
43 |
44 |
45 | YYRotatingPlane
46 |
47 | ✅
48 |
49 |
50 |
51 |
52 | YYDoubleBounce
53 |
54 | ✅
55 |
56 |
57 |
58 |
59 | YYWave
60 |
61 | ✅
62 |
63 |
64 |
65 |
66 | YYWanderingCubes
67 |
68 | ✅
69 |
70 |
71 |
72 |
73 | YYFadingFour
74 |
75 | ✅
76 |
77 |
78 |
79 |
80 | YYFadingCube
81 |
82 | ✅
83 |
84 |
85 |
86 |
87 |
88 |
89 | YYPulse
90 |
91 | ✅
92 |
93 |
94 |
95 |
96 | YYThreeBounce
97 |
98 | ✅
99 |
100 |
101 |
102 |
103 | YYThreeLine
104 |
105 | ✅
106 |
107 |
108 |
109 |
110 | YYCubeGrid
111 |
112 | ✅
113 |
114 |
115 |
116 |
117 | YYRotatingCircle
118 |
119 | ✅
120 |
121 |
122 |
123 |
124 | YYPumpingHeart
125 |
126 | ✅
127 |
128 |
129 |
130 |
131 |
132 |
133 | YYRipple
134 |
135 | ✅
136 |
137 |
138 |
139 |
140 | YYRotateLine
141 |
142 | ✅
143 |
144 |
145 |
146 |
147 | YYCubeFadeIn
148 |
149 | ✅
150 |
151 |
152 |
153 |
154 | YYBlinkGrid
155 |
156 | ✅
157 |
158 |
159 |
160 |
161 | > behavior_animations
162 |
163 |
164 |
165 |
166 |
167 |
168 | YYFadeButton
169 |
170 | ✅
171 |
172 |
173 |
174 |
175 | YYSingleLike
176 |
177 | ✅
178 |
179 |
180 |
181 |
182 | YYLove
183 |
184 | ✅
185 |
186 |
187 |
188 |
189 | YYSpringMenu
190 |
191 | ✅
192 |
193 |
194 |
195 |
196 | YYFoldMenu
197 |
198 | ✅
199 |
200 |
201 |
202 |
203 | **4、thanks**
204 |
205 | * [flutter_spinkit](https://github.com/jogboms/flutter_spinkit)
206 |
207 | ## ⚡ Create Animation Set Widget By YourSelf
208 |
209 | **1、import**
210 |
211 | ```dart
212 | import 'package:flutter_animation_set/animation_set.dart';
213 | import 'package:flutter_animation_set/animator.dart';
214 | ```
215 |
216 | **2、use widget**
217 |
218 | ```dart
219 | AnimatorSet(
220 | child: widget.child,
221 | animatorSet: [],
222 | animationType: AnimationType.reverse,
223 | debug: false,
224 | )
225 | ```
226 |
227 | AnimatorSet Supported properties
228 |
229 | Property|Mean|Default
230 | :--|:--|:--:|
231 | child|The component that performs the animation|not have
232 | animatorSet|Collection of animation|not have
233 | animationType|Controls the type of animation execution|AnimationType.repeat
234 | debug|The output log|false
235 |
236 | The properties of the animationType
237 |
238 | Property|Mean
239 | :--|:--|
240 | repeat|Repeat animation
241 | reverse|Rewind animation
242 | once|One play animation
243 |
244 | **3、use AnimatorSet api**
245 |
246 | about animation widget
247 |
248 | Widget|Mean|Description
249 | :--|:--|:--:|
250 | **W**|width|Control the change of width. If it is scaled up, SX is recommended instead
251 | **H**|height|Control the change of height. If it is scaled up, SY is recommended instead
252 | **P**|padding|Control padding changes
253 | **O**|opacity|Control opacity changes
254 | **SX**|scaleX|Scale the X-axis with the midpoint
255 | **SY**|scaleY|Scale the Y-axis with the midpoint
256 | **RX**|rotateX|Rotate the X-axis with the midpoint
257 | **RY**|rotateY|Rotate the Y-axis with the midpoint
258 | **RZ**|rotateZ|Rotate the Z-axis with the midpoint
259 | **TX**|transitionX|Translate the Z-axis with the midpoint
260 | **TY**|transitionY|Translate the Y-axis with the midpoint
261 | **C**|color|Control background color changes
262 | **B**|border|Control background border changes
263 |
264 | about support widget
265 |
266 | Widget|Mean|Description
267 | :--|:--|:--:|
268 | **Delay**|delay timeLine|Extend the timeline to wait
269 | **Serial**|combine animation|Through the combination of animation, to achieve the effect of playing together
270 |
271 | ## ⚡ For Example
272 |
273 | **1、create timeLine**
274 |
275 |
276 |
277 |
278 | 1. This figure shows that the core components of the animation are made according to the timeLine
279 | 2. In the process of execution, there are 6 animations simultaneously, and the total animation duration is 900ms
280 | 3. ScaleY components are used to scale up and down in order to make each rectangle have a wave effect
281 | 4. Drag the timeline with the Delay component to reach the animation duration of 900ms
282 |
283 | **2、build animatorSet**
284 |
285 | Assemble our animation component using the diagram above, which has the following properties
286 |
287 | * from:Animation initial value
288 | * to:End of animation value
289 | * duration:Animation time
290 | * delay:The delay in actually executing the animation
291 | * curve:Animation interpolator
292 |
293 | ```dart
294 | animatorSet: [
295 | Delay(duration: before),
296 | SY(from: 0.8, to: 1.6, duration: 200, delay: 0, curve: Curves.linear),
297 | SY(from: 1.6, to: 0.8, duration: 200, delay: 0, curve: Curves.linear),
298 | Delay(duration: after),
299 | ],
300 | ```
301 |
302 | The object that the animation executes is `Container` rectangle
303 |
304 | ```dart
305 | Widget makeWave(int before, int after) {
306 | return AnimatorSet(
307 | child: Container(
308 | color: Colors.white,
309 | width: 5,
310 | height: 15,
311 | ),
312 | animatorSet: [
313 | Delay(duration: before),
314 | SY(from: 0.8, to: 1.6, duration: 200, delay: 0, curve: Curves.linear),
315 | SY(from: 1.6, to: 0.8, duration: 200, delay: 0, curve: Curves.linear),
316 | Delay(duration: after),
317 | ],
318 | );
319 | }
320 | ```
321 |
322 | **3、convert to code**
323 |
324 | ```dart
325 | class YYWave extends StatelessWidget {
326 | @override
327 | Widget build(BuildContext context) {
328 | return Container(
329 | width: 40,
330 | height: 40,
331 | child: Row(
332 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
333 | children: [
334 | makeWave(0, 500),
335 | makeWave(100, 400),
336 | makeWave(200, 300),
337 | makeWave(300, 200),
338 | makeWave(400, 100),
339 | makeWave(500, 0),
340 | ],
341 | ),
342 | );
343 | }
344 | }
345 | ```
346 |
347 | **4、done**
348 |
349 |
350 |
351 | ## More
352 |
353 | **1、Combination of animation**
354 |
355 | > The scaling effect requires scaling both the X and Y axes, uses the Serial Widget
356 |
357 | ```dart
358 | animatorSet: [
359 | Serial(
360 | duration: 2000,
361 | serialList: [
362 | SX(from: 0.0, to: 1.0, curve: Curves.easeInOut),
363 | SY(from: 0.0, to: 1.0, curve: Curves.easeInOut),
364 | O(from: 0.5, to: 0.0, delay: 1000, curve: Curves.easeInOut),
365 | ],
366 | ),
367 | ],
368 | ```
369 |
370 | done
371 |
372 |
373 |
374 | **2、Time-lapse animations**
375 |
376 | Deal with the delay attribute when you actually do the animation
377 |
378 | ```dart
379 | class YYThreeLine extends StatelessWidget {
380 | @override
381 | Widget build(BuildContext context) {
382 | return Container(
383 | width: 40,
384 | height: 40,
385 | child: Row(
386 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
387 | children: [
388 | makeLine(0),
389 | makeLine(50),
390 | makeLine(100),
391 | ],
392 | ),
393 | );
394 | }
395 | }
396 |
397 | Widget makeLine(int delay) {
398 | return AnimatorSet(
399 | child: Container(
400 | color: Colors.white,
401 | width: 10,
402 | height: 5,
403 | ),
404 | animatorSet: [
405 | TY(from: 0.0, to: 5.0, duration: 400, delay: delay, curve: Curves.fastOutSlowIn,),
406 | TY(from: 5.0, to: 0.0, duration: 400, curve: Curves.fastOutSlowIn,),
407 | ],
408 | );
409 | }
410 | ```
411 |
412 | done
413 |
414 |
415 |
416 | **3、Reverse animation**
417 |
418 | After the animation can be played, set `animationtype.reverse` through the animationType property, making the animation play back
419 |
420 | ```dart
421 | class YYFoldMenu extends StatelessWidget {
422 | @override
423 | Widget build(BuildContext context) {
424 | return Container(
425 | width: 40,
426 | height: 40,
427 | child: Column(
428 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
429 | children: [
430 | makeFoldMenu(0, 40),
431 | makeFoldMenu(100, 26.0),
432 | makeFoldMenu(200, 12.0),
433 | ],
434 | ),
435 | );
436 | }
437 | }
438 |
439 | Widget makeFoldMenu(int delay, double toY) {
440 | return AnimatorSet(
441 | animationType: AnimationType.reverse,
442 | child: Container(
443 | decoration: BoxDecoration(
444 | color: Colors.white,
445 | ),
446 | width: 30,
447 | height: 10,
448 | ),
449 | animatorSet: [
450 | Serial(
451 | duration: 2000,
452 | delay: delay,
453 | serialList: [
454 | TY(from: 0.0, to: toY, curve: Curves.elasticInOut),
455 | SX(from: 1.0, to: 0.1, curve: Curves.elasticInOut),
456 | SY(from: 1.0, to: 0.1, curve: Curves.elasticInOut),
457 | ],
458 | ),
459 | ],
460 | );
461 | }
462 | ```
463 |
464 | done
465 |
466 |
467 |
468 | ## Bugs/Requests
469 |
470 | * If your application has problems, please submit your code and effect to Issue.
471 | * Pull request are also welcome.
472 |
473 | ## Contribution
474 |
475 | * Contribute your component, and we'll add it to the animation set
476 | * Or post your animation, if interested, we will help you to achieve
477 |
478 | ## About
479 |
480 | * QQ:510402535
481 | * QQ群:798874340
482 | * e-mail:xyj510402535@qq.com
483 | * g-mail:xyj51042535@gmail.com
484 | * Blog:http://blog.csdn.net/qq_30379689
485 | * Github:https://github.com/AndroidHensen
486 |
487 | ## License
488 |
489 | Apache License 2.0
490 |
--------------------------------------------------------------------------------
/README_CN.md:
--------------------------------------------------------------------------------
1 | # ✨ Flutter Animation Set
2 |
3 | [](https://pub.dev/packages/flutter_animation_set)
4 |
5 | 简化Flutter交错动画。用动画配置的形式,通过时间线去驱动Flutter的交错动画。你可以
6 |
7 | 1. 使用`Flutter Animation Set`现有的动画组件
8 | 2. 使用`Flutter Animation Set`去创建新的动画组件
9 | 3. 贡献你的`Flutter Animation Set`动画组件
10 | 4. 在项目的example中观看所有的`Curves`动画效果
11 |
12 | ## 🎖 Installing
13 |
14 | ```yaml
15 | dependencies:
16 | flutter_animation_set: ^0.0.4
17 | ```
18 |
19 | ## ⚡ Use Animation Set Widget
20 |
21 | **1、import**
22 |
23 | ```dart
24 | import 'package:flutter_animation_set/widget/transition_animations.dart';
25 | import 'package:flutter_animation_set/widget/behavior_animations.dart';
26 | ```
27 |
28 | **2、use**
29 |
30 | ```dart
31 | child: YYRotatingPlane(),
32 | ```
33 |
34 | **3、road map**
35 |
36 | > transition_animations 过渡动画
37 |
38 |
39 |
40 |
41 |
42 |
43 | YYRotatingPlane
44 |
45 | ✅
46 |
47 |
48 |
49 |
50 | YYDoubleBounce
51 |
52 | ✅
53 |
54 |
55 |
56 |
57 | YYWave
58 |
59 | ✅
60 |
61 |
62 |
63 |
64 | YYWanderingCubes
65 |
66 | ✅
67 |
68 |
69 |
70 |
71 | YYFadingFour
72 |
73 | ✅
74 |
75 |
76 |
77 |
78 | YYFadingCube
79 |
80 | ✅
81 |
82 |
83 |
84 |
85 |
86 |
87 | YYPulse
88 |
89 | ✅
90 |
91 |
92 |
93 |
94 | YYThreeBounce
95 |
96 | ✅
97 |
98 |
99 |
100 |
101 | YYThreeLine
102 |
103 | ✅
104 |
105 |
106 |
107 |
108 | YYCubeGrid
109 |
110 | ✅
111 |
112 |
113 |
114 |
115 | YYRotatingCircle
116 |
117 | ✅
118 |
119 |
120 |
121 |
122 | YYPumpingHeart
123 |
124 | ✅
125 |
126 |
127 |
128 |
129 |
130 |
131 | YYRipple
132 |
133 | ✅
134 |
135 |
136 |
137 |
138 | YYRotateLine
139 |
140 | ✅
141 |
142 |
143 |
144 |
145 | YYCubeFadeIn
146 |
147 | ✅
148 |
149 |
150 |
151 |
152 | YYBlinkGrid
153 |
154 | ✅
155 |
156 |
157 |
158 |
159 | > behavior_animations 行为动画
160 |
161 |
162 |
163 |
164 |
165 |
166 | YYFadeButton
167 |
168 | ✅
169 |
170 |
171 |
172 |
173 | YYSingleLike
174 |
175 | ✅
176 |
177 |
178 |
179 |
180 | YYLove
181 |
182 | ✅
183 |
184 |
185 |
186 |
187 | YYSpringMenu
188 |
189 | ✅
190 |
191 |
192 |
193 |
194 | YYFoldMenu
195 |
196 | ✅
197 |
198 |
199 |
200 |
201 | **4、thanks**
202 |
203 | * [flutter_spinkit](https://github.com/jogboms/flutter_spinkit)
204 |
205 | ## ⚡ Create Animation Set Widget By YourSelf
206 |
207 | **1、import**
208 |
209 | ```dart
210 | import 'package:flutter_animation_set/animation_set.dart';
211 | import 'package:flutter_animation_set/animator.dart';
212 | ```
213 |
214 | **2、use widget**
215 |
216 | ```dart
217 | AnimatorSet(
218 | child: widget.child,
219 | animatorSet: [],
220 | animationType: AnimationType.reverse,
221 | debug: false,
222 | )
223 | ```
224 |
225 | AnimatorSet支持的属性
226 |
227 | Property|Mean|Default
228 | :--|:--|:--:|
229 | child|执行动画的组件|无
230 | animatorSet|动画集合|无
231 | animationType|控制动画执行的类型|AnimationType.repeat
232 | debug|输出日志|false
233 |
234 | animationType的属性
235 |
236 | Property|Mean
237 | :--|:--|
238 | repeat|重复播放动画
239 | reverse|倒退播放动画
240 | once|一次播放动画
241 |
242 | **3、use AnimatorSet api**
243 |
244 | 关于动画集组件
245 |
246 | Widget|Mean|Description
247 | :--|:--|:--:|
248 | **W**|width|控制宽度的变化,如果是按比例拉升,建议用SX替代
249 | **H**|height|控制高度的变化,如果是按比例拉升,建议用SY替代
250 | **P**|padding|控制边距的变化
251 | **O**|opacity|控制透明度的变化
252 | **SX**|scaleX|以中点进行X轴的缩放
253 | **SY**|scaleY|以中点进行Y轴的缩放
254 | **RX**|rotateX|以中点进行X轴的旋转
255 | **RY**|rotateY|以中点进行Y轴的旋转
256 | **RZ**|rotateZ|以中点进行Z轴的旋转
257 | **TX**|transitionX|进行X轴的平移
258 | **TY**|transitionY|进行Y轴的平移
259 | **C**|color|控制背景颜色变化
260 | **B**|border|控制背景边框变化
261 |
262 | 关于辅助组件
263 |
264 | Widget|Mean|Description
265 | :--|:--|:--:|
266 | **Delay**|delay timeLine|延长时间线,进入等待阶段
267 | **Serial**|combine animation|通过组合动画,达到一起播放的效果
268 |
269 | ## ⚡ For Example
270 |
271 | **1、create timeLine**
272 |
273 |
274 |
275 |
276 | 1. 此图表明动画的核心组成是根据时间线(timeLine)去制作的
277 | 2. 在执行的过程中有6次动画同时进行,且总动画时长都为900ms
278 | 3. 通过ScaleY组件有序的进行放大和缩小的操作,让每个矩形都有波浪的效果
279 | 4. 通过Delay组件去拖长时间线,达到动画时长统一为900ms
280 |
281 | **2、build animatorSet**
282 |
283 | 通过上面的图示组装我们的动画组件,动画组件带有以下属性
284 |
285 | * from:动画初始值
286 | * to:动画结束值
287 | * duration:动画时间
288 | * delay:真正执行动画的延时
289 | * curve:动画插值器
290 |
291 | ```dart
292 | animatorSet: [
293 | Delay(duration: before),
294 | SY(from: 0.8, to: 1.6, duration: 200, delay: 0, curve: Curves.linear),
295 | SY(from: 1.6, to: 0.8, duration: 200, delay: 0, curve: Curves.linear),
296 | Delay(duration: after),
297 | ],
298 | ```
299 |
300 | 动画执行的对象是`Container`长方形
301 |
302 | ```dart
303 | Widget makeWave(int before, int after) {
304 | return AnimatorSet(
305 | child: Container(
306 | color: Colors.white,
307 | width: 5,
308 | height: 15,
309 | ),
310 | animatorSet: [
311 | Delay(duration: before),
312 | SY(from: 0.8, to: 1.6, duration: 200, delay: 0, curve: Curves.linear),
313 | SY(from: 1.6, to: 0.8, duration: 200, delay: 0, curve: Curves.linear),
314 | Delay(duration: after),
315 | ],
316 | );
317 | }
318 | ```
319 |
320 | **3、convert to code**
321 |
322 | ```dart
323 | class YYWave extends StatelessWidget {
324 | @override
325 | Widget build(BuildContext context) {
326 | return Container(
327 | width: 40,
328 | height: 40,
329 | child: Row(
330 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
331 | children: [
332 | makeWave(0, 500),
333 | makeWave(100, 400),
334 | makeWave(200, 300),
335 | makeWave(300, 200),
336 | makeWave(400, 100),
337 | makeWave(500, 0),
338 | ],
339 | ),
340 | );
341 | }
342 | }
343 | ```
344 |
345 | **4、done**
346 |
347 |
348 |
349 | ## More
350 |
351 | **1、组合动画**
352 |
353 | > 缩放效果需要同时缩放X、Y轴,用到Serial组件
354 |
355 | ```dart
356 | animatorSet: [
357 | Serial(
358 | duration: 2000,
359 | serialList: [
360 | SX(from: 0.0, to: 1.0, curve: Curves.easeInOut),
361 | SY(from: 0.0, to: 1.0, curve: Curves.easeInOut),
362 | O(from: 0.5, to: 0.0, delay: 1000, curve: Curves.easeInOut),
363 | ],
364 | ),
365 | ],
366 | ```
367 |
368 | done
369 |
370 |
371 |
372 | **2、延时动画**
373 |
374 | 对真正做动画的时候处理delay属性
375 |
376 | ```dart
377 | class YYThreeLine extends StatelessWidget {
378 | @override
379 | Widget build(BuildContext context) {
380 | return Container(
381 | width: 40,
382 | height: 40,
383 | child: Row(
384 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
385 | children: [
386 | makeLine(0),
387 | makeLine(50),
388 | makeLine(100),
389 | ],
390 | ),
391 | );
392 | }
393 | }
394 |
395 | Widget makeLine(int delay) {
396 | return AnimatorSet(
397 | child: Container(
398 | color: Colors.white,
399 | width: 10,
400 | height: 5,
401 | ),
402 | animatorSet: [
403 | TY(from: 0.0, to: 5.0, duration: 400, delay: delay, curve: Curves.fastOutSlowIn,),
404 | TY(from: 5.0, to: 0.0, duration: 400, curve: Curves.fastOutSlowIn,),
405 | ],
406 | );
407 | }
408 | ```
409 |
410 | done
411 |
412 |
413 |
414 | **3、倒退动画**
415 |
416 | 动画可以播放完成后,通过animationType属性设置`AnimationType.reverse`,让动画接着倒退播放
417 |
418 | ```dart
419 | class YYFoldMenu extends StatelessWidget {
420 | @override
421 | Widget build(BuildContext context) {
422 | return Container(
423 | width: 40,
424 | height: 40,
425 | child: Column(
426 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
427 | children: [
428 | makeFoldMenu(0, 40),
429 | makeFoldMenu(100, 26.0),
430 | makeFoldMenu(200, 12.0),
431 | ],
432 | ),
433 | );
434 | }
435 | }
436 |
437 | Widget makeFoldMenu(int delay, double toY) {
438 | return AnimatorSet(
439 | animationType: AnimationType.reverse,
440 | child: Container(
441 | decoration: BoxDecoration(
442 | color: Colors.white,
443 | ),
444 | width: 30,
445 | height: 10,
446 | ),
447 | animatorSet: [
448 | Serial(
449 | duration: 2000,
450 | delay: delay,
451 | serialList: [
452 | TY(from: 0.0, to: toY, curve: Curves.elasticInOut),
453 | SX(from: 1.0, to: 0.1, curve: Curves.elasticInOut),
454 | SY(from: 1.0, to: 0.1, curve: Curves.elasticInOut),
455 | ],
456 | ),
457 | ],
458 | );
459 | }
460 | ```
461 |
462 | done
463 |
464 |
465 |
466 | ## Bugs/Requests
467 |
468 | * If your application has problems, please submit your code and effect to Issue.
469 | * Pull request are also welcome.
470 |
471 | ## Contribution
472 |
473 | * Contribute your component, and we'll add it to the animation set
474 | * Or post your animation, if interested, we will help you to achieve
475 |
476 | ## About
477 |
478 | * QQ:510402535
479 | * QQ群:798874340
480 | * e-mail:xyj510402535@qq.com
481 | * g-mail:xyj51042535@gmail.com
482 | * Blog:http://blog.csdn.net/qq_30379689
483 | * Github:https://github.com/AndroidHensen
484 |
485 | ## License
486 |
487 | Apache License 2.0
488 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | group 'yy.inc.flutter_animation_set'
2 | version '1.0-SNAPSHOT'
3 |
4 | buildscript {
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 |
10 | dependencies {
11 | classpath 'com.android.tools.build:gradle:3.2.1'
12 | }
13 | }
14 |
15 | rootProject.allprojects {
16 | repositories {
17 | google()
18 | jcenter()
19 | }
20 | }
21 |
22 | apply plugin: 'com.android.library'
23 |
24 | android {
25 | compileSdkVersion 28
26 |
27 | defaultConfig {
28 | minSdkVersion 16
29 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
30 | }
31 | lintOptions {
32 | disable 'InvalidPackage'
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
3 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'flutter_animation_set'
2 |
--------------------------------------------------------------------------------
/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/android/src/main/java/yy/inc/flutter_animation_set/FlutterAnimationSetPlugin.java:
--------------------------------------------------------------------------------
1 | package yy.inc.flutter_animation_set;
2 |
3 | import io.flutter.plugin.common.MethodCall;
4 | import io.flutter.plugin.common.MethodChannel;
5 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
6 | import io.flutter.plugin.common.MethodChannel.Result;
7 | import io.flutter.plugin.common.PluginRegistry.Registrar;
8 |
9 | /** FlutterAnimationSetPlugin */
10 | public class FlutterAnimationSetPlugin implements MethodCallHandler {
11 | /** Plugin registration. */
12 | public static void registerWith(Registrar registrar) {
13 | final MethodChannel channel = new MethodChannel(registrar.messenger(), "flutter_animation_set");
14 | channel.setMethodCallHandler(new FlutterAnimationSetPlugin());
15 | }
16 |
17 | @Override
18 | public void onMethodCall(MethodCall call, Result result) {
19 | if (call.method.equals("getPlatformVersion")) {
20 | result.success("Android " + android.os.Build.VERSION.RELEASE);
21 | } else {
22 | result.notImplemented();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .packages
28 | .pub-cache/
29 | .pub/
30 | /build/
31 |
32 | # Android related
33 | **/android/**/gradle-wrapper.jar
34 | **/android/.gradle
35 | **/android/captures/
36 | **/android/gradlew
37 | **/android/gradlew.bat
38 | **/android/local.properties
39 | **/android/**/GeneratedPluginRegistrant.java
40 |
41 | # iOS/XCode related
42 | **/ios/**/*.mode1v3
43 | **/ios/**/*.mode2v3
44 | **/ios/**/*.moved-aside
45 | **/ios/**/*.pbxuser
46 | **/ios/**/*.perspectivev3
47 | **/ios/**/*sync/
48 | **/ios/**/.sconsign.dblite
49 | **/ios/**/.tags*
50 | **/ios/**/.vagrant/
51 | **/ios/**/DerivedData/
52 | **/ios/**/Icon?
53 | **/ios/**/Pods/
54 | **/ios/**/.symlinks/
55 | **/ios/**/profile
56 | **/ios/**/xcuserdata
57 | **/ios/.generated/
58 | **/ios/Flutter/App.framework
59 | **/ios/Flutter/Flutter.framework
60 | **/ios/Flutter/Generated.xcconfig
61 | **/ios/Flutter/app.flx
62 | **/ios/Flutter/app.zip
63 | **/ios/Flutter/flutter_assets/
64 | **/ios/ServiceDefinitions.json
65 | **/ios/Runner/GeneratedPluginRegistrant.*
66 |
67 | # Exceptions to above rules.
68 | !**/ios/**/default.mode1v3
69 | !**/ios/**/default.mode2v3
70 | !**/ios/**/default.pbxuser
71 | !**/ios/**/default.perspectivev3
72 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
73 |
--------------------------------------------------------------------------------
/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: e40273f79707e35e05fdf806be6f6fba7bebd3f8
8 | channel: unknown
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # flutter_animation_set_example
2 |
3 | Demonstrates how to use the flutter_animation_set plugin.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26 |
27 | android {
28 | compileSdkVersion 28
29 |
30 | lintOptions {
31 | disable 'InvalidPackage'
32 | }
33 |
34 | defaultConfig {
35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36 | applicationId "yy.inc.flutter_animation_set_example"
37 | minSdkVersion 16
38 | targetSdkVersion 28
39 | versionCode flutterVersionCode.toInteger()
40 | versionName flutterVersionName
41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | }
52 |
53 | flutter {
54 | source '../..'
55 | }
56 |
57 | dependencies {
58 | testImplementation 'junit:junit:4.12'
59 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
61 | }
62 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
13 |
20 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/yy/inc/flutter_animation_set_example/MainActivity.java:
--------------------------------------------------------------------------------
1 | package yy.inc.flutter_animation_set_example;
2 |
3 | import android.os.Bundle;
4 | import io.flutter.app.FlutterActivity;
5 | import io.flutter.plugins.GeneratedPluginRegistrant;
6 |
7 | public class MainActivity extends FlutterActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | GeneratedPluginRegistrant.registerWith(this);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.2.1'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | }
18 |
19 | rootProject.buildDir = '../build'
20 | subprojects {
21 | project.buildDir = "${rootProject.buildDir}/${project.name}"
22 | }
23 | subprojects {
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
3 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
7 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/ios/Flutter/flutter_export_environment.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # This is a generated file; do not edit or check into version control.
3 | export "FLUTTER_ROOT=C:\FlutterSDK\flutter"
4 | export "FLUTTER_APPLICATION_PATH=C:\YYLive4-OpenSource\flutter_animation_set\example"
5 | export "FLUTTER_TARGET=lib\main.dart"
6 | export "FLUTTER_BUILD_DIR=build"
7 | export "SYMROOT=${SOURCE_ROOT}/../build\ios"
8 | export "FLUTTER_FRAMEWORK_DIR=C:\FlutterSDK\flutter\bin\cache\artifacts\engine\ios"
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
14 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
15 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
16 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
17 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
18 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
19 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
20 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
21 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
22 | /* End PBXBuildFile section */
23 |
24 | /* Begin PBXCopyFilesBuildPhase section */
25 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
26 | isa = PBXCopyFilesBuildPhase;
27 | buildActionMask = 2147483647;
28 | dstPath = "";
29 | dstSubfolderSpec = 10;
30 | files = (
31 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
32 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
33 | );
34 | name = "Embed Frameworks";
35 | runOnlyForDeploymentPostprocessing = 0;
36 | };
37 | /* End PBXCopyFilesBuildPhase section */
38 |
39 | /* Begin PBXFileReference section */
40 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
41 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
42 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
43 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
44 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
45 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
46 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
47 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
48 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
49 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
50 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
51 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
52 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
53 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
54 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
55 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
56 | /* End PBXFileReference section */
57 |
58 | /* Begin PBXFrameworksBuildPhase section */
59 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
60 | isa = PBXFrameworksBuildPhase;
61 | buildActionMask = 2147483647;
62 | files = (
63 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
64 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
65 | );
66 | runOnlyForDeploymentPostprocessing = 0;
67 | };
68 | /* End PBXFrameworksBuildPhase section */
69 |
70 | /* Begin PBXGroup section */
71 | 9740EEB11CF90186004384FC /* Flutter */ = {
72 | isa = PBXGroup;
73 | children = (
74 | 3B80C3931E831B6300D905FE /* App.framework */,
75 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
76 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
77 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
78 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
79 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
80 | );
81 | name = Flutter;
82 | sourceTree = "";
83 | };
84 | 97C146E51CF9000F007C117D = {
85 | isa = PBXGroup;
86 | children = (
87 | 9740EEB11CF90186004384FC /* Flutter */,
88 | 97C146F01CF9000F007C117D /* Runner */,
89 | 97C146EF1CF9000F007C117D /* Products */,
90 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
91 | );
92 | sourceTree = "";
93 | };
94 | 97C146EF1CF9000F007C117D /* Products */ = {
95 | isa = PBXGroup;
96 | children = (
97 | 97C146EE1CF9000F007C117D /* Runner.app */,
98 | );
99 | name = Products;
100 | sourceTree = "";
101 | };
102 | 97C146F01CF9000F007C117D /* Runner */ = {
103 | isa = PBXGroup;
104 | children = (
105 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
106 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
107 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
108 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
109 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
110 | 97C147021CF9000F007C117D /* Info.plist */,
111 | 97C146F11CF9000F007C117D /* Supporting Files */,
112 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
113 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
114 | );
115 | path = Runner;
116 | sourceTree = "";
117 | };
118 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
119 | isa = PBXGroup;
120 | children = (
121 | 97C146F21CF9000F007C117D /* main.m */,
122 | );
123 | name = "Supporting Files";
124 | sourceTree = "";
125 | };
126 | /* End PBXGroup section */
127 |
128 | /* Begin PBXNativeTarget section */
129 | 97C146ED1CF9000F007C117D /* Runner */ = {
130 | isa = PBXNativeTarget;
131 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
132 | buildPhases = (
133 | 9740EEB61CF901F6004384FC /* Run Script */,
134 | 97C146EA1CF9000F007C117D /* Sources */,
135 | 97C146EB1CF9000F007C117D /* Frameworks */,
136 | 97C146EC1CF9000F007C117D /* Resources */,
137 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
138 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
139 | );
140 | buildRules = (
141 | );
142 | dependencies = (
143 | );
144 | name = Runner;
145 | productName = Runner;
146 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
147 | productType = "com.apple.product-type.application";
148 | };
149 | /* End PBXNativeTarget section */
150 |
151 | /* Begin PBXProject section */
152 | 97C146E61CF9000F007C117D /* Project object */ = {
153 | isa = PBXProject;
154 | attributes = {
155 | LastUpgradeCheck = 1020;
156 | ORGANIZATIONNAME = "The Chromium Authors";
157 | TargetAttributes = {
158 | 97C146ED1CF9000F007C117D = {
159 | CreatedOnToolsVersion = 7.3.1;
160 | };
161 | };
162 | };
163 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
164 | compatibilityVersion = "Xcode 3.2";
165 | developmentRegion = en;
166 | hasScannedForEncodings = 0;
167 | knownRegions = (
168 | en,
169 | Base,
170 | );
171 | mainGroup = 97C146E51CF9000F007C117D;
172 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
173 | projectDirPath = "";
174 | projectRoot = "";
175 | targets = (
176 | 97C146ED1CF9000F007C117D /* Runner */,
177 | );
178 | };
179 | /* End PBXProject section */
180 |
181 | /* Begin PBXResourcesBuildPhase section */
182 | 97C146EC1CF9000F007C117D /* Resources */ = {
183 | isa = PBXResourcesBuildPhase;
184 | buildActionMask = 2147483647;
185 | files = (
186 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
187 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
188 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
189 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
190 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
191 | );
192 | runOnlyForDeploymentPostprocessing = 0;
193 | };
194 | /* End PBXResourcesBuildPhase section */
195 |
196 | /* Begin PBXShellScriptBuildPhase section */
197 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
198 | isa = PBXShellScriptBuildPhase;
199 | buildActionMask = 2147483647;
200 | files = (
201 | );
202 | inputPaths = (
203 | );
204 | name = "Thin Binary";
205 | outputPaths = (
206 | );
207 | runOnlyForDeploymentPostprocessing = 0;
208 | shellPath = /bin/sh;
209 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
210 | };
211 | 9740EEB61CF901F6004384FC /* Run Script */ = {
212 | isa = PBXShellScriptBuildPhase;
213 | buildActionMask = 2147483647;
214 | files = (
215 | );
216 | inputPaths = (
217 | );
218 | name = "Run Script";
219 | outputPaths = (
220 | );
221 | runOnlyForDeploymentPostprocessing = 0;
222 | shellPath = /bin/sh;
223 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
224 | };
225 | /* End PBXShellScriptBuildPhase section */
226 |
227 | /* Begin PBXSourcesBuildPhase section */
228 | 97C146EA1CF9000F007C117D /* Sources */ = {
229 | isa = PBXSourcesBuildPhase;
230 | buildActionMask = 2147483647;
231 | files = (
232 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
233 | 97C146F31CF9000F007C117D /* main.m in Sources */,
234 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
235 | );
236 | runOnlyForDeploymentPostprocessing = 0;
237 | };
238 | /* End PBXSourcesBuildPhase section */
239 |
240 | /* Begin PBXVariantGroup section */
241 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
242 | isa = PBXVariantGroup;
243 | children = (
244 | 97C146FB1CF9000F007C117D /* Base */,
245 | );
246 | name = Main.storyboard;
247 | sourceTree = "";
248 | };
249 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
250 | isa = PBXVariantGroup;
251 | children = (
252 | 97C147001CF9000F007C117D /* Base */,
253 | );
254 | name = LaunchScreen.storyboard;
255 | sourceTree = "";
256 | };
257 | /* End PBXVariantGroup section */
258 |
259 | /* Begin XCBuildConfiguration section */
260 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
261 | isa = XCBuildConfiguration;
262 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
263 | buildSettings = {
264 | ALWAYS_SEARCH_USER_PATHS = NO;
265 | CLANG_ANALYZER_NONNULL = YES;
266 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
267 | CLANG_CXX_LIBRARY = "libc++";
268 | CLANG_ENABLE_MODULES = YES;
269 | CLANG_ENABLE_OBJC_ARC = YES;
270 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
271 | CLANG_WARN_BOOL_CONVERSION = YES;
272 | CLANG_WARN_COMMA = YES;
273 | CLANG_WARN_CONSTANT_CONVERSION = YES;
274 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
275 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
276 | CLANG_WARN_EMPTY_BODY = YES;
277 | CLANG_WARN_ENUM_CONVERSION = YES;
278 | CLANG_WARN_INFINITE_RECURSION = YES;
279 | CLANG_WARN_INT_CONVERSION = YES;
280 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
281 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
282 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
283 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
284 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
285 | CLANG_WARN_STRICT_PROTOTYPES = YES;
286 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
287 | CLANG_WARN_UNREACHABLE_CODE = YES;
288 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
289 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
290 | COPY_PHASE_STRIP = NO;
291 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
292 | ENABLE_NS_ASSERTIONS = NO;
293 | ENABLE_STRICT_OBJC_MSGSEND = YES;
294 | GCC_C_LANGUAGE_STANDARD = gnu99;
295 | GCC_NO_COMMON_BLOCKS = YES;
296 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
297 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
298 | GCC_WARN_UNDECLARED_SELECTOR = YES;
299 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
300 | GCC_WARN_UNUSED_FUNCTION = YES;
301 | GCC_WARN_UNUSED_VARIABLE = YES;
302 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
303 | MTL_ENABLE_DEBUG_INFO = NO;
304 | SDKROOT = iphoneos;
305 | TARGETED_DEVICE_FAMILY = "1,2";
306 | VALIDATE_PRODUCT = YES;
307 | };
308 | name = Profile;
309 | };
310 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
311 | isa = XCBuildConfiguration;
312 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
313 | buildSettings = {
314 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
315 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
316 | DEVELOPMENT_TEAM = S8QB4VV633;
317 | ENABLE_BITCODE = NO;
318 | FRAMEWORK_SEARCH_PATHS = (
319 | "$(inherited)",
320 | "$(PROJECT_DIR)/Flutter",
321 | );
322 | INFOPLIST_FILE = Runner/Info.plist;
323 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
324 | LIBRARY_SEARCH_PATHS = (
325 | "$(inherited)",
326 | "$(PROJECT_DIR)/Flutter",
327 | );
328 | PRODUCT_BUNDLE_IDENTIFIER = yy.inc.flutterAnimationSetExample;
329 | PRODUCT_NAME = "$(TARGET_NAME)";
330 | VERSIONING_SYSTEM = "apple-generic";
331 | };
332 | name = Profile;
333 | };
334 | 97C147031CF9000F007C117D /* Debug */ = {
335 | isa = XCBuildConfiguration;
336 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
337 | buildSettings = {
338 | ALWAYS_SEARCH_USER_PATHS = NO;
339 | CLANG_ANALYZER_NONNULL = YES;
340 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
341 | CLANG_CXX_LIBRARY = "libc++";
342 | CLANG_ENABLE_MODULES = YES;
343 | CLANG_ENABLE_OBJC_ARC = YES;
344 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
345 | CLANG_WARN_BOOL_CONVERSION = YES;
346 | CLANG_WARN_COMMA = YES;
347 | CLANG_WARN_CONSTANT_CONVERSION = YES;
348 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
349 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
350 | CLANG_WARN_EMPTY_BODY = YES;
351 | CLANG_WARN_ENUM_CONVERSION = YES;
352 | CLANG_WARN_INFINITE_RECURSION = YES;
353 | CLANG_WARN_INT_CONVERSION = YES;
354 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
355 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
356 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
357 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
358 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
359 | CLANG_WARN_STRICT_PROTOTYPES = YES;
360 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
361 | CLANG_WARN_UNREACHABLE_CODE = YES;
362 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
363 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
364 | COPY_PHASE_STRIP = NO;
365 | DEBUG_INFORMATION_FORMAT = dwarf;
366 | ENABLE_STRICT_OBJC_MSGSEND = YES;
367 | ENABLE_TESTABILITY = YES;
368 | GCC_C_LANGUAGE_STANDARD = gnu99;
369 | GCC_DYNAMIC_NO_PIC = NO;
370 | GCC_NO_COMMON_BLOCKS = YES;
371 | GCC_OPTIMIZATION_LEVEL = 0;
372 | GCC_PREPROCESSOR_DEFINITIONS = (
373 | "DEBUG=1",
374 | "$(inherited)",
375 | );
376 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
377 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
378 | GCC_WARN_UNDECLARED_SELECTOR = YES;
379 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
380 | GCC_WARN_UNUSED_FUNCTION = YES;
381 | GCC_WARN_UNUSED_VARIABLE = YES;
382 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
383 | MTL_ENABLE_DEBUG_INFO = YES;
384 | ONLY_ACTIVE_ARCH = YES;
385 | SDKROOT = iphoneos;
386 | TARGETED_DEVICE_FAMILY = "1,2";
387 | };
388 | name = Debug;
389 | };
390 | 97C147041CF9000F007C117D /* Release */ = {
391 | isa = XCBuildConfiguration;
392 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
393 | buildSettings = {
394 | ALWAYS_SEARCH_USER_PATHS = NO;
395 | CLANG_ANALYZER_NONNULL = YES;
396 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
397 | CLANG_CXX_LIBRARY = "libc++";
398 | CLANG_ENABLE_MODULES = YES;
399 | CLANG_ENABLE_OBJC_ARC = YES;
400 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
401 | CLANG_WARN_BOOL_CONVERSION = YES;
402 | CLANG_WARN_COMMA = YES;
403 | CLANG_WARN_CONSTANT_CONVERSION = YES;
404 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
405 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
406 | CLANG_WARN_EMPTY_BODY = YES;
407 | CLANG_WARN_ENUM_CONVERSION = YES;
408 | CLANG_WARN_INFINITE_RECURSION = YES;
409 | CLANG_WARN_INT_CONVERSION = YES;
410 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
411 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
412 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
413 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
414 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
415 | CLANG_WARN_STRICT_PROTOTYPES = YES;
416 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
417 | CLANG_WARN_UNREACHABLE_CODE = YES;
418 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
419 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
420 | COPY_PHASE_STRIP = NO;
421 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
422 | ENABLE_NS_ASSERTIONS = NO;
423 | ENABLE_STRICT_OBJC_MSGSEND = YES;
424 | GCC_C_LANGUAGE_STANDARD = gnu99;
425 | GCC_NO_COMMON_BLOCKS = YES;
426 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
427 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
428 | GCC_WARN_UNDECLARED_SELECTOR = YES;
429 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
430 | GCC_WARN_UNUSED_FUNCTION = YES;
431 | GCC_WARN_UNUSED_VARIABLE = YES;
432 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
433 | MTL_ENABLE_DEBUG_INFO = NO;
434 | SDKROOT = iphoneos;
435 | TARGETED_DEVICE_FAMILY = "1,2";
436 | VALIDATE_PRODUCT = YES;
437 | };
438 | name = Release;
439 | };
440 | 97C147061CF9000F007C117D /* Debug */ = {
441 | isa = XCBuildConfiguration;
442 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
443 | buildSettings = {
444 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
446 | ENABLE_BITCODE = NO;
447 | FRAMEWORK_SEARCH_PATHS = (
448 | "$(inherited)",
449 | "$(PROJECT_DIR)/Flutter",
450 | );
451 | INFOPLIST_FILE = Runner/Info.plist;
452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
453 | LIBRARY_SEARCH_PATHS = (
454 | "$(inherited)",
455 | "$(PROJECT_DIR)/Flutter",
456 | );
457 | PRODUCT_BUNDLE_IDENTIFIER = yy.inc.flutterAnimationSetExample;
458 | PRODUCT_NAME = "$(TARGET_NAME)";
459 | VERSIONING_SYSTEM = "apple-generic";
460 | };
461 | name = Debug;
462 | };
463 | 97C147071CF9000F007C117D /* Release */ = {
464 | isa = XCBuildConfiguration;
465 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
466 | buildSettings = {
467 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
468 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
469 | ENABLE_BITCODE = NO;
470 | FRAMEWORK_SEARCH_PATHS = (
471 | "$(inherited)",
472 | "$(PROJECT_DIR)/Flutter",
473 | );
474 | INFOPLIST_FILE = Runner/Info.plist;
475 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
476 | LIBRARY_SEARCH_PATHS = (
477 | "$(inherited)",
478 | "$(PROJECT_DIR)/Flutter",
479 | );
480 | PRODUCT_BUNDLE_IDENTIFIER = yy.inc.flutterAnimationSetExample;
481 | PRODUCT_NAME = "$(TARGET_NAME)";
482 | VERSIONING_SYSTEM = "apple-generic";
483 | };
484 | name = Release;
485 | };
486 | /* End XCBuildConfiguration section */
487 |
488 | /* Begin XCConfigurationList section */
489 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
490 | isa = XCConfigurationList;
491 | buildConfigurations = (
492 | 97C147031CF9000F007C117D /* Debug */,
493 | 97C147041CF9000F007C117D /* Release */,
494 | 249021D3217E4FDB00AE95B9 /* Profile */,
495 | );
496 | defaultConfigurationIsVisible = 0;
497 | defaultConfigurationName = Release;
498 | };
499 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
500 | isa = XCConfigurationList;
501 | buildConfigurations = (
502 | 97C147061CF9000F007C117D /* Debug */,
503 | 97C147071CF9000F007C117D /* Release */,
504 | 249021D4217E4FDB00AE95B9 /* Profile */,
505 | );
506 | defaultConfigurationIsVisible = 0;
507 | defaultConfigurationName = Release;
508 | };
509 | /* End XCConfigurationList section */
510 | };
511 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
512 | }
513 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | flutter_animation_set_example
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/example/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_animation_set/animation_set.dart';
3 | import 'package:flutter_animation_set/animator.dart';
4 | import 'package:flutter_animation_set/widget/behavior_animations.dart';
5 | import 'package:flutter_animation_set/widget/transition_animations.dart';
6 |
7 | void main() => runApp(AnimatorSetActivity());
8 |
9 | class AnimatorSetActivity extends StatefulWidget {
10 | @override
11 | State createState() {
12 | return AnimatorSetState();
13 | }
14 | }
15 |
16 | class AnimatorSetState extends State {
17 | @override
18 | Widget build(BuildContext context) {
19 | return MaterialApp(
20 | theme: ThemeData(
21 | primaryColor: Colors.white,
22 | ),
23 | home: Scaffold(
24 | appBar: AppBar(),
25 | body: CustomScrollView(
26 | slivers: [
27 | SliverToBoxAdapter(
28 | child: Padding(
29 | padding: EdgeInsets.all(16.0),
30 | child: Text("Transition Animations"),
31 | ),
32 | ),
33 | SliverGrid.count(
34 | crossAxisCount: 4,
35 | children: [
36 | BoxColor(child: YYRotatingPlane(), color: Color(0xFFD35413)),
37 | BoxColor(child: YYDoubleBounce(), color: Color(0xFF2F3E50)),
38 | BoxColor(child: YYWave(), color: Color(0xFF00BA9B)),
39 | BoxColor(child: YYWanderingCubes(), color: Color(0xFF3279B5)),
40 | BoxColor(child: YYFadingFour(), color: Color(0xFF323232)),
41 | BoxColor(child: YYFadingCube(), color: Color(0xFF58BD60)),
42 | BoxColor(child: YYPulse(), color: Color(0xFF7D8A8B)),
43 | BoxColor(child: YYThreeBounce(), color: Color(0xFFD35413)),
44 | BoxColor(child: YYThreeLine(), color: Color(0xFFF48A8B)),
45 | BoxColor(child: YYCubeGrid(), color: Color(0xFFD35413)),
46 | BoxColor(child: YYRotatingCircle(), color: Color(0xFF3279B5)),
47 | BoxColor(child: YYPumpingHeart(), color: Color(0xFFF4A352)),
48 | BoxColor(child: YYRipple(), color: Color(0xFF58BD60)),
49 | BoxColor(child: YYRotateLine(), color: Color(0xFF00BA9B)),
50 | BoxColor(child: YYCubeFadeIn(), color: Color(0xFFFCCB63)),
51 | BoxColor(child: YYBlinkGrid(), color: Color(0xFF323232)),
52 | ],
53 | ),
54 | SliverToBoxAdapter(
55 | child: Padding(
56 | padding: EdgeInsets.all(16.0),
57 | child: Text("Behavior Animations"),
58 | ),
59 | ),
60 | SliverGrid.count(
61 | crossAxisCount: 4,
62 | children: [
63 | BoxColor(child: YYFadeButton(), color: Color(0xFF3279B5)),
64 | BoxColor(child: YYSingleLike(), color: Color(0xFFF4A352)),
65 | BoxColor(child: YYLove(), color: Color(0xFF2F3E50)),
66 | BoxColor(child: YYSpringMenu(), color: Color(0xFF00BA9B)),
67 | BoxColor(child: YYFoldMenu(), color: Color(0xFF58BD60)),
68 | ],
69 | ),
70 | SliverToBoxAdapter(
71 | child: Padding(
72 | padding: EdgeInsets.all(16.0),
73 | child: Text("Leaning Curves"),
74 | ),
75 | ),
76 | SliverList(
77 | delegate: SliverChildBuilderDelegate(
78 | (BuildContext context, int index) {
79 | return curveBox[index];
80 | },
81 | childCount: curveBox.length,
82 | ),
83 | ),
84 | ],
85 | ),
86 | ),
87 | );
88 | }
89 | }
90 |
91 | var curveBox = [
92 | CurveBox(curve: Curves.linear, str: "linear"),
93 | CurveBox(curve: Curves.bounceIn, str: "bounceIn"),
94 | CurveBox(curve: Curves.bounceInOut, str: "bounceInOut"),
95 | CurveBox(curve: Curves.bounceOut, str: "bounceOut"),
96 | CurveBox(curve: Curves.decelerate, str: "decelerate"),
97 | CurveBox(curve: Curves.ease, str: "ease"),
98 | CurveBox(curve: Curves.easeIn, str: "easeIn"),
99 | CurveBox(curve: Curves.easeInSine, str: "easeInSine"),
100 | CurveBox(curve: Curves.easeInQuad, str: "easeInQuad"),
101 | CurveBox(curve: Curves.easeInCubic, str: "easeInCubic"),
102 | CurveBox(curve: Curves.easeInQuart, str: "easeInQuart"),
103 | CurveBox(curve: Curves.easeInQuint, str: "easeInQuint"),
104 | CurveBox(curve: Curves.easeInExpo, str: "easeInExpo"),
105 | CurveBox(curve: Curves.easeInCirc, str: "easeInCirc"),
106 | CurveBox(curve: Curves.easeInBack, str: "easeInBack"),
107 | CurveBox(curve: Curves.easeInOut, str: "easeInOut"),
108 | CurveBox(curve: Curves.easeInOutSine, str: "easeInOutSine"),
109 | CurveBox(curve: Curves.easeInOutQuad, str: "easeInOutQuad"),
110 | CurveBox(curve: Curves.easeInOutCubic, str: "easeInOutCubic"),
111 | CurveBox(curve: Curves.easeInOutQuart, str: "easeInOutQuart"),
112 | CurveBox(curve: Curves.easeInOutQuint, str: "easeInOutQuint"),
113 | CurveBox(curve: Curves.easeInOutExpo, str: "easeInOutExpo"),
114 | CurveBox(curve: Curves.easeInOutCirc, str: "easeInOutCirc"),
115 | CurveBox(curve: Curves.easeInOutBack, str: "easeInOutBack"),
116 | CurveBox(curve: Curves.easeOut, str: "easeOut"),
117 | CurveBox(curve: Curves.easeOutSine, str: "easeOutSine"),
118 | CurveBox(curve: Curves.easeOutQuad, str: "easeOutQuad"),
119 | CurveBox(curve: Curves.easeOutCubic, str: "easeOutCubic"),
120 | CurveBox(curve: Curves.easeOutQuart, str: "easeOutQuart"),
121 | CurveBox(curve: Curves.easeOutQuint, str: "easeOutQuint"),
122 | CurveBox(curve: Curves.easeOutExpo, str: "easeOutExpo"),
123 | CurveBox(curve: Curves.easeOutCirc, str: "easeOutCirc"),
124 | CurveBox(curve: Curves.easeOutBack, str: "easeOutBack"),
125 | CurveBox(curve: Curves.elasticIn, str: "elasticIn"),
126 | CurveBox(curve: Curves.elasticInOut, str: "elasticInOut"),
127 | CurveBox(curve: Curves.elasticOut, str: "elasticOut"),
128 | CurveBox(curve: Curves.fastOutSlowIn, str: "fastOutSlowIn"),
129 | CurveBox(curve: Curves.fastLinearToSlowEaseIn, str: "fastLinearToSlowEaseIn"),
130 | CurveBox(curve: Curves.slowMiddle, str: "slowMiddle"),
131 | ];
132 |
133 | class BoxColor extends StatefulWidget {
134 | BoxColor({this.child, this.color = Colors.black});
135 |
136 | final child;
137 | final color;
138 |
139 | @override
140 | State createState() {
141 | return BoxColorState();
142 | }
143 | }
144 |
145 | class BoxColorState extends State {
146 | @override
147 | Widget build(BuildContext context) {
148 | return Center(
149 | child: Container(
150 | padding: EdgeInsets.all(30),
151 | child: widget.child,
152 | color: widget.color,
153 | ),
154 | );
155 | }
156 | }
157 |
158 | class CurveBox extends StatefulWidget {
159 | CurveBox({this.curve, this.str});
160 |
161 | final curve;
162 | final str;
163 |
164 | @override
165 | State createState() {
166 | return CurveBoxState();
167 | }
168 | }
169 |
170 | class CurveBoxState extends State {
171 | @override
172 | Widget build(BuildContext context) {
173 | var _screenWidth = MediaQuery.of(context).size.width;
174 | return Card(
175 | shape: RoundedRectangleBorder(
176 | borderRadius: BorderRadius.all(Radius.circular(12.0))),
177 | color: Colors.red,
178 | child: Padding(
179 | padding: EdgeInsets.all(10.0),
180 | child: Column(
181 | crossAxisAlignment: CrossAxisAlignment.start,
182 | mainAxisAlignment: MainAxisAlignment.start,
183 | children: [
184 | makeCurvesTitleBox(_screenWidth, widget.str),
185 | makeCurvesCube(_screenWidth, 0, widget.curve),
186 | makeCurvesCube(_screenWidth, 100, widget.curve),
187 | makeCurvesCube(_screenWidth, 200, widget.curve),
188 | makeCurvesCube(_screenWidth, 300, widget.curve),
189 | makeCurvesCube(_screenWidth, 400, widget.curve),
190 | Divider(height: 10, color: Colors.white)
191 | ],
192 | ),
193 | ));
194 | }
195 | }
196 |
197 | Widget makeCurvesTitleBox(width, text) {
198 | return SizedBox(
199 | width: width,
200 | height: 15,
201 | child: Text(
202 | text.toString(),
203 | style: TextStyle(color: Colors.white, fontSize: 12),
204 | ),
205 | );
206 | }
207 |
208 | Widget makeCurvesCube(width, delay, curve) {
209 | return AnimatorSet(
210 | child: SizedBox(
211 | child: Container(
212 | color: Colors.white,
213 | width: 20,
214 | height: 20,
215 | ),
216 | ),
217 | animatorSet: [
218 | TX(
219 | delay: delay,
220 | duration: 2000,
221 | from: 0.0,
222 | to: width - 50,
223 | curve: curve,
224 | )
225 | ],
226 | );
227 | }
228 |
--------------------------------------------------------------------------------
/example/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.3.0"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "1.0.5"
18 | charcode:
19 | dependency: transitive
20 | description:
21 | name: charcode
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.2"
25 | collection:
26 | dependency: transitive
27 | description:
28 | name: collection
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.14.11"
32 | cupertino_icons:
33 | dependency: "direct main"
34 | description:
35 | name: cupertino_icons
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "0.1.2"
39 | flutter:
40 | dependency: "direct main"
41 | description: flutter
42 | source: sdk
43 | version: "0.0.0"
44 | flutter_animation_set:
45 | dependency: "direct dev"
46 | description:
47 | path: ".."
48 | relative: true
49 | source: path
50 | version: "0.0.3"
51 | flutter_test:
52 | dependency: "direct dev"
53 | description: flutter
54 | source: sdk
55 | version: "0.0.0"
56 | matcher:
57 | dependency: transitive
58 | description:
59 | name: matcher
60 | url: "https://pub.dartlang.org"
61 | source: hosted
62 | version: "0.12.5"
63 | meta:
64 | dependency: transitive
65 | description:
66 | name: meta
67 | url: "https://pub.dartlang.org"
68 | source: hosted
69 | version: "1.1.7"
70 | path:
71 | dependency: transitive
72 | description:
73 | name: path
74 | url: "https://pub.dartlang.org"
75 | source: hosted
76 | version: "1.6.4"
77 | pedantic:
78 | dependency: transitive
79 | description:
80 | name: pedantic
81 | url: "https://pub.dartlang.org"
82 | source: hosted
83 | version: "1.8.0+1"
84 | quiver:
85 | dependency: transitive
86 | description:
87 | name: quiver
88 | url: "https://pub.dartlang.org"
89 | source: hosted
90 | version: "2.0.5"
91 | sky_engine:
92 | dependency: transitive
93 | description: flutter
94 | source: sdk
95 | version: "0.0.99"
96 | source_span:
97 | dependency: transitive
98 | description:
99 | name: source_span
100 | url: "https://pub.dartlang.org"
101 | source: hosted
102 | version: "1.5.5"
103 | stack_trace:
104 | dependency: transitive
105 | description:
106 | name: stack_trace
107 | url: "https://pub.dartlang.org"
108 | source: hosted
109 | version: "1.9.3"
110 | stream_channel:
111 | dependency: transitive
112 | description:
113 | name: stream_channel
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "2.0.0"
117 | string_scanner:
118 | dependency: transitive
119 | description:
120 | name: string_scanner
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "1.0.5"
124 | term_glyph:
125 | dependency: transitive
126 | description:
127 | name: term_glyph
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "1.1.0"
131 | test_api:
132 | dependency: transitive
133 | description:
134 | name: test_api
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "0.2.5"
138 | typed_data:
139 | dependency: transitive
140 | description:
141 | name: typed_data
142 | url: "https://pub.dartlang.org"
143 | source: hosted
144 | version: "1.1.6"
145 | vector_math:
146 | dependency: transitive
147 | description:
148 | name: vector_math
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "2.0.8"
152 | sdks:
153 | dart: ">=2.2.2 <3.0.0"
154 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_animation_set_example
2 | description: Demonstrates how to use the flutter_animation_set plugin.
3 | publish_to: 'none'
4 |
5 | environment:
6 | sdk: ">=2.1.0 <3.0.0"
7 |
8 | dependencies:
9 | flutter:
10 | sdk: flutter
11 |
12 | # The following adds the Cupertino Icons font to your application.
13 | # Use with the CupertinoIcons class for iOS style icons.
14 | cupertino_icons: ^0.1.2
15 |
16 | dev_dependencies:
17 | flutter_test:
18 | sdk: flutter
19 |
20 | flutter_animation_set:
21 | path: ../
22 |
23 | # For information on the generic Dart part of this file, see the
24 | # following page: https://dart.dev/tools/pub/pubspec
25 |
26 | # The following section is specific to Flutter.
27 | flutter:
28 |
29 | # The following line ensures that the Material Icons font is
30 | # included with your application, so that you can use the icons in
31 | # the material Icons class.
32 | uses-material-design: true
33 |
34 | # To add assets to your application, add an assets section, like this:
35 | # assets:
36 | # - images/a_dot_burr.jpeg
37 | # - images/a_dot_ham.jpeg
38 |
39 | # An image asset can refer to one or more resolution-specific "variants", see
40 | # https://flutter.dev/assets-and-images/#resolution-aware.
41 |
42 | # For details regarding adding assets from package dependencies, see
43 | # https://flutter.dev/assets-and-images/#from-packages
44 |
45 | # To add custom fonts to your application, add a fonts section here,
46 | # in this "flutter" section. Each entry in this list should have a
47 | # "family" key with the font family name, and a "fonts" key with a
48 | # list giving the asset and other descriptors for the font. For
49 | # example:
50 | # fonts:
51 | # - family: Schyler
52 | # fonts:
53 | # - asset: fonts/Schyler-Regular.ttf
54 | # - asset: fonts/Schyler-Italic.ttf
55 | # style: italic
56 | # - family: Trajan Pro
57 | # fonts:
58 | # - asset: fonts/TrajanPro.ttf
59 | # - asset: fonts/TrajanPro_Bold.ttf
60 | # weight: 700
61 | #
62 | # For details regarding fonts from package dependencies,
63 | # see https://flutter.dev/custom-fonts/#from-packages
64 |
--------------------------------------------------------------------------------
/example/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 |
9 |
10 | void main() {}
11 |
--------------------------------------------------------------------------------
/flutter_animation_set.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/image/gif/1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/1.gif
--------------------------------------------------------------------------------
/image/gif/10.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/10.gif
--------------------------------------------------------------------------------
/image/gif/11.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/11.gif
--------------------------------------------------------------------------------
/image/gif/12.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/12.gif
--------------------------------------------------------------------------------
/image/gif/13.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/13.gif
--------------------------------------------------------------------------------
/image/gif/14.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/14.gif
--------------------------------------------------------------------------------
/image/gif/15.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/15.gif
--------------------------------------------------------------------------------
/image/gif/16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/16.gif
--------------------------------------------------------------------------------
/image/gif/17.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/17.gif
--------------------------------------------------------------------------------
/image/gif/18.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/18.gif
--------------------------------------------------------------------------------
/image/gif/19.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/19.gif
--------------------------------------------------------------------------------
/image/gif/2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/2.gif
--------------------------------------------------------------------------------
/image/gif/20.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/20.gif
--------------------------------------------------------------------------------
/image/gif/21.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/21.gif
--------------------------------------------------------------------------------
/image/gif/3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/3.gif
--------------------------------------------------------------------------------
/image/gif/4.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/4.gif
--------------------------------------------------------------------------------
/image/gif/5.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/5.gif
--------------------------------------------------------------------------------
/image/gif/6.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/6.gif
--------------------------------------------------------------------------------
/image/gif/7.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/7.gif
--------------------------------------------------------------------------------
/image/gif/8.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/8.gif
--------------------------------------------------------------------------------
/image/gif/9.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/gif/9.gif
--------------------------------------------------------------------------------
/image/readme/YYWave.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/readme/YYWave.png
--------------------------------------------------------------------------------
/image/readme/screenShot1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/readme/screenShot1.jpg
--------------------------------------------------------------------------------
/image/readme/screenShot2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/readme/screenShot2.png
--------------------------------------------------------------------------------
/image/readme/screenShot3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/readme/screenShot3.png
--------------------------------------------------------------------------------
/image/readme/screenShot4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/image/readme/screenShot4.png
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .vagrant/
3 | .sconsign.dblite
4 | .svn/
5 |
6 | .DS_Store
7 | *.swp
8 | profile
9 |
10 | DerivedData/
11 | build/
12 | GeneratedPluginRegistrant.h
13 | GeneratedPluginRegistrant.m
14 |
15 | .generated/
16 |
17 | *.pbxuser
18 | *.mode1v3
19 | *.mode2v3
20 | *.perspectivev3
21 |
22 | !default.pbxuser
23 | !default.mode1v3
24 | !default.mode2v3
25 | !default.perspectivev3
26 |
27 | xcuserdata
28 |
29 | *.moved-aside
30 |
31 | *.pyc
32 | *sync/
33 | Icon?
34 | .tags*
35 |
36 | /Flutter/Generated.xcconfig
37 |
--------------------------------------------------------------------------------
/ios/Assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YYFlutter/flutter-animation-set/c02c625a53383ee01aff4eafa2a873746544a46e/ios/Assets/.gitkeep
--------------------------------------------------------------------------------
/ios/Classes/FlutterAnimationSetPlugin.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface FlutterAnimationSetPlugin : NSObject
4 | @end
5 |
--------------------------------------------------------------------------------
/ios/Classes/FlutterAnimationSetPlugin.m:
--------------------------------------------------------------------------------
1 | #import "FlutterAnimationSetPlugin.h"
2 |
3 | @implementation FlutterAnimationSetPlugin
4 | + (void)registerWithRegistrar:(NSObject*)registrar {
5 | FlutterMethodChannel* channel = [FlutterMethodChannel
6 | methodChannelWithName:@"flutter_animation_set"
7 | binaryMessenger:[registrar messenger]];
8 | FlutterAnimationSetPlugin* instance = [[FlutterAnimationSetPlugin alloc] init];
9 | [registrar addMethodCallDelegate:instance channel:channel];
10 | }
11 |
12 | - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
13 | if ([@"getPlatformVersion" isEqualToString:call.method]) {
14 | result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
15 | } else {
16 | result(FlutterMethodNotImplemented);
17 | }
18 | }
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/ios/flutter_animation_set.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
3 | #
4 | Pod::Spec.new do |s|
5 | s.name = 'flutter_animation_set'
6 | s.version = '0.0.1'
7 | s.summary = 'A new flutter plugin project.'
8 | s.description = <<-DESC
9 | A new flutter plugin project.
10 | DESC
11 | s.homepage = 'http://example.com'
12 | s.license = { :file => '../LICENSE' }
13 | s.author = { 'Your Company' => 'email@example.com' }
14 | s.source = { :path => '.' }
15 | s.source_files = 'Classes/**/*'
16 | s.public_header_files = 'Classes/**/*.h'
17 | s.dependency 'Flutter'
18 |
19 | s.ios.deployment_target = '8.0'
20 | end
21 |
22 |
--------------------------------------------------------------------------------
/lib/animation_set.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'animator.dart';
4 |
5 | export 'package:flutter_animation_set/animation_set.dart'
6 | show AnimatorSet, AnimationType;
7 |
8 | enum AnimationType {
9 | repeat,
10 | reverse,
11 | once,
12 | }
13 |
14 | class AnimatorSet extends StatefulWidget {
15 | AnimatorSet({
16 | Key key,
17 | this.debug = false,
18 | this.child,
19 | this.animatorSet = const [],
20 | this.animationType = AnimationType.repeat,
21 | }) : assert(child != null),
22 | assert(animatorSet != null),
23 | super(key: key);
24 |
25 | final bool debug;
26 | final Widget child;
27 | final List animatorSet;
28 | final AnimationType animationType;
29 |
30 | @override
31 | State createState() {
32 | return AnimatorSetState();
33 | }
34 | }
35 |
36 | class AnimatorSetState extends State
37 | with SingleTickerProviderStateMixin {
38 | int _duration = 0; //时间
39 | AnimationController _controller;
40 | AnimationType _animationType;
41 |
42 | @override
43 | void initState() {
44 | super.initState();
45 |
46 | _animationType = widget.animationType;
47 |
48 | for (var anim in widget.animatorSet) {
49 | _duration += anim.duration;
50 | }
51 |
52 | _controller = AnimationController(
53 | duration: Duration(milliseconds: _duration),
54 | vsync: this,
55 | );
56 |
57 | initAnimation();
58 | startAnimation();
59 | }
60 |
61 | void initAnimation() {
62 | _controller
63 | ..addListener(() {})
64 | ..addStatusListener((AnimationStatus status) {
65 | if (_animationType == AnimationType.reverse) {
66 | if (status == AnimationStatus.completed) {
67 | _controller.reverse();
68 | } else if (status == AnimationStatus.dismissed) {
69 | _controller.forward();
70 | }
71 | }
72 | });
73 | }
74 |
75 | void startAnimation() {
76 | if (_animationType == AnimationType.repeat) {
77 | _controller.repeat();
78 | } else {
79 | _controller.forward();
80 | }
81 | }
82 |
83 | @override
84 | Widget build(BuildContext context) {
85 | return AnimatedLogo(
86 | debug: widget.debug,
87 | child: widget.child,
88 | controller: _controller,
89 | animatorSet: widget.animatorSet,
90 | duration: _duration);
91 | }
92 |
93 | @override
94 | void dispose() {
95 | _controller.dispose();
96 | super.dispose();
97 | }
98 | }
99 |
100 | class AnimatedLogo extends StatelessWidget {
101 | ///opacityNotify:监听透明度变化,将正在变化的动画值作为opacityValue
102 | ///opacity:透明度动画集合
103 | ///opacityValue:最终显示的透明度
104 | List> opacityNotify = List()..length = 16;
105 | List> opacity = List()..length = 16;
106 | double opacityValue;
107 |
108 | Animation width;
109 | Animation height;
110 | Animation padding;
111 | Animation borderRadius;
112 | Animation color;
113 | List> scaleX = [null, null, null, null];
114 | List> scaleY = [null, null, null, null];
115 | List> rotateX = [null, null, null, null];
116 | List> rotateY = [null, null, null, null];
117 | List> rotateZ = [null, null, null, null];
118 | List> transX = [null, null, null, null];
119 | List> transY = [null, null, null, null];
120 |
121 | AnimatedLogo({
122 | Key key,
123 | this.debug,
124 | this.child,
125 | this.controller,
126 | this.animatorSet,
127 | this.duration,
128 | }) : super(key: key) {
129 | this._parseAnimation();
130 | this._initOpacityListener();
131 | }
132 |
133 | final bool debug;
134 | final Widget child;
135 | final Animation controller;
136 | final List animatorSet;
137 | final int duration;
138 |
139 | ///解析交错动画
140 | void _parseAnimation() {
141 | double start = 0.0;
142 | double end = 0.0;
143 |
144 | for (var anim in animatorSet) {
145 | start = anim.delay / duration + end; //延时+上次结束
146 | end = start + anim.duration / duration; //上次开始+时长
147 |
148 | if (debug) {
149 | print("duration=" +
150 | duration.toString() +
151 | " anim.duration=" +
152 | anim.duration.toString() +
153 | " anim.delay=" +
154 | anim.delay.toString() +
155 | " start=" +
156 | start.toString() +
157 | " end=" +
158 | end.toString());
159 | }
160 |
161 | if (anim is Serial) {
162 | ///并行动画处理
163 | List serialList = anim.serialList;
164 | serialList.forEach((Animator anim2) {
165 | double tempStart = start + anim.delay / duration;
166 | _parseAnimation2(anim2, tempStart, end);
167 | });
168 | } else {
169 | ///串行动画处理
170 | _parseAnimation2(anim, start, end);
171 | }
172 | }
173 | }
174 |
175 | void _parseAnimation2(Animator anim, double start, double end) {
176 | _parseAnimationItem(
177 | anim,
178 | start <= 0.0 ? 0.001 : start,
179 | end >= 1.0 ? 0.999 : end,
180 | );
181 | }
182 |
183 | ///透明度变化监听
184 | void _initOpacityListener() {
185 | ///默认的透明度,以第一个透明度动画的初始值为准
186 | opacityValue = opacity[0]?.value ?? 1.0;
187 | for (int i = 0; i < opacityNotify.length; i++) {
188 | if (opacityNotify[i] != null) {
189 | ///监听透明度变化
190 | opacityNotify[i].addListener(() {
191 | opacityValue = opacity[i].value;
192 | });
193 | }
194 | }
195 | }
196 |
197 | @override
198 | Widget build(BuildContext context) {
199 | return AnimatedBuilder(
200 | builder: _buildAnimationWidget, // 动画变化时调用这个函数
201 | animation: controller, // 要执行的动画
202 | );
203 | }
204 |
205 | Widget _buildAnimationWidget(BuildContext context, Widget child) {
206 | return Container(
207 | padding: padding?.value ?? EdgeInsets.all(0), // 内边距动画
208 | child: Transform(
209 | alignment: Alignment.center,
210 | transform: Matrix4.identity()
211 | ..translate(transX[0]?.value ?? 0.0, transY[0]?.value ?? 0.0)
212 | ..translate(transX[1]?.value ?? 0.0, transY[1]?.value ?? 0.0)
213 | ..translate(transX[2]?.value ?? 0.0, transY[2]?.value ?? 0.0)
214 | ..translate(transX[3]?.value ?? 0.0, transY[3]?.value ?? 0.0),
215 | child: Transform(
216 | alignment: Alignment.center,
217 | transform: Matrix4.identity()
218 | ..scale(scaleX[0]?.value ?? 1.0, scaleY[0]?.value ?? 1.0)
219 | ..scale(scaleX[1]?.value ?? 1.0, scaleY[1]?.value ?? 1.0)
220 | ..scale(scaleX[2]?.value ?? 1.0, scaleY[2]?.value ?? 1.0)
221 | ..scale(scaleX[3]?.value ?? 1.0, scaleY[3]?.value ?? 1.0),
222 | child: Transform(
223 | alignment: Alignment.center,
224 | transform: Matrix4.identity()
225 | ..rotateX(rotateX[0]?.value ?? 0.0)
226 | ..rotateX(rotateX[1]?.value ?? 0.0)
227 | ..rotateX(rotateX[2]?.value ?? 0.0)
228 | ..rotateX(rotateX[3]?.value ?? 0.0)
229 | ..rotateY(rotateY[0]?.value ?? 0.0)
230 | ..rotateY(rotateY[1]?.value ?? 0.0)
231 | ..rotateY(rotateY[2]?.value ?? 0.0)
232 | ..rotateY(rotateY[3]?.value ?? 0.0)
233 | ..rotateZ(rotateZ[0]?.value ?? 0.0)
234 | ..rotateZ(rotateZ[1]?.value ?? 0.0)
235 | ..rotateZ(rotateZ[2]?.value ?? 0.0)
236 | ..rotateZ(rotateZ[3]?.value ?? 0.0),
237 | child: Opacity(
238 | opacity: opacityValue,
239 | child: Container(
240 | child: this.child,
241 | width: width?.value ?? null,
242 | height: height?.value ?? null,
243 | decoration: BoxDecoration(
244 | color: color?.value ?? Colors.transparent,
245 | borderRadius: borderRadius?.value ?? BorderRadius.circular(0),
246 | ),
247 | ),
248 | ),
249 | ),
250 | ),
251 | ),
252 | );
253 | }
254 |
255 | ///解析动画每帧动画
256 | void _parseAnimationItem(Animator anim, double start, double end) {
257 | if (debug) {
258 | print("anim = " +
259 | anim.toString() +
260 | "| anim.from = " +
261 | anim.from.toString() +
262 | "| anim.to = " +
263 | anim.to.toString() +
264 | "| start = " +
265 | start.toString() +
266 | "| end = " +
267 | end.toString());
268 | }
269 |
270 | if (anim is W) {
271 | width = Tween(
272 | begin: anim.from,
273 | end: anim.to,
274 | ).animate(
275 | CurvedAnimation(
276 | parent: controller,
277 | curve: Interval(
278 | start,
279 | end,
280 | curve: anim.curve,
281 | ),
282 | ),
283 | );
284 | } else if (anim is H) {
285 | height = Tween(
286 | begin: anim.from,
287 | end: anim.to,
288 | ).animate(
289 | CurvedAnimation(
290 | parent: controller,
291 | curve: Interval(
292 | start,
293 | end,
294 | curve: anim.curve,
295 | ),
296 | ),
297 | );
298 | } else if (anim is P) {
299 | padding = EdgeInsetsTween(
300 | begin: anim.from,
301 | end: anim.to,
302 | ).animate(
303 | CurvedAnimation(
304 | parent: controller,
305 | curve: Interval(
306 | start,
307 | end,
308 | curve: anim.curve,
309 | ),
310 | ),
311 | );
312 | } else if (anim is O) {
313 | for (int i = 0; i < opacity.length; i++) {
314 | if (opacity[i] == null) {
315 | opacityNotify[i] = ValueNotifier(anim.from);
316 | opacity[i] = Tween(
317 | begin: anim.from,
318 | end: anim.to,
319 | ).animate(
320 | CurvedAnimation(
321 | parent: controller,
322 | curve: Interval(
323 | start,
324 | end,
325 | curve: anim.curve,
326 | ),
327 | ),
328 | )..addListener(() {
329 | ///由于在播放完成后会回到初始值,需要过滤掉
330 | if (opacity[i].value != anim.from) {
331 | opacityNotify[i].value = opacity[i].value;
332 | }
333 | });
334 | break;
335 | }
336 | }
337 | } else if (anim is SX) {
338 | for (int i = 0; i < scaleX.length; i++) {
339 | if (scaleX[i] == null) {
340 | scaleX[i] = Tween(
341 | begin: anim.from,
342 | end: anim.to,
343 | ).animate(
344 | CurvedAnimation(
345 | parent: controller,
346 | curve: Interval(
347 | start,
348 | end,
349 | curve: anim.curve,
350 | ),
351 | ),
352 | );
353 | break;
354 | }
355 | }
356 | } else if (anim is SY) {
357 | for (int i = 0; i < scaleY.length; i++) {
358 | if (scaleY[i] == null) {
359 | scaleY[i] = Tween(
360 | begin: anim.from,
361 | end: anim.to,
362 | ).animate(
363 | CurvedAnimation(
364 | parent: controller,
365 | curve: Interval(
366 | start,
367 | end,
368 | curve: anim.curve,
369 | ),
370 | ),
371 | );
372 | break;
373 | }
374 | }
375 | } else if (anim is RX) {
376 | for (int i = 0; i < rotateX.length; i++) {
377 | if (rotateX[i] == null) {
378 | rotateX[i] = Tween(
379 | begin: anim.from,
380 | end: anim.to,
381 | ).animate(
382 | CurvedAnimation(
383 | parent: controller,
384 | curve: Interval(
385 | start,
386 | end,
387 | curve: anim.curve,
388 | ),
389 | ),
390 | );
391 | break;
392 | }
393 | }
394 | } else if (anim is RY) {
395 | for (int i = 0; i < rotateY.length; i++) {
396 | if (rotateY[i] == null) {
397 | rotateY[i] = Tween(
398 | begin: anim.from,
399 | end: anim.to,
400 | ).animate(
401 | CurvedAnimation(
402 | parent: controller,
403 | curve: Interval(
404 | start,
405 | end,
406 | curve: anim.curve,
407 | ),
408 | ),
409 | );
410 | break;
411 | }
412 | }
413 | } else if (anim is RZ) {
414 | for (int i = 0; i < rotateZ.length; i++) {
415 | if (rotateZ[i] == null) {
416 | rotateZ[i] = Tween(
417 | begin: anim.from,
418 | end: anim.to,
419 | ).animate(
420 | CurvedAnimation(
421 | parent: controller,
422 | curve: Interval(
423 | start,
424 | end,
425 | curve: anim.curve,
426 | ),
427 | ),
428 | );
429 | break;
430 | }
431 | }
432 | } else if (anim is TX) {
433 | for (int i = 0; i < transX.length; i++) {
434 | if (transX[i] == null) {
435 | transX[i] = Tween(
436 | begin: anim.from,
437 | end: anim.to,
438 | ).animate(
439 | CurvedAnimation(
440 | parent: controller,
441 | curve: Interval(
442 | start,
443 | end,
444 | curve: anim.curve,
445 | ),
446 | ),
447 | );
448 | break;
449 | }
450 | }
451 | } else if (anim is TY) {
452 | for (int i = 0; i < transY.length; i++) {
453 | if (transY[i] == null) {
454 | transY[i] = Tween(
455 | begin: anim.from,
456 | end: anim.to,
457 | ).animate(
458 | CurvedAnimation(
459 | parent: controller,
460 | curve: Interval(
461 | start,
462 | end,
463 | curve: anim.curve,
464 | ),
465 | ),
466 | );
467 | break;
468 | }
469 | }
470 | } else if (anim is C) {
471 | color = ColorTween(
472 | begin: anim.from,
473 | end: anim.to,
474 | ).animate(
475 | CurvedAnimation(
476 | parent: controller,
477 | curve: Interval(
478 | start,
479 | end,
480 | curve: anim.curve,
481 | ),
482 | ),
483 | );
484 | } else if (anim is B) {
485 | borderRadius = BorderRadiusTween(
486 | begin: anim.from,
487 | end: anim.to,
488 | ).animate(
489 | CurvedAnimation(
490 | parent: controller,
491 | curve: Interval(
492 | start,
493 | end,
494 | curve: anim.curve,
495 | ),
496 | ),
497 | );
498 | }
499 | }
500 | }
501 |
--------------------------------------------------------------------------------
/lib/animator.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | export 'package:flutter_animation_set/animator.dart';
4 |
5 | abstract class Animator {
6 | T from;
7 | T to;
8 | int duration;
9 | int delay;
10 | Curve curve;
11 | }
12 |
13 | class Serial extends Animator {
14 | Serial({
15 | this.duration = 0,
16 |
17 | /// 无效,用Delay组件替代
18 | this.delay = 0,
19 | this.serialList = const [],
20 | });
21 |
22 | int duration;
23 | int delay;
24 | List serialList;
25 | }
26 |
27 | class W extends Animator {
28 | W({
29 | this.from,
30 | this.to,
31 | this.duration = 0,
32 | this.delay = 0,
33 | this.curve = Curves.linear,
34 | });
35 |
36 | double from;
37 | double to;
38 | int duration;
39 | int delay;
40 | Curve curve;
41 | }
42 |
43 | class H extends Animator {
44 | H({
45 | this.from,
46 | this.to,
47 | this.duration = 0,
48 | this.delay = 0,
49 | this.curve = Curves.linear,
50 | });
51 |
52 | double from;
53 | double to;
54 | int duration;
55 | int delay;
56 | Curve curve;
57 | }
58 |
59 | class P extends Animator {
60 | P({
61 | this.from,
62 | this.to,
63 | this.duration = 0,
64 | this.delay = 0,
65 | this.curve = Curves.linear,
66 | });
67 |
68 | EdgeInsets from;
69 | EdgeInsets to;
70 | int duration;
71 | int delay;
72 | Curve curve;
73 | }
74 |
75 | class O extends Animator {
76 | O({
77 | this.from,
78 | this.to,
79 | this.duration = 0,
80 | this.delay = 0,
81 | this.curve = Curves.linear,
82 | });
83 |
84 | double from;
85 | double to;
86 | int duration;
87 | int delay;
88 | Curve curve;
89 | }
90 |
91 | class SX extends Animator {
92 | SX({
93 | this.from,
94 | this.to,
95 | this.duration = 0,
96 | this.delay = 0,
97 | this.curve = Curves.linear,
98 | });
99 |
100 | double from;
101 | double to;
102 | int duration;
103 | int delay;
104 | Curve curve;
105 | }
106 |
107 | class SY extends Animator {
108 | SY({
109 | this.from,
110 | this.to,
111 | this.duration = 0,
112 | this.delay = 0,
113 | this.curve = Curves.linear,
114 | });
115 |
116 | double from;
117 | double to;
118 | int duration;
119 | int delay;
120 | Curve curve;
121 | }
122 |
123 | class RX extends Animator {
124 | RX({
125 | this.from,
126 | this.to,
127 | this.duration = 0,
128 | this.delay = 0,
129 | this.curve = Curves.linear,
130 | });
131 |
132 | double from;
133 | double to;
134 | int duration;
135 | int delay;
136 | Curve curve;
137 | }
138 |
139 | class RY extends Animator {
140 | RY({
141 | this.from,
142 | this.to,
143 | this.duration = 0,
144 | this.delay = 0,
145 | this.curve = Curves.linear,
146 | });
147 |
148 | double from;
149 | double to;
150 | int duration;
151 | int delay;
152 | Curve curve;
153 | }
154 |
155 | class RZ extends Animator {
156 | RZ({
157 | this.from,
158 | this.to,
159 | this.duration = 0,
160 | this.delay = 0,
161 | this.curve = Curves.linear,
162 | });
163 |
164 | double from;
165 | double to;
166 | int duration;
167 | int delay;
168 | Curve curve;
169 | }
170 |
171 | class TX extends Animator {
172 | TX({
173 | this.from,
174 | this.to,
175 | this.duration = 0,
176 | this.delay = 0,
177 | this.curve = Curves.linear,
178 | });
179 |
180 | double from;
181 | double to;
182 | int duration;
183 | int delay;
184 | Curve curve;
185 | }
186 |
187 | class TY extends Animator {
188 | TY({
189 | this.from,
190 | this.to,
191 | this.duration = 0,
192 | this.delay = 0,
193 | this.curve = Curves.linear,
194 | });
195 |
196 | double from;
197 | double to;
198 | int duration;
199 | int delay;
200 | Curve curve;
201 | }
202 |
203 | class C extends Animator {
204 | C({
205 | this.from,
206 | this.to,
207 | this.duration = 0,
208 | this.delay = 0,
209 | this.curve = Curves.linear,
210 | });
211 |
212 | Color from;
213 | Color to;
214 | int duration;
215 | int delay;
216 | Curve curve;
217 | }
218 |
219 | class B extends Animator {
220 | B({
221 | this.from,
222 | this.to,
223 | this.duration = 0,
224 | this.delay = 0,
225 | this.curve = Curves.linear,
226 | });
227 |
228 | BorderRadius from;
229 | BorderRadius to;
230 | int duration;
231 | int delay;
232 | Curve curve;
233 | }
234 |
235 | class Delay extends Animator {
236 | Delay({
237 | this.duration = 0,
238 |
239 | /// 无效
240 | this.delay = 0,
241 | });
242 |
243 | int duration;
244 | int delay;
245 | }
246 |
--------------------------------------------------------------------------------
/lib/widget/behavior_animations.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/widgets.dart';
3 |
4 | import '../animation_set.dart';
5 | import '../animator.dart';
6 |
7 | export 'package:flutter_animation_set/widget/behavior_animations.dart';
8 |
9 | class YYFadeButton extends StatelessWidget {
10 | @override
11 | Widget build(BuildContext context) {
12 | return Container(
13 | width: 40,
14 | height: 40,
15 | alignment: Alignment.bottomCenter,
16 | child: AnimatorSet(
17 | child: Container(
18 | width: 40,
19 | height: 20,
20 | alignment: Alignment.center,
21 | child: Text(
22 | "确定",
23 | style: TextStyle(
24 | color: Colors.white,
25 | fontSize: 10,
26 | ),
27 | ),
28 | ),
29 | animatorSet: [
30 | Serial(
31 | duration: 1000,
32 | serialList: [
33 | O(from: 0.2, to: 1.0),
34 | TY(from: 0.0, to: 10.0),
35 | C(from: Colors.white, to: Colors.red[400]),
36 | B(
37 | from: BorderRadius.circular(0.0),
38 | to: BorderRadius.circular(10.0),
39 | ),
40 | ],
41 | ),
42 | Delay(duration: 2000),
43 | ],
44 | ),
45 | );
46 | }
47 | }
48 |
49 | class YYSingleLike extends StatelessWidget {
50 | @override
51 | Widget build(BuildContext context) {
52 | return Container(
53 | alignment: Alignment.bottomCenter,
54 | width: 40,
55 | height: 40,
56 | child: AnimatorSet(
57 | child: Icon(
58 | Icons.favorite,
59 | color: Colors.white,
60 | size: 20,
61 | ),
62 | animatorSet: [
63 | Serial(
64 | duration: 2400,
65 | serialList: [
66 | O(from: 1.0, to: 0.0),
67 | SX(from: 0.4, to: 1.5),
68 | SY(from: 0.4, to: 1.5),
69 | TY(from: 0.0, to: -30.0, curve: Curves.fastOutSlowIn),
70 | ],
71 | ),
72 | ],
73 | ),
74 | );
75 | }
76 | }
77 |
78 | class YYLove extends StatelessWidget {
79 | @override
80 | Widget build(BuildContext context) {
81 | return Container(
82 | width: 40,
83 | height: 40,
84 | child: Stack(
85 | alignment: Alignment.center,
86 | children: [
87 | AnimatorSet(
88 | child: Icon(
89 | Icons.favorite,
90 | color: Colors.white,
91 | size: 30,
92 | ),
93 | animatorSet: [
94 | Serial(duration: 1000, serialList: [
95 | SX(from: 0.0, to: 1.0, curve: Curves.bounceInOut),
96 | SY(from: 0.0, to: 1.0, curve: Curves.bounceInOut),
97 | ]),
98 | Delay(duration: 500),
99 | ],
100 | ),
101 | makeLove(10, 20, Curves.fastOutSlowIn),
102 | makeLove(-10, 20, Curves.fastOutSlowIn),
103 | makeLove(20, 0, Curves.fastOutSlowIn),
104 | makeLove(-20, 0, Curves.fastOutSlowIn),
105 | makeLove(-10, -20, Curves.fastOutSlowIn),
106 | makeLove(10, -20, Curves.fastOutSlowIn),
107 | ],
108 | ),
109 | );
110 | }
111 | }
112 |
113 | Widget makeLove(double tx, double ty, Curve curves) {
114 | return Container(
115 | width: 10,
116 | height: 10,
117 | child: AnimatorSet(
118 | child: DecoratedBox(
119 | decoration: BoxDecoration(
120 | color: Colors.white,
121 | shape: BoxShape.circle,
122 | ),
123 | ),
124 | animatorSet: [
125 | Delay(duration: 700),
126 | Serial(
127 | duration: 800,
128 | serialList: [
129 | TX(from: 0.0, to: tx, curve: curves),
130 | TY(from: 0.0, to: ty, curve: curves),
131 | SX(from: 1.0, to: 0.2, curve: curves),
132 | SY(from: 1.0, to: 0.2, curve: curves),
133 | O(from: 1.0, to: 0.8, curve: curves)
134 | ],
135 | ),
136 | ],
137 | ),
138 | );
139 | }
140 |
141 | class YYSpringMenu extends StatelessWidget {
142 | @override
143 | Widget build(BuildContext context) {
144 | return Container(
145 | width: 40,
146 | height: 40,
147 | child: Column(
148 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
149 | children: [
150 | AnimatorSet(
151 | animationType: AnimationType.reverse,
152 | child: Container(
153 | decoration: BoxDecoration(
154 | color: Colors.amberAccent[400],
155 | borderRadius: BorderRadius.circular(5.0),
156 | ),
157 | width: 30,
158 | height: 10,
159 | ),
160 | animatorSet: [
161 | Serial(
162 | duration: 2000,
163 | serialList: [
164 | TY(from: 0.0, to: 40.0, curve: Curves.elasticInOut),
165 | TX(from: 0.0, to: 20.0, curve: Curves.elasticInOut),
166 | SX(from: 1.0, to: 0.1, curve: Curves.elasticInOut),
167 | SY(from: 1.0, to: 0.1, curve: Curves.elasticInOut),
168 | ],
169 | ),
170 | ],
171 | ),
172 | AnimatorSet(
173 | animationType: AnimationType.reverse,
174 | child: Container(
175 | decoration: BoxDecoration(
176 | color: Colors.brown[400],
177 | borderRadius: BorderRadius.circular(5.0),
178 | ),
179 | width: 30,
180 | height: 10,
181 | ),
182 | animatorSet: [
183 | Serial(
184 | duration: 2000,
185 | serialList: [
186 | TY(from: 0.0, to: 26.0, curve: Curves.elasticInOut),
187 | TX(from: 0.0, to: 20.0, curve: Curves.elasticInOut),
188 | SX(from: 1.0, to: 0.1, curve: Curves.elasticInOut),
189 | SY(from: 1.0, to: 0.1, curve: Curves.elasticInOut),
190 | ],
191 | ),
192 | ],
193 | ),
194 | AnimatorSet(
195 | animationType: AnimationType.reverse,
196 | child: Container(
197 | decoration: BoxDecoration(
198 | color: Colors.grey[400],
199 | borderRadius: BorderRadius.circular(5.0),
200 | ),
201 | width: 30,
202 | height: 10,
203 | ),
204 | animatorSet: [
205 | Serial(
206 | duration: 2000,
207 | serialList: [
208 | TY(from: 0.0, to: 12.0, curve: Curves.elasticInOut),
209 | TX(from: 0.0, to: 20.0, curve: Curves.elasticInOut),
210 | SX(from: 1.0, to: 0.1, curve: Curves.elasticInOut),
211 | SY(from: 1.0, to: 0.1, curve: Curves.elasticInOut),
212 | ],
213 | ),
214 | ],
215 | ),
216 | ],
217 | ),
218 | );
219 | }
220 | }
221 |
222 | class YYFoldMenu extends StatelessWidget {
223 | @override
224 | Widget build(BuildContext context) {
225 | return Container(
226 | width: 40,
227 | height: 40,
228 | child: Column(
229 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
230 | children: [
231 | makeFoldMenu(0, 40),
232 | makeFoldMenu(100, 26.0),
233 | makeFoldMenu(200, 12.0),
234 | ],
235 | ),
236 | );
237 | }
238 | }
239 |
240 | Widget makeFoldMenu(int delay, double toY) {
241 | return AnimatorSet(
242 | animationType: AnimationType.reverse,
243 | child: Container(
244 | decoration: BoxDecoration(
245 | color: Colors.white,
246 | ),
247 | width: 30,
248 | height: 10,
249 | ),
250 | animatorSet: [
251 | Serial(
252 | duration: 2000,
253 | delay: delay,
254 | serialList: [
255 | TY(from: 0.0, to: toY, curve: Curves.elasticInOut),
256 | SX(from: 1.0, to: 0.1, curve: Curves.elasticInOut),
257 | SY(from: 1.0, to: 0.1, curve: Curves.elasticInOut),
258 | ],
259 | ),
260 | ],
261 | );
262 | }
263 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.2.0"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "1.0.4"
18 | charcode:
19 | dependency: transitive
20 | description:
21 | name: charcode
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.2"
25 | collection:
26 | dependency: transitive
27 | description:
28 | name: collection
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.14.11"
32 | flutter:
33 | dependency: "direct main"
34 | description: flutter
35 | source: sdk
36 | version: "0.0.0"
37 | flutter_test:
38 | dependency: "direct dev"
39 | description: flutter
40 | source: sdk
41 | version: "0.0.0"
42 | matcher:
43 | dependency: transitive
44 | description:
45 | name: matcher
46 | url: "https://pub.dartlang.org"
47 | source: hosted
48 | version: "0.12.5"
49 | meta:
50 | dependency: transitive
51 | description:
52 | name: meta
53 | url: "https://pub.dartlang.org"
54 | source: hosted
55 | version: "1.1.6"
56 | path:
57 | dependency: transitive
58 | description:
59 | name: path
60 | url: "https://pub.dartlang.org"
61 | source: hosted
62 | version: "1.6.2"
63 | pedantic:
64 | dependency: transitive
65 | description:
66 | name: pedantic
67 | url: "https://pub.dartlang.org"
68 | source: hosted
69 | version: "1.7.0"
70 | quiver:
71 | dependency: transitive
72 | description:
73 | name: quiver
74 | url: "https://pub.dartlang.org"
75 | source: hosted
76 | version: "2.0.3"
77 | sky_engine:
78 | dependency: transitive
79 | description: flutter
80 | source: sdk
81 | version: "0.0.99"
82 | source_span:
83 | dependency: transitive
84 | description:
85 | name: source_span
86 | url: "https://pub.dartlang.org"
87 | source: hosted
88 | version: "1.5.5"
89 | stack_trace:
90 | dependency: transitive
91 | description:
92 | name: stack_trace
93 | url: "https://pub.dartlang.org"
94 | source: hosted
95 | version: "1.9.3"
96 | stream_channel:
97 | dependency: transitive
98 | description:
99 | name: stream_channel
100 | url: "https://pub.dartlang.org"
101 | source: hosted
102 | version: "2.0.0"
103 | string_scanner:
104 | dependency: transitive
105 | description:
106 | name: string_scanner
107 | url: "https://pub.dartlang.org"
108 | source: hosted
109 | version: "1.0.4"
110 | term_glyph:
111 | dependency: transitive
112 | description:
113 | name: term_glyph
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "1.1.0"
117 | test_api:
118 | dependency: transitive
119 | description:
120 | name: test_api
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "0.2.5"
124 | typed_data:
125 | dependency: transitive
126 | description:
127 | name: typed_data
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "1.1.6"
131 | vector_math:
132 | dependency: transitive
133 | description:
134 | name: vector_math
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "2.0.8"
138 | sdks:
139 | dart: ">=2.2.2 <3.0.0"
140 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_animation_set
2 | description: Easy to build an animation set
3 | version: 0.0.4
4 | author: AndroidHensen
5 | homepage: https://github.com/efoxTeam/flutter-animation-set
6 |
7 | environment:
8 | sdk: ">=2.1.0 <3.0.0"
9 |
10 | dependencies:
11 | flutter:
12 | sdk: flutter
13 |
14 | dev_dependencies:
15 | flutter_test:
16 | sdk: flutter
17 |
18 | # For information on the generic Dart part of this file, see the
19 | # following page: https://dart.dev/tools/pub/pubspec
20 |
21 | # The following section is specific to Flutter.
22 | flutter:
23 | # This section identifies this Flutter project as a plugin project.
24 | # The androidPackage and pluginClass identifiers should not ordinarily
25 | # be modified. They are used by the tooling to maintain consistency when
26 | # adding or updating assets for this project.
27 | plugin:
28 | androidPackage: yy.inc.flutter_animation_set
29 | pluginClass: FlutterAnimationSetPlugin
30 |
31 | # To add assets to your plugin package, add an assets section, like this:
32 | # assets:
33 | # - images/a_dot_burr.jpeg
34 | # - images/a_dot_ham.jpeg
35 | #
36 | # For details regarding assets in packages, see
37 | # https://flutter.dev/assets-and-images/#from-packages
38 | #
39 | # An image asset can refer to one or more resolution-specific "variants", see
40 | # https://flutter.dev/assets-and-images/#resolution-aware.
41 |
42 | # To add custom fonts to your plugin package, add a fonts section here,
43 | # in this "flutter" section. Each entry in this list should have a
44 | # "family" key with the font family name, and a "fonts" key with a
45 | # list giving the asset and other descriptors for the font. For
46 | # example:
47 | # fonts:
48 | # - family: Schyler
49 | # fonts:
50 | # - asset: fonts/Schyler-Regular.ttf
51 | # - asset: fonts/Schyler-Italic.ttf
52 | # style: italic
53 | # - family: Trajan Pro
54 | # fonts:
55 | # - asset: fonts/TrajanPro.ttf
56 | # - asset: fonts/TrajanPro_Bold.ttf
57 | # weight: 700
58 | #
59 | # For details regarding fonts in packages, see
60 | # https://flutter.dev/custom-fonts/#from-packages
61 |
--------------------------------------------------------------------------------
/test/flutter_animation_set_test.dart:
--------------------------------------------------------------------------------
1 | void main() {}
2 |
--------------------------------------------------------------------------------