├── .gitignore
├── .metadata
├── LICENSE
├── README.md
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── lyl
│ │ │ │ └── flutter_animation_collection
│ │ │ │ └── MainActivity.kt
│ │ └── 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
├── assets
└── images
│ ├── bg_anim.webp
│ ├── bg_header_ripple_anim.webp
│ ├── header.webp
│ ├── img0.png
│ ├── img1.png
│ ├── img10.png
│ ├── img11.png
│ ├── img12.png
│ ├── img13.png
│ ├── img14.png
│ ├── img15.png
│ ├── img16.png
│ ├── img17.png
│ ├── img18.png
│ ├── img19.png
│ ├── img2.png
│ ├── img20.png
│ ├── img21.png
│ ├── img22.png
│ ├── img23.png
│ ├── img24.png
│ ├── img25.png
│ ├── img26.png
│ ├── img27.png
│ ├── img28.png
│ ├── img29.png
│ ├── img3.png
│ ├── img30.png
│ ├── img4.png
│ ├── img5.png
│ ├── img6.png
│ ├── img7.png
│ ├── img8.png
│ ├── img9.png
│ ├── img_mtl.png
│ └── img_mtl_bracket.png
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.swift
│ ├── 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
│ └── Runner-Bridging-Header.h
├── lib
├── main.dart
├── model
│ └── user_model.dart
├── page
│ ├── appears
│ │ └── appears_randomly_page.dart
│ ├── barrage
│ │ ├── barrage_page.dart
│ │ └── flutter_barrage.dart
│ ├── base_state.dart
│ ├── ferriswheel
│ │ ├── ferris_wheel_page.dart
│ │ └── ferris_wheel_widget.dart
│ └── view
│ │ ├── my_page_fade_route_builder.dart
│ │ └── my_page_slide_route_builder.dart
└── utils
│ └── my_utils.dart
├── pubspec.lock
├── pubspec.yaml
├── res
├── 20891622539296_.pic.jpg
├── appears_randomly.gif
├── appears_randomly.mp4
├── barrage.gif
├── barrage.mp4
├── ferris_wheel.gif
└── ferris_wheel.mp4
└── test
└── widget_test.dart
/.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 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
--------------------------------------------------------------------------------
/.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: 9b2d32b605630f28625709ebd9d78ab3016b2bf6
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Wing_Li
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Flutter 动画控件收集
2 |
3 | Flutter 各类第三方的库还是少啊,还是因为我没找到呢。
4 |
5 | 因公司项目,需要各种动画,故在此收集各类动画,有些是使用第三方库,有些是自己的写的库。
6 |
7 | 持续更新。欢迎 Issues 交流。
8 |
9 | ## 示例
10 |
11 | ### 弹幕
12 |
13 | [barrage_page](https://github.com/Wing-Li/flutter_animation_collection/blob/master/lib/page/barrage/barrage_page.dart)
14 |
15 | 
16 |
17 |
18 | ### 随机渐变出现动画
19 |
20 | 实在想不到叫什么名字啊,有没有人给推荐个名字。
21 |
22 | [appears_randomly_page](https://github.com/Wing-Li/flutter_animation_collection/blob/master/lib/page/appears/appears_randomly_page.dart)
23 |
24 | 
25 |
26 |
27 | ### 摩天轮
28 |
29 | [ferris_wheel_page](https://github.com/Wing-Li/flutter_animation_collection/blob/master/lib/page/ferriswheel/ferris_wheel_page.dart)
30 |
31 | 
32 |
33 |
34 | ### 一个梦幻的旋转木马滑块小部件。仅用于显示在线和本地图像。
35 |
36 | 项目地址:[fan\_carousel\_image\_slider](https://github.com/marjandn/fan_carousel_image_slider)
37 |
38 | 
39 |
40 | ### 水果转换
41 |
42 | 项目地址:[flutter-ui-challenge-fruit-swip](https://github.com/marjandn/flutter-ui-challenge-fruit-swip)
43 |
44 | 
45 |
46 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 |
--------------------------------------------------------------------------------
/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 plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 29
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.lyl.flutter_animation_collection"
42 | minSdkVersion 16
43 | targetSdkVersion 29
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | }
47 |
48 | buildTypes {
49 | release {
50 | // TODO: Add your own signing config for the release build.
51 | // Signing with the debug keys for now, so `flutter run --release` works.
52 | signingConfig signingConfigs.debug
53 | }
54 | }
55 | }
56 |
57 | flutter {
58 | source '../..'
59 | }
60 |
61 | dependencies {
62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
63 | }
64 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
12 |
19 |
23 |
27 |
32 |
36 |
37 |
38 |
39 |
40 |
41 |
43 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/lyl/flutter_animation_collection/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.lyl.flutter_animation_collection
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.5.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/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-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/assets/images/bg_anim.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/bg_anim.webp
--------------------------------------------------------------------------------
/assets/images/bg_header_ripple_anim.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/bg_header_ripple_anim.webp
--------------------------------------------------------------------------------
/assets/images/header.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/header.webp
--------------------------------------------------------------------------------
/assets/images/img0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img0.png
--------------------------------------------------------------------------------
/assets/images/img1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img1.png
--------------------------------------------------------------------------------
/assets/images/img10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img10.png
--------------------------------------------------------------------------------
/assets/images/img11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img11.png
--------------------------------------------------------------------------------
/assets/images/img12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img12.png
--------------------------------------------------------------------------------
/assets/images/img13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img13.png
--------------------------------------------------------------------------------
/assets/images/img14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img14.png
--------------------------------------------------------------------------------
/assets/images/img15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img15.png
--------------------------------------------------------------------------------
/assets/images/img16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img16.png
--------------------------------------------------------------------------------
/assets/images/img17.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img17.png
--------------------------------------------------------------------------------
/assets/images/img18.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img18.png
--------------------------------------------------------------------------------
/assets/images/img19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img19.png
--------------------------------------------------------------------------------
/assets/images/img2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img2.png
--------------------------------------------------------------------------------
/assets/images/img20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img20.png
--------------------------------------------------------------------------------
/assets/images/img21.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img21.png
--------------------------------------------------------------------------------
/assets/images/img22.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img22.png
--------------------------------------------------------------------------------
/assets/images/img23.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img23.png
--------------------------------------------------------------------------------
/assets/images/img24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img24.png
--------------------------------------------------------------------------------
/assets/images/img25.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img25.png
--------------------------------------------------------------------------------
/assets/images/img26.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img26.png
--------------------------------------------------------------------------------
/assets/images/img27.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img27.png
--------------------------------------------------------------------------------
/assets/images/img28.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img28.png
--------------------------------------------------------------------------------
/assets/images/img29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img29.png
--------------------------------------------------------------------------------
/assets/images/img3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img3.png
--------------------------------------------------------------------------------
/assets/images/img30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img30.png
--------------------------------------------------------------------------------
/assets/images/img4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img4.png
--------------------------------------------------------------------------------
/assets/images/img5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img5.png
--------------------------------------------------------------------------------
/assets/images/img6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img6.png
--------------------------------------------------------------------------------
/assets/images/img7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img7.png
--------------------------------------------------------------------------------
/assets/images/img8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img8.png
--------------------------------------------------------------------------------
/assets/images/img9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img9.png
--------------------------------------------------------------------------------
/assets/images/img_mtl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img_mtl.png
--------------------------------------------------------------------------------
/assets/images/img_mtl_bracket.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/assets/images/img_mtl_bracket.png
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/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 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXCopyFilesBuildPhase section */
19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
20 | isa = PBXCopyFilesBuildPhase;
21 | buildActionMask = 2147483647;
22 | dstPath = "";
23 | dstSubfolderSpec = 10;
24 | files = (
25 | );
26 | name = "Embed Frameworks";
27 | runOnlyForDeploymentPostprocessing = 0;
28 | };
29 | /* End PBXCopyFilesBuildPhase section */
30 |
31 | /* Begin PBXFileReference section */
32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | /* End PBXFileReference section */
46 |
47 | /* Begin PBXFrameworksBuildPhase section */
48 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
49 | isa = PBXFrameworksBuildPhase;
50 | buildActionMask = 2147483647;
51 | files = (
52 | );
53 | runOnlyForDeploymentPostprocessing = 0;
54 | };
55 | /* End PBXFrameworksBuildPhase section */
56 |
57 | /* Begin PBXGroup section */
58 | 9740EEB11CF90186004384FC /* Flutter */ = {
59 | isa = PBXGroup;
60 | children = (
61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
65 | );
66 | name = Flutter;
67 | sourceTree = "";
68 | };
69 | 97C146E51CF9000F007C117D = {
70 | isa = PBXGroup;
71 | children = (
72 | 9740EEB11CF90186004384FC /* Flutter */,
73 | 97C146F01CF9000F007C117D /* Runner */,
74 | 97C146EF1CF9000F007C117D /* Products */,
75 | );
76 | sourceTree = "";
77 | };
78 | 97C146EF1CF9000F007C117D /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 97C146EE1CF9000F007C117D /* Runner.app */,
82 | );
83 | name = Products;
84 | sourceTree = "";
85 | };
86 | 97C146F01CF9000F007C117D /* Runner */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
92 | 97C147021CF9000F007C117D /* Info.plist */,
93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
97 | );
98 | path = Runner;
99 | sourceTree = "";
100 | };
101 | /* End PBXGroup section */
102 |
103 | /* Begin PBXNativeTarget section */
104 | 97C146ED1CF9000F007C117D /* Runner */ = {
105 | isa = PBXNativeTarget;
106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107 | buildPhases = (
108 | 9740EEB61CF901F6004384FC /* Run Script */,
109 | 97C146EA1CF9000F007C117D /* Sources */,
110 | 97C146EB1CF9000F007C117D /* Frameworks */,
111 | 97C146EC1CF9000F007C117D /* Resources */,
112 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
114 | );
115 | buildRules = (
116 | );
117 | dependencies = (
118 | );
119 | name = Runner;
120 | productName = Runner;
121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
122 | productType = "com.apple.product-type.application";
123 | };
124 | /* End PBXNativeTarget section */
125 |
126 | /* Begin PBXProject section */
127 | 97C146E61CF9000F007C117D /* Project object */ = {
128 | isa = PBXProject;
129 | attributes = {
130 | LastUpgradeCheck = 1020;
131 | ORGANIZATIONNAME = "";
132 | TargetAttributes = {
133 | 97C146ED1CF9000F007C117D = {
134 | CreatedOnToolsVersion = 7.3.1;
135 | LastSwiftMigration = 1100;
136 | };
137 | };
138 | };
139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
140 | compatibilityVersion = "Xcode 9.3";
141 | developmentRegion = en;
142 | hasScannedForEncodings = 0;
143 | knownRegions = (
144 | en,
145 | Base,
146 | );
147 | mainGroup = 97C146E51CF9000F007C117D;
148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
149 | projectDirPath = "";
150 | projectRoot = "";
151 | targets = (
152 | 97C146ED1CF9000F007C117D /* Runner */,
153 | );
154 | };
155 | /* End PBXProject section */
156 |
157 | /* Begin PBXResourcesBuildPhase section */
158 | 97C146EC1CF9000F007C117D /* Resources */ = {
159 | isa = PBXResourcesBuildPhase;
160 | buildActionMask = 2147483647;
161 | files = (
162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
166 | );
167 | runOnlyForDeploymentPostprocessing = 0;
168 | };
169 | /* End PBXResourcesBuildPhase section */
170 |
171 | /* Begin PBXShellScriptBuildPhase section */
172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
173 | isa = PBXShellScriptBuildPhase;
174 | buildActionMask = 2147483647;
175 | files = (
176 | );
177 | inputPaths = (
178 | );
179 | name = "Thin Binary";
180 | outputPaths = (
181 | );
182 | runOnlyForDeploymentPostprocessing = 0;
183 | shellPath = /bin/sh;
184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
185 | };
186 | 9740EEB61CF901F6004384FC /* Run Script */ = {
187 | isa = PBXShellScriptBuildPhase;
188 | buildActionMask = 2147483647;
189 | files = (
190 | );
191 | inputPaths = (
192 | );
193 | name = "Run Script";
194 | outputPaths = (
195 | );
196 | runOnlyForDeploymentPostprocessing = 0;
197 | shellPath = /bin/sh;
198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
199 | };
200 | /* End PBXShellScriptBuildPhase section */
201 |
202 | /* Begin PBXSourcesBuildPhase section */
203 | 97C146EA1CF9000F007C117D /* Sources */ = {
204 | isa = PBXSourcesBuildPhase;
205 | buildActionMask = 2147483647;
206 | files = (
207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
209 | );
210 | runOnlyForDeploymentPostprocessing = 0;
211 | };
212 | /* End PBXSourcesBuildPhase section */
213 |
214 | /* Begin PBXVariantGroup section */
215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
216 | isa = PBXVariantGroup;
217 | children = (
218 | 97C146FB1CF9000F007C117D /* Base */,
219 | );
220 | name = Main.storyboard;
221 | sourceTree = "";
222 | };
223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
224 | isa = PBXVariantGroup;
225 | children = (
226 | 97C147001CF9000F007C117D /* Base */,
227 | );
228 | name = LaunchScreen.storyboard;
229 | sourceTree = "";
230 | };
231 | /* End PBXVariantGroup section */
232 |
233 | /* Begin XCBuildConfiguration section */
234 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
235 | isa = XCBuildConfiguration;
236 | buildSettings = {
237 | ALWAYS_SEARCH_USER_PATHS = NO;
238 | CLANG_ANALYZER_NONNULL = YES;
239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
240 | CLANG_CXX_LIBRARY = "libc++";
241 | CLANG_ENABLE_MODULES = YES;
242 | CLANG_ENABLE_OBJC_ARC = YES;
243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
244 | CLANG_WARN_BOOL_CONVERSION = YES;
245 | CLANG_WARN_COMMA = YES;
246 | CLANG_WARN_CONSTANT_CONVERSION = YES;
247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
249 | CLANG_WARN_EMPTY_BODY = YES;
250 | CLANG_WARN_ENUM_CONVERSION = YES;
251 | CLANG_WARN_INFINITE_RECURSION = YES;
252 | CLANG_WARN_INT_CONVERSION = YES;
253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
258 | CLANG_WARN_STRICT_PROTOTYPES = YES;
259 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
260 | CLANG_WARN_UNREACHABLE_CODE = YES;
261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
263 | COPY_PHASE_STRIP = NO;
264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
265 | ENABLE_NS_ASSERTIONS = NO;
266 | ENABLE_STRICT_OBJC_MSGSEND = YES;
267 | GCC_C_LANGUAGE_STANDARD = gnu99;
268 | GCC_NO_COMMON_BLOCKS = YES;
269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
271 | GCC_WARN_UNDECLARED_SELECTOR = YES;
272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
273 | GCC_WARN_UNUSED_FUNCTION = YES;
274 | GCC_WARN_UNUSED_VARIABLE = YES;
275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
276 | MTL_ENABLE_DEBUG_INFO = NO;
277 | SDKROOT = iphoneos;
278 | SUPPORTED_PLATFORMS = iphoneos;
279 | TARGETED_DEVICE_FAMILY = "1,2";
280 | VALIDATE_PRODUCT = YES;
281 | };
282 | name = Profile;
283 | };
284 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
285 | isa = XCBuildConfiguration;
286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
287 | buildSettings = {
288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
289 | CLANG_ENABLE_MODULES = YES;
290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
291 | ENABLE_BITCODE = NO;
292 | FRAMEWORK_SEARCH_PATHS = (
293 | "$(inherited)",
294 | "$(PROJECT_DIR)/Flutter",
295 | );
296 | INFOPLIST_FILE = Runner/Info.plist;
297 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
298 | LIBRARY_SEARCH_PATHS = (
299 | "$(inherited)",
300 | "$(PROJECT_DIR)/Flutter",
301 | );
302 | PRODUCT_BUNDLE_IDENTIFIER = com.lyl.flutterAnimationCollection;
303 | PRODUCT_NAME = "$(TARGET_NAME)";
304 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
305 | SWIFT_VERSION = 5.0;
306 | VERSIONING_SYSTEM = "apple-generic";
307 | };
308 | name = Profile;
309 | };
310 | 97C147031CF9000F007C117D /* Debug */ = {
311 | isa = XCBuildConfiguration;
312 | buildSettings = {
313 | ALWAYS_SEARCH_USER_PATHS = NO;
314 | CLANG_ANALYZER_NONNULL = YES;
315 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
316 | CLANG_CXX_LIBRARY = "libc++";
317 | CLANG_ENABLE_MODULES = YES;
318 | CLANG_ENABLE_OBJC_ARC = YES;
319 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
320 | CLANG_WARN_BOOL_CONVERSION = YES;
321 | CLANG_WARN_COMMA = YES;
322 | CLANG_WARN_CONSTANT_CONVERSION = YES;
323 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
325 | CLANG_WARN_EMPTY_BODY = YES;
326 | CLANG_WARN_ENUM_CONVERSION = YES;
327 | CLANG_WARN_INFINITE_RECURSION = YES;
328 | CLANG_WARN_INT_CONVERSION = YES;
329 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
330 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
334 | CLANG_WARN_STRICT_PROTOTYPES = YES;
335 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
336 | CLANG_WARN_UNREACHABLE_CODE = YES;
337 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
338 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
339 | COPY_PHASE_STRIP = NO;
340 | DEBUG_INFORMATION_FORMAT = dwarf;
341 | ENABLE_STRICT_OBJC_MSGSEND = YES;
342 | ENABLE_TESTABILITY = YES;
343 | GCC_C_LANGUAGE_STANDARD = gnu99;
344 | GCC_DYNAMIC_NO_PIC = NO;
345 | GCC_NO_COMMON_BLOCKS = YES;
346 | GCC_OPTIMIZATION_LEVEL = 0;
347 | GCC_PREPROCESSOR_DEFINITIONS = (
348 | "DEBUG=1",
349 | "$(inherited)",
350 | );
351 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
352 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
353 | GCC_WARN_UNDECLARED_SELECTOR = YES;
354 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
355 | GCC_WARN_UNUSED_FUNCTION = YES;
356 | GCC_WARN_UNUSED_VARIABLE = YES;
357 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
358 | MTL_ENABLE_DEBUG_INFO = YES;
359 | ONLY_ACTIVE_ARCH = YES;
360 | SDKROOT = iphoneos;
361 | TARGETED_DEVICE_FAMILY = "1,2";
362 | };
363 | name = Debug;
364 | };
365 | 97C147041CF9000F007C117D /* Release */ = {
366 | isa = XCBuildConfiguration;
367 | buildSettings = {
368 | ALWAYS_SEARCH_USER_PATHS = NO;
369 | CLANG_ANALYZER_NONNULL = YES;
370 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
371 | CLANG_CXX_LIBRARY = "libc++";
372 | CLANG_ENABLE_MODULES = YES;
373 | CLANG_ENABLE_OBJC_ARC = YES;
374 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
375 | CLANG_WARN_BOOL_CONVERSION = YES;
376 | CLANG_WARN_COMMA = YES;
377 | CLANG_WARN_CONSTANT_CONVERSION = YES;
378 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
380 | CLANG_WARN_EMPTY_BODY = YES;
381 | CLANG_WARN_ENUM_CONVERSION = YES;
382 | CLANG_WARN_INFINITE_RECURSION = YES;
383 | CLANG_WARN_INT_CONVERSION = YES;
384 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
385 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
386 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
387 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
388 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
389 | CLANG_WARN_STRICT_PROTOTYPES = YES;
390 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
391 | CLANG_WARN_UNREACHABLE_CODE = YES;
392 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
393 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
394 | COPY_PHASE_STRIP = NO;
395 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
396 | ENABLE_NS_ASSERTIONS = NO;
397 | ENABLE_STRICT_OBJC_MSGSEND = YES;
398 | GCC_C_LANGUAGE_STANDARD = gnu99;
399 | GCC_NO_COMMON_BLOCKS = YES;
400 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
401 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
402 | GCC_WARN_UNDECLARED_SELECTOR = YES;
403 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
404 | GCC_WARN_UNUSED_FUNCTION = YES;
405 | GCC_WARN_UNUSED_VARIABLE = YES;
406 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
407 | MTL_ENABLE_DEBUG_INFO = NO;
408 | SDKROOT = iphoneos;
409 | SUPPORTED_PLATFORMS = iphoneos;
410 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
411 | TARGETED_DEVICE_FAMILY = "1,2";
412 | VALIDATE_PRODUCT = YES;
413 | };
414 | name = Release;
415 | };
416 | 97C147061CF9000F007C117D /* Debug */ = {
417 | isa = XCBuildConfiguration;
418 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
419 | buildSettings = {
420 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
421 | CLANG_ENABLE_MODULES = YES;
422 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
423 | ENABLE_BITCODE = NO;
424 | FRAMEWORK_SEARCH_PATHS = (
425 | "$(inherited)",
426 | "$(PROJECT_DIR)/Flutter",
427 | );
428 | INFOPLIST_FILE = Runner/Info.plist;
429 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
430 | LIBRARY_SEARCH_PATHS = (
431 | "$(inherited)",
432 | "$(PROJECT_DIR)/Flutter",
433 | );
434 | PRODUCT_BUNDLE_IDENTIFIER = com.lyl.flutterAnimationCollection;
435 | PRODUCT_NAME = "$(TARGET_NAME)";
436 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
437 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
438 | SWIFT_VERSION = 5.0;
439 | VERSIONING_SYSTEM = "apple-generic";
440 | };
441 | name = Debug;
442 | };
443 | 97C147071CF9000F007C117D /* Release */ = {
444 | isa = XCBuildConfiguration;
445 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
446 | buildSettings = {
447 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
448 | CLANG_ENABLE_MODULES = YES;
449 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
450 | ENABLE_BITCODE = NO;
451 | FRAMEWORK_SEARCH_PATHS = (
452 | "$(inherited)",
453 | "$(PROJECT_DIR)/Flutter",
454 | );
455 | INFOPLIST_FILE = Runner/Info.plist;
456 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
457 | LIBRARY_SEARCH_PATHS = (
458 | "$(inherited)",
459 | "$(PROJECT_DIR)/Flutter",
460 | );
461 | PRODUCT_BUNDLE_IDENTIFIER = com.lyl.flutterAnimationCollection;
462 | PRODUCT_NAME = "$(TARGET_NAME)";
463 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
464 | SWIFT_VERSION = 5.0;
465 | VERSIONING_SYSTEM = "apple-generic";
466 | };
467 | name = Release;
468 | };
469 | /* End XCBuildConfiguration section */
470 |
471 | /* Begin XCConfigurationList section */
472 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
473 | isa = XCConfigurationList;
474 | buildConfigurations = (
475 | 97C147031CF9000F007C117D /* Debug */,
476 | 97C147041CF9000F007C117D /* Release */,
477 | 249021D3217E4FDB00AE95B9 /* Profile */,
478 | );
479 | defaultConfigurationIsVisible = 0;
480 | defaultConfigurationName = Release;
481 | };
482 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
483 | isa = XCConfigurationList;
484 | buildConfigurations = (
485 | 97C147061CF9000F007C117D /* Debug */,
486 | 97C147071CF9000F007C117D /* Release */,
487 | 249021D4217E4FDB00AE95B9 /* Profile */,
488 | );
489 | defaultConfigurationIsVisible = 0;
490 | defaultConfigurationName = Release;
491 | };
492 | /* End XCConfigurationList section */
493 | };
494 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
495 | }
496 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wing-Li/flutter_animation_collection/ebc5295b78e4746eeb7abb939f50a9eb79b344c2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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_collection
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 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_animation_collection/page/appears/appears_randomly_page.dart';
5 | import 'package:flutter_animation_collection/utils/my_utils.dart';
6 |
7 | import 'page/barrage/barrage_page.dart';
8 | import 'page/ferriswheel/ferris_wheel_page.dart';
9 |
10 | void main() {
11 | runApp(MyApp());
12 | }
13 |
14 | class MyApp extends StatelessWidget {
15 | @override
16 | Widget build(BuildContext context) {
17 | return MaterialApp(
18 | title: 'Flutter Demo',
19 | theme: ThemeData(
20 | primarySwatch: Colors.blue,
21 | visualDensity: VisualDensity.adaptivePlatformDensity,
22 | ),
23 | home: MyHomePage(),
24 | );
25 | }
26 | }
27 |
28 | class MyHomePage extends StatefulWidget {
29 | MyHomePage({
30 | Key key,
31 | }) : super(key: key);
32 |
33 | @override
34 | _MyHomePageState createState() => _MyHomePageState();
35 | }
36 |
37 | class _MyHomePageState extends State {
38 | @override
39 | Widget build(BuildContext context) {
40 | MyUtils.screenWidth = MyUtils.getScreenWidth(context);
41 |
42 | return Scaffold(
43 | backgroundColor: Color(0xFFF3F4F6),
44 | appBar: _appBar(),
45 | body: _body(),
46 | );
47 | }
48 |
49 | _appBar() {
50 | return AppBar(
51 | elevation: 2,
52 | backgroundColor: Colors.white,
53 | title: Text("动画收藏", style: TextStyle(color: Colors.black, fontSize: 18)),
54 | centerTitle: true,
55 | );
56 | }
57 |
58 | _body() {
59 | return Column(
60 | children: [
61 | SizedBox(height: 16),
62 | GestureDetector(
63 | child: _item("弹幕"),
64 | onTap: () => MyUtils.startPageUpAnim(context, BarragePage()),
65 | ),
66 | GestureDetector(
67 | child: _item("随机渐变出现"),
68 | onTap: () => MyUtils.startPageGradient(context, AppearsRandomlyPage()),
69 | ),
70 | GestureDetector(
71 | child: _item("摩天轮转盘"),
72 | onTap: () => MyUtils.startPageGradient(context, FerrisWheelPage()),
73 | ),
74 | ],
75 | );
76 | }
77 |
78 | _item(String title) {
79 | return Container(
80 | height: 56,
81 | margin: EdgeInsets.symmetric(horizontal: 24, vertical: 10),
82 | padding: EdgeInsets.only(left: 20, right: 12, top: 14, bottom: 14),
83 | decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)),
84 | child: Row(
85 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
86 | children: [
87 | Text(title, style: TextStyle(fontSize: 16, color: Colors.black)),
88 | Icon(Icons.chevron_right, color: Colors.black26),
89 | ],
90 | ),
91 | );
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/lib/model/user_model.dart:
--------------------------------------------------------------------------------
1 | class UserModel {
2 | String name;
3 | String iconUrl;
4 | String bio;
5 | int gender;
6 | int age;
7 |
8 | UserModel({this.name, this.iconUrl, this.bio, this.gender, this.age});
9 | }
10 |
--------------------------------------------------------------------------------
/lib/page/appears/appears_randomly_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/foundation.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_animation_collection/page/base_state.dart';
4 | import 'package:flutter_animation_collection/utils/my_utils.dart';
5 | import 'package:flutter_appears_randomly/appears_randomly_widget.dart';
6 |
7 | /// 集成 flutter_appears_randomly 库
8 | class AppearsRandomlyPage extends StatefulWidget {
9 | AppearsRandomlyPage({
10 | Key key,
11 | }) : super(key: key);
12 |
13 | @override
14 | _AppearsRandomlyPageState createState() => _AppearsRandomlyPageState();
15 | }
16 |
17 | class _AppearsRandomlyPageState extends BaseState {
18 | double screenWidth = 375;
19 |
20 | List list = [];
21 |
22 | @override
23 | void initState() {
24 | initCloseButton(true, 500);
25 |
26 | super.initState();
27 |
28 | list = List.generate(30, (index) => "img$index");
29 | }
30 |
31 | @override
32 | Widget build(BuildContext context) {
33 | screenWidth = MediaQuery.of(context).size.width;
34 |
35 | return Scaffold(
36 | backgroundColor: Color(0xFF2E2E4A),
37 | body: Container(
38 | decoration: BoxDecoration(
39 | image: DecorationImage(image: AssetImage(MyUtils.getImage("bg_anim", format: "webp")), fit: BoxFit.fill),
40 | ),
41 | child: Column(
42 | children: [
43 | Spacer(flex: 1),
44 | Container(
45 | width: screenWidth,
46 | height: screenWidth,
47 | child: _appearsRandomlyGradientLayout(),
48 | ),
49 | Expanded(
50 | flex: 4,
51 | child: Center(child: MyCloseButton()),
52 | ),
53 | ],
54 | ),
55 | ),
56 | );
57 | }
58 |
59 | _appearsRandomlyGradientLayout() {
60 | double iconWidth = screenWidth * 110 / 375;
61 | return Stack(
62 | children: [
63 | Image.asset(MyUtils.getImage("bg_header_ripple_anim", format: "webp"), width: double.infinity, height: double.infinity),
64 | Container(
65 | padding: EdgeInsets.symmetric(horizontal: 16), // 为了防止贴边不美观。(可以去掉)
66 | child: AppearsRandomlyWidget(
67 | width: screenWidth,
68 | // 整体的宽高。用于计算 item 出现的范围
69 | height: screenWidth,
70 |
71 | itemWidth: 56,
72 | // 每个 item 的宽高。用于计算 item 的出现
73 | itemHeight: 56,
74 | itemSizeRange: 16,
75 | // 从小变大时,最大/最小的缩放范围。(会生成随机值,此处为最大值)
76 |
77 | centerRestrictedArea: Size(iconWidth, iconWidth),
78 | // 中心布局的范围
79 | centerChild: Container(
80 | // 中心布局。(可为空)
81 | width: iconWidth,
82 | height: iconWidth,
83 | alignment: Alignment.center,
84 | decoration: BoxDecoration(
85 | borderRadius: BorderRadius.circular(120),
86 | border: Border.all(color: Colors.white, width: 3),
87 | ),
88 | child: ClipOval(
89 | child: Image.asset(MyUtils.getImage("header", format: "webp"), width: iconWidth, height: iconWidth, fit: BoxFit.cover),
90 | ),
91 | ),
92 |
93 | itemCount: list.length,
94 | // 总数
95 | itemBuilder: (context, index) {
96 | // item 布局
97 | var imgRes = list[index];
98 | return GestureDetector(
99 | child: Container(
100 | decoration: BoxDecoration(
101 | borderRadius: BorderRadius.circular(56),
102 | border: Border.all(color: Colors.white, width: 0.5),
103 | ),
104 | child: ClipOval(child: Image.asset(MyUtils.getImage(imgRes), width: 52, height: 52, fit: BoxFit.cover)),
105 | ),
106 | onTap: () {
107 | // TODO: 点击
108 | },
109 | );
110 | },
111 | ),
112 | ),
113 | ],
114 | );
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/lib/page/barrage/barrage_page.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:math';
3 |
4 | import 'package:flutter/material.dart';
5 | import 'package:flutter_animation_collection/model/user_model.dart';
6 | import 'package:flutter_animation_collection/page/base_state.dart';
7 | import 'package:flutter_animation_collection/utils/my_utils.dart';
8 |
9 | import 'flutter_barrage.dart';
10 |
11 | /// 使用了 flutter_barrage 库,但是这个库有点问题,重写了一下。
12 | /// 可将其复制到自己项目。 flutter_animation_collection/lib/page/barrage/barrage_page.dart
13 | class BarragePage extends StatefulWidget {
14 | @override
15 | _BarragePageState createState() => _BarragePageState();
16 | }
17 |
18 | class _BarragePageState extends BaseState {
19 | final mBarrageWallController = BarrageWallController();
20 | Timer _barrageTimer;
21 |
22 | @override
23 | void initState() {
24 | initCloseButton(true, 2000);
25 |
26 | super.initState();
27 |
28 | Future.delayed(Duration.zero, _fetchBarrageData);
29 | }
30 |
31 | Future _fetchBarrageData({bool isShowLoading = false}) async {
32 | if (_barrageTimer != null) _barrageTimer.cancel();
33 |
34 | List userList = List.generate(30, (index) {
35 | return UserModel(
36 | name: "用户$index",
37 | iconUrl: "img$index",
38 | bio: "该用户很懒没有简介",
39 | );
40 | });
41 |
42 | _startBarrage(userList);
43 | }
44 |
45 | _startBarrage(List userList) {
46 | Future.delayed(Duration.zero, () {
47 | _barrageTimer?.cancel();
48 | _barrageTimer = Timer.periodic(Duration(milliseconds: 1000), (timer) {
49 | if (userList == null || userList.length <= 0) {
50 | _barrageTimer.cancel();
51 | return;
52 | }
53 |
54 | int _random = Random().nextInt(userList.length);
55 | var user = userList[_random];
56 | var child = _barrageItem(user);
57 |
58 | mBarrageWallController.send([Bullet(child: child)]);
59 | });
60 | });
61 | }
62 |
63 | _barrageItem(UserModel user) {
64 | return GestureDetector(
65 | behavior: HitTestBehavior.opaque,
66 | child: Container(
67 | margin: EdgeInsets.symmetric(horizontal: 24),
68 | padding: EdgeInsets.only(left: 6, top: 4, bottom: 4, right: 12),
69 | decoration: BoxDecoration(
70 | borderRadius: BorderRadius.all(Radius.circular(26)),
71 | border: Border.all(color: Color(0xFF6F7177), width: 0.5),
72 | ),
73 | child: Row(
74 | mainAxisSize: MainAxisSize.min,
75 | crossAxisAlignment: CrossAxisAlignment.center,
76 | children: [
77 | ClipOval(
78 | child: Image.asset(MyUtils.getImage(user.iconUrl), width: 32, height: 32, fit: BoxFit.cover),
79 | ),
80 | SizedBox(width: 8),
81 | Flexible(
82 | fit: FlexFit.loose,
83 | child: Column(
84 | mainAxisSize: MainAxisSize.min,
85 | crossAxisAlignment: CrossAxisAlignment.start,
86 | children: [
87 | Text(
88 | "${user.name}",
89 | style: TextStyle(color: Color(0xFFDCDCDD), fontSize: 14),
90 | maxLines: 1,
91 | overflow: TextOverflow.ellipsis,
92 | ),
93 | Text(
94 | user.bio,
95 | style: TextStyle(color: Color(0xFFDCDCDD), fontSize: 12),
96 | maxLines: 1,
97 | overflow: TextOverflow.ellipsis,
98 | ),
99 | ],
100 | ),
101 | ),
102 | SizedBox(width: 8),
103 | ],
104 | ),
105 | ),
106 | onTap: () {
107 | // TODO: 点击
108 | },
109 | );
110 | }
111 |
112 | @override
113 | Widget build(BuildContext context) {
114 | return Scaffold(
115 | backgroundColor: Color(0xFF2E2E4A),
116 | body: Container(
117 | decoration: BoxDecoration(
118 | image: DecorationImage(image: AssetImage(MyUtils.getImage("bg_anim", format: "webp")), fit: BoxFit.fill),
119 | ),
120 | child: Column(
121 | children: [
122 | Spacer(flex: 1),
123 | Expanded(flex: 6, child: _barrageLayout()),
124 | Expanded(
125 | flex: 4,
126 | child: Center(child: MyCloseButton()),
127 | ),
128 | ],
129 | ),
130 | ),
131 | );
132 | }
133 |
134 | _barrageLayout() {
135 | return Container(
136 | child: BarrageWall(
137 | debug: false,
138 | maxBulletHeight: 80,
139 | // safeBottomHeight: 60,
140 | speed: 6,
141 | speedCorrectionInMilliseconds: 3000,
142 | bullets: [],
143 | child: new Container(),
144 | controller: mBarrageWallController,
145 | ),
146 | );
147 | }
148 | }
149 |
--------------------------------------------------------------------------------
/lib/page/barrage/flutter_barrage.dart:
--------------------------------------------------------------------------------
1 | library flutter_barrage;
2 |
3 | import 'dart:async';
4 | import 'dart:collection';
5 | import 'dart:math';
6 |
7 | import 'package:flutter/material.dart';
8 | // import 'package:quiver/collection.dart';
9 |
10 | class BarrageWall extends StatefulWidget {
11 | final BarrageWallController controller;
12 |
13 | /// the bullet widget
14 | final Widget child;
15 |
16 | /// time in seconds of bullet show in screen
17 | final int speed;
18 |
19 | /// used to adjust speed for each channel
20 | final int speedCorrectionInMilliseconds;
21 |
22 | final double width;
23 | final double height;
24 |
25 | /// will not send bullets to the area is safe from bottom, default is 0
26 | /// used to not cover the subtitles
27 | final int safeBottomHeight;
28 |
29 | /// [disable] by default, will overwrite other bullets
30 | final bool massiveMode;
31 |
32 | /// used to make barrage tidy
33 | final double maxBulletHeight;
34 |
35 | /// enable debug mode, will display a debug panel with information
36 | final bool debug;
37 | final bool selfCreatedController;
38 |
39 | BarrageWall({
40 | List bullets,
41 | BarrageWallController controller,
42 | ValueNotifier timelineNotifier,
43 | this.speed = 5,
44 | this.child,
45 | this.width,
46 | this.height,
47 | this.massiveMode,
48 | this.maxBulletHeight,
49 | this.debug = false,
50 | this.safeBottomHeight = 0,
51 | this.speedCorrectionInMilliseconds = 3000,
52 | }) : controller = controller ??
53 | BarrageWallController.withBarrages(bullets,
54 | timelineNotifier: timelineNotifier),
55 | selfCreatedController = controller == null {
56 | if (controller != null) {
57 | this.controller.value = controller.value.size == 0
58 | ? BarrageWallValue.fromList(bullets ?? [])
59 | : controller.value;
60 | this.controller.timelineNotifier =
61 | controller.timelineNotifier ?? timelineNotifier;
62 | }
63 | }
64 |
65 | @override
66 | State createState() => _BarrageState();
67 | }
68 |
69 | class BulletPos {
70 | int id;
71 | int channel;
72 | double position; // from right to left
73 | double width;
74 | bool released = false;
75 | int lifetime;
76 | Widget widget;
77 |
78 | BulletPos({this.id, this.channel, this.position, this.width, this.widget})
79 | : lifetime = DateTime.now().millisecondsSinceEpoch;
80 |
81 | updateWith({double position, double width = 0}) {
82 | this.position = position;
83 | this.width = width > 0 ? width : this.width;
84 | this.lifetime = DateTime.now().millisecondsSinceEpoch;
85 | // debugPrint('update to $this');
86 | }
87 |
88 | bool get hasExtraSpace {
89 | return position > width + 8;
90 | }
91 |
92 | @override
93 | String toString() {
94 | return 'BulletPos{id: $id, channel: $channel, position: $position, width: $width, released: $released, widget: $widget}';
95 | }
96 | }
97 |
98 | class _BarrageState extends State with TickerProviderStateMixin {
99 | BarrageWallController _controller;
100 | Map _widgets = new LinkedHashMap();
101 | Random _random = new Random();
102 | int _processed = 0;
103 | double _width;
104 | double _height;
105 | Timer _cleaner;
106 |
107 | double _maxBulletHeight;
108 | int _usedChannel = 0;
109 | int _totalChannels;
110 | int _channelMask;
111 | Map _lastBullets = {};
112 | List _speedCorrectionForChannels = [];
113 |
114 | int _calcSafeHeight(double height) => height.isInfinite
115 | ? context.size.height.toInt()
116 | : (height - (_controller.safeBottomHeight ?? widget.safeBottomHeight))
117 | .toInt();
118 |
119 | /// null means no available channels exists
120 | int _nextChannel() {
121 | final _randomSeed = _totalChannels - 1;
122 |
123 | if (_usedChannel ^ _channelMask == 0) {
124 | return null;
125 | }
126 |
127 | var times = 1;
128 | var channel = _random.nextInt(_randomSeed);
129 | var channelCode = 1 << channel;
130 |
131 | while (
132 | _usedChannel & channelCode != 0 && _usedChannel ^ _channelMask != 0) {
133 | times++;
134 | channel = channel >= _totalChannels ? 0 : channel + 1;
135 | channelCode = 1 << channel;
136 |
137 | /// return random channel if no channels available and massive mode is enabled
138 | if (times > _totalChannels) {
139 | if (widget.massiveMode == true) {
140 | return _random.nextInt(_randomSeed);
141 | }
142 | return null;
143 | }
144 | }
145 | _usedChannel |= (1 << channel);
146 | return channel;
147 | }
148 |
149 | _releaseChannels() {
150 | // final now = DateTime.now().millisecondsSinceEpoch;
151 | for (int i = 0; i < _lastBullets.length; i++) {
152 | final channel = _lastBullets.keys.elementAt(i);
153 | var isNotReleased = !_lastBullets[channel].released;
154 | var liveTooLong =
155 | false; // now - _lastBullets[channel].lifetime > widget.speed * 2 * 1000 + widget.speedCorrectionInMilliseconds;
156 | if (liveTooLong ||
157 | (isNotReleased && _lastBullets[channel].hasExtraSpace)) {
158 | _lastBullets[channel].released = true;
159 | _usedChannel &= _channelMask ^ 1 << channel;
160 | }
161 | }
162 | }
163 |
164 | void _handleBullets(
165 | BuildContext context, {
166 | List bullets,
167 | double width,
168 | double end,
169 | }) {
170 | // cannot get the width of widget when not rendered, make a twice longer width for now
171 | end ??= width * 2;
172 |
173 | _releaseChannels();
174 | bullets.forEach((Bullet bullet) {
175 | AnimationController animationController;
176 |
177 | final nextChannel = _nextChannel();
178 | if (nextChannel != null) {}
179 |
180 | /// discard bullets do not have available channel and massive mode is not enabled too
181 | if (nextChannel == null) {
182 | return;
183 | }
184 |
185 | final showTimeInMilliseconds =
186 | widget.speed * 2 * 1000 - _speedCorrectionForChannels[nextChannel];
187 | animationController = AnimationController(
188 | duration: Duration(milliseconds: showTimeInMilliseconds),
189 | vsync: this);
190 | Animation animation = new Tween(begin: 0, end: end)
191 | .animate(animationController..forward());
192 |
193 | final channelHeightPos = nextChannel * _maxBulletHeight;
194 |
195 | /// make bullets not showed up in same time
196 | final fixedWidth = width + _random.nextInt(20).toDouble();
197 | final bulletWidget = AnimatedBuilder(
198 | animation: animation,
199 | child: bullet.child,
200 | builder: (BuildContext context, Widget child) {
201 | if (animation.isCompleted) {
202 | _lastBullets[nextChannel]?.updateWith(position: double.infinity);
203 | return const SizedBox();
204 | }
205 |
206 | var widgetWidth = 0.0;
207 | if (context.findRenderObject() != null) {
208 | final RenderBox box = context.findRenderObject();
209 |
210 | if (box != null) {
211 | try {
212 | widgetWidth = box?.size?.width;
213 | } catch(e) {
214 | widgetWidth = 0.0;
215 | }
216 | }
217 |
218 | // 通过计算出的 widget width 在判断弹幕完全移出了可视区域
219 | // if (box != null && animation.value > (fixedWidth + widgetWidth)) {
220 | // _lastBullets[nextChannel]?.updateWith(position: double.infinity);
221 | // return const SizedBox();
222 | // }
223 | }
224 |
225 | // debugPrint('${_lastBullets[nextChannel]?.id} == ${context.hashCode} $child pos: ${animation.value}');
226 | // 【通道不为空】或者【通道的最后元素】之后出现了可以新增的元素
227 | if (!_lastBullets.containsKey(nextChannel) ||
228 | (_lastBullets.containsKey(nextChannel) &&
229 | _lastBullets[nextChannel].position > animation.value)) {
230 | _lastBullets[nextChannel] = BulletPos(
231 | id: context.hashCode,
232 | channel: nextChannel,
233 | position: animation.value,
234 | width: widgetWidth,
235 | widget: child);
236 | // debugPrint('add ${_lastBullets[nextChannel]} - ${context.hashCode}');
237 | } else if (_lastBullets[nextChannel].id == context.hashCode) {
238 | // 当前元素是最后元素,更新相关信息
239 | _lastBullets[nextChannel]
240 | ?.updateWith(position: animation.value, width: widgetWidth);
241 | } // 其他情况直接更新页面元素
242 |
243 | final widthPos = fixedWidth - animation.value;
244 | return Transform.translate(
245 | offset: Offset(widthPos, channelHeightPos.toDouble()),
246 | child: child,
247 | );
248 | },
249 | );
250 | _widgets.putIfAbsent(animationController, () => bulletWidget);
251 | });
252 | }
253 |
254 | @override
255 | void didUpdateWidget(BarrageWall oldWidget) {
256 | super.didUpdateWidget(oldWidget);
257 | if (widget.controller != oldWidget.controller) {
258 | if (oldWidget.controller != null && widget.controller == null) {
259 | _controller = widget.controller;
260 | }
261 | }
262 | }
263 |
264 | void handleBullets() {
265 | if (_controller.isEnabled && _controller.value.waitingList.isNotEmpty) {
266 | if (_width == null || _height == null) {
267 | return;
268 | }
269 |
270 | if (_totalChannels == null) {
271 | _maxBulletHeight = widget.maxBulletHeight ?? 16;
272 | _totalChannels = _calcSafeHeight(_height) ~/ _maxBulletHeight;
273 | _channelMask = (2 << _totalChannels) - 1;
274 |
275 | List.generate(_totalChannels + 1, (i) {
276 | _speedCorrectionForChannels.add(
277 | widget.speedCorrectionInMilliseconds > 0
278 | ? _random.nextInt(widget.speedCorrectionInMilliseconds)
279 | : 0);
280 | return;
281 | });
282 | }
283 |
284 | _handleBullets(
285 | context,
286 | bullets: _controller.value.waitingList,
287 | width: _width,
288 | );
289 | _processed += _controller.value.waitingList.length;
290 | setState(() {});
291 | }
292 | }
293 |
294 | @override
295 | void initState() {
296 | _controller = widget.controller;
297 | _controller.initialize();
298 |
299 | _controller.addListener(handleBullets);
300 | _controller.enabledNotifier.addListener(() {
301 | setState(() {});
302 | });
303 |
304 | _cleaner = Timer.periodic(Duration(milliseconds: 100), (timer) {
305 | _widgets.removeWhere((controller, widget) {
306 | if (controller.isCompleted) {
307 | controller.dispose();
308 | return true;
309 | }
310 | return false;
311 | });
312 | });
313 |
314 | super.initState();
315 | }
316 |
317 | @override
318 | void dispose() {
319 | _cleaner?.cancel();
320 | _widgets.forEach((controller, widget) => controller.dispose());
321 | _controller.removeListener(handleBullets);
322 | if (widget.selfCreatedController) {
323 | _controller.dispose();
324 | }
325 | super.dispose();
326 | }
327 |
328 | @override
329 | Widget build(BuildContext context) {
330 | return LayoutBuilder(builder: (_, snapshot) {
331 | _width = widget.width ?? snapshot.maxWidth;
332 | _height = widget.height ?? snapshot.maxHeight;
333 |
334 | if (widget.debug) {
335 | debugPrint("BarrageWallValue: ${_controller.value}");
336 | debugPrint("TimelineNotifier: ${_controller.timelineNotifier?.value}");
337 | debugPrint("Timeline: ${_controller.timeline}");
338 | debugPrint("Bullets: ${_widgets.length}");
339 | debugPrint("Processed: $_processed");
340 | debugPrint("UsedChannels: ${_usedChannel.toRadixString(2)}");
341 | debugPrint("LastBullets[0]: ${_lastBullets[0]}");
342 | }
343 | return Stack(fit: StackFit.expand, children: [
344 | widget.debug
345 | ? Container(
346 | color: Colors.lightBlueAccent.withOpacity(0.7),
347 | child: Column(
348 | crossAxisAlignment: CrossAxisAlignment.start,
349 | mainAxisAlignment: MainAxisAlignment.end,
350 | children: [
351 | Text('BarrageWallValue: ${_controller.value}'),
352 | Text(
353 | 'TimelineNotifier: ${_controller.timelineNotifier?.value}'),
354 | Text('Timeline: ${_controller.timeline}'),
355 | Text('Bullets: ${_widgets.length}'),
356 | Text('UsedChannels: ${_usedChannel.toRadixString(2)}'),
357 | Text('LastBullets[0]: ${_lastBullets[0]}'),
358 | ]))
359 | : const SizedBox(),
360 | widget.child,
361 | _controller.isEnabled
362 | ? Stack(
363 | fit: StackFit.loose,
364 | children: []
365 | ..addAll(_widgets.values ?? const SizedBox()))
366 | : const SizedBox(),
367 | ]);
368 | });
369 | }
370 | }
371 |
372 | typedef int KeyCalculator(T t);
373 |
374 | class HashList {
375 | /// key is the showTime in minutes
376 | Map> _map = new HashMap();
377 | final Comparator comparator;
378 | final KeyCalculator keyCalculator;
379 |
380 | HashList({@required this.keyCalculator, this.comparator});
381 |
382 | void appendByMinutes(List values) {
383 | values.forEach((value) {
384 | int key = keyCalculator(value);
385 | if (_map.containsKey(key)) {
386 | _map[key].add(value);
387 | } else {
388 | _map.putIfAbsent(
389 | key, () => HashSet()..add(value));
390 | }
391 | });
392 | }
393 |
394 | @override
395 | String toString() {
396 | return 'HashList{$_map}';
397 | }
398 | }
399 |
400 | class BarrageValue {
401 | final int timeline;
402 | final bool isPlaying;
403 |
404 | BarrageValue({this.timeline = -1, this.isPlaying = false});
405 |
406 | BarrageValue copyWith({int timeline, bool isPlaying}) => BarrageValue(
407 | timeline: timeline ?? this.timeline,
408 | isPlaying: isPlaying ?? this.isPlaying);
409 |
410 | @override
411 | String toString() {
412 | return 'BarrageValue{timeline: $timeline, isPlaying: $isPlaying}';
413 | }
414 | }
415 |
416 | class BarrageWallValue {
417 | final HashList bullets;
418 | final int showedTimeBefore;
419 | final int size;
420 | final int processedSize;
421 | final List waitingList;
422 |
423 | BarrageWallValue.fromList(List bullets,
424 | {this.showedTimeBefore = 0, this.waitingList = const []})
425 | : bullets = HashList(
426 | keyCalculator: (t) => Duration(milliseconds: t.showTime).inMinutes)
427 | ..appendByMinutes(bullets),
428 | size = bullets.length,
429 | processedSize = 0;
430 |
431 | BarrageWallValue({
432 | this.bullets,
433 | this.showedTimeBefore = 0,
434 | this.waitingList = const [],
435 | this.size = 0,
436 | this.processedSize = 0,
437 | });
438 |
439 | BarrageWallValue copyWith({
440 | int showedTimeBefore,
441 | int lastProcessedTime,
442 | List waitingList,
443 | int processedSize,
444 | }) =>
445 | BarrageWallValue(
446 | bullets: bullets ?? this.bullets,
447 | showedTimeBefore: showedTimeBefore ?? this.showedTimeBefore,
448 | waitingList: waitingList ?? this.waitingList,
449 | size: this.size,
450 | processedSize: this.processedSize + processedSize,
451 | );
452 |
453 | @override
454 | String toString() {
455 | return 'BarrageWallValue{showedTimeBefore: $showedTimeBefore, size: $size, processed: $processedSize, waitings: ${waitingList.length}}';
456 | }
457 | }
458 |
459 | class BarrageWallController extends ValueNotifier {
460 | ValueNotifier timelineNotifier;
461 | int timeline = 0;
462 | int safeBottomHeight;
463 | ValueNotifier enabledNotifier = ValueNotifier(true);
464 | Timer _timer;
465 | bool _isDisposed = false;
466 |
467 | get isEnabled => enabledNotifier.value;
468 |
469 | BarrageWallController({List bullets, this.timelineNotifier})
470 | : super(BarrageWallValue.fromList(bullets ?? const []));
471 |
472 | BarrageWallController.withBarrages(List bullets,
473 | {this.timelineNotifier})
474 | : super(BarrageWallValue.fromList(bullets ?? const []));
475 |
476 | Future initialize() async {
477 | final Completer initializingCompleter = Completer();
478 |
479 | if (timelineNotifier == null) {
480 | _timer = Timer.periodic(const Duration(milliseconds: 100),
481 | (Timer timer) async {
482 | if (_isDisposed) {
483 | timer.cancel();
484 | return;
485 | }
486 |
487 | if (value.size == value.processedSize) {
488 | /*
489 | timer.cancel();*/
490 | return;
491 | }
492 |
493 | timeline += 100;
494 | tryFire();
495 | });
496 | } else {
497 | timelineNotifier.addListener(_handleTimelineNotifier);
498 | }
499 |
500 | initializingCompleter.complete();
501 | return initializingCompleter.future;
502 | }
503 |
504 | void _handleTimelineNotifier() {
505 | timeline = timelineNotifier.value.timeline;
506 | tryFire();
507 | }
508 |
509 | tryFire({List bullets = const []}) {
510 | final key = Duration(milliseconds: timeline).inMinutes;
511 | final exists = value.bullets._map.containsKey(key);
512 |
513 | if (exists || bullets.isNotEmpty) {
514 | List toBePrecessed = value.bullets._map[key]
515 | ?.where((barrage) =>
516 | barrage.showTime > value.showedTimeBefore &&
517 | barrage.showTime <= timeline)
518 | ?.toList() ??
519 | [];
520 |
521 | if (toBePrecessed.isNotEmpty || bullets.isNotEmpty) {
522 | value = value.copyWith(
523 | showedTimeBefore: timeline,
524 | waitingList: toBePrecessed..addAll(bullets ?? []),
525 | processedSize: toBePrecessed.length);
526 | }
527 | }
528 | }
529 |
530 | disable() {
531 | debugPrint("disable barrage ... current: $enabledNotifier");
532 | enabledNotifier.value = false;
533 | }
534 |
535 | enable() {
536 | debugPrint("enable barrage ... current: $enabledNotifier");
537 | enabledNotifier.value = true;
538 | }
539 |
540 | send(List bullets) {
541 | tryFire(bullets: bullets);
542 | }
543 |
544 | @override
545 | Future dispose() async {
546 | if (!_isDisposed) {
547 | _timer?.cancel();
548 | }
549 | _isDisposed = true;
550 | timelineNotifier?.dispose();
551 | enabledNotifier.dispose();
552 | super.dispose();
553 | }
554 | }
555 |
556 | class Bullet implements Comparable {
557 | final Widget child;
558 |
559 | /// in milliseconds
560 | final int showTime;
561 |
562 | const Bullet({@required this.child, this.showTime});
563 |
564 | @override
565 | String toString() {
566 | return 'Bullet{child: $child, showTime: $showTime}';
567 | }
568 |
569 | @override
570 | int compareTo(Bullet other) {
571 | return showTime.compareTo(other.showTime);
572 | }
573 | }
574 |
--------------------------------------------------------------------------------
/lib/page/base_state.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_animation_collection/utils/my_utils.dart';
3 |
4 | abstract class BaseState extends State with WidgetsBindingObserver {
5 | double _closeButtonOpacity = 0.0;
6 | int _startMilliseconds = 2000;
7 |
8 | @override
9 | void initState() {
10 | super.initState();
11 |
12 | if (_closeButtonOpacity != -1) Future.delayed(Duration(milliseconds: _startMilliseconds), _setCloseButtonOpacity);
13 | }
14 |
15 | initCloseButton(bool isOpen, int _startMilliseconds) {
16 | _closeButtonOpacity = isOpen ? 0.0 : -1;
17 | _startMilliseconds = _startMilliseconds;
18 | }
19 |
20 | _setCloseButtonOpacity() {
21 | setState(() {
22 | _closeButtonOpacity = 0.7;
23 | });
24 | }
25 |
26 | Widget MyCloseButton() {
27 | return FractionallySizedBox(
28 | widthFactor: 0.6,
29 | child: AnimatedOpacity(
30 | opacity: _closeButtonOpacity,
31 | duration: Duration(milliseconds: 1500),
32 | child: RoundButton(
33 | "关闭",
34 | () => MyUtils.popPage(context),
35 | backgroundColor: Color(0xFF8C66EB),
36 | textColor: Colors.white,
37 | ),
38 | ),
39 | );
40 | }
41 |
42 | // =================================== ↓ 常用自定义组件 ↓ ==========================================
43 |
44 | Widget RoundButton(String text, Function onTap, {Color backgroundColor, Color textColor, bool isFullWidth = true}) {
45 | return ButtonTheme(
46 | height: 52,
47 | minWidth: isFullWidth ? double.infinity : 0,
48 | child: RaisedButton(
49 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(50)),
50 | color: backgroundColor == null ? Colors.deepOrangeAccent : backgroundColor,
51 | // elevation: 1,
52 | highlightElevation: 0,
53 | disabledElevation: 0,
54 | onPressed: onTap,
55 | child: Text(
56 | text,
57 | style: TextStyle(
58 | fontSize: 16,
59 | color: textColor == null ? Colors.white : textColor,
60 | fontWeight: FontWeight.bold,
61 | ),
62 | ),
63 | ),
64 | );
65 | }
66 |
67 | // =================================== ↑ 常用自定义组件 ↑ ==========================================
68 | }
69 |
--------------------------------------------------------------------------------
/lib/page/ferriswheel/ferris_wheel_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_animation_collection/page/base_state.dart';
3 | import 'package:flutter_animation_collection/utils/my_utils.dart';
4 |
5 | import 'ferris_wheel_widget.dart';
6 |
7 | class FerrisWheelPage extends StatefulWidget {
8 | @override
9 | _FerrisWheelPageState createState() => _FerrisWheelPageState();
10 | }
11 |
12 | class _FerrisWheelPageState extends BaseState {
13 | List list = [];
14 |
15 | @override
16 | void initState() {
17 | initCloseButton(true, 500);
18 |
19 | super.initState();
20 |
21 | list = List.generate(30, (index) => "img$index");
22 | }
23 |
24 | @override
25 | Widget build(BuildContext context) {
26 | return Scaffold(
27 | backgroundColor: Color(0xFFC58FFF),
28 | body: Container(
29 | decoration: BoxDecoration(
30 | image: DecorationImage(image: AssetImage(MyUtils.getImage("bg_anim", format: "webp")), fit: BoxFit.fill),
31 | ),
32 | child: Column(
33 | children: [
34 | Spacer(flex: 1),
35 | _ferrisWheelLayout(),
36 | Expanded(
37 | flex: 4,
38 | child: Center(
39 | child: MyCloseButton(),
40 | ),
41 | ),
42 | ],
43 | ),
44 | ),
45 | );
46 | }
47 |
48 | _ferrisWheelLayout() {
49 | double ferrisWidth = MyUtils.screenWidth * 0.9;
50 | return Stack(
51 | children: [
52 | SizedBox(width: ferrisWidth, height: ferrisWidth * 1.5),
53 | Positioned(
54 | top: ferrisWidth / 2,
55 | left: 0,
56 | right: 0,
57 | child: Container(
58 | child: Center(child: Image.asset(MyUtils.getImage("img_mtl_bracket"))),
59 | ),
60 | ),
61 | FerrisWheelWidget(
62 | width: ferrisWidth,
63 | height: ferrisWidth,
64 | itemSize: Size(52, 52),
65 | children: _buildFlowChildren(),
66 | centerWidget: Padding(
67 | padding: EdgeInsets.all(50),
68 | child: Image.asset(MyUtils.getImage("img_mtl")),
69 | ),
70 | ),
71 | Positioned(
72 | top: (ferrisWidth - 70) / 2,
73 | left: 0,
74 | right: 0,
75 | child: Container(
76 | alignment: Alignment.topCenter,
77 | child: Container(
78 | width: 70,
79 | height: 70,
80 | decoration: BoxDecoration(
81 | color: Color(0xFF333333),
82 | borderRadius: BorderRadius.circular(68),
83 | border: Border.all(color: Color(0xFF252525), width: 4),
84 | ),
85 | alignment: Alignment.center,
86 | child: Text(
87 | "❤\nLove",
88 | style: TextStyle(color: Colors.white, fontSize: 14),
89 | textAlign: TextAlign.center,
90 | ),
91 | ),
92 | ),
93 | ),
94 | ],
95 | );
96 | }
97 |
98 | //生成Flow的数据
99 | List _buildFlowChildren() {
100 | return List.generate(
101 | 8,
102 | (index) => SizedBox(
103 | width: 52,
104 | height: 52,
105 | child: Container(
106 | decoration: BoxDecoration(
107 | borderRadius: BorderRadius.circular(56),
108 | border: Border.all(color: Colors.black, width: 2),
109 | ),
110 | child: ClipOval(
111 | child: Image.asset(MyUtils.getImage(list[index]), fit: BoxFit.cover),
112 | ),
113 | ),
114 | ),
115 | );
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/lib/page/ferriswheel/ferris_wheel_widget.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | class FerrisWheelWidget extends StatefulWidget {
6 | final double width;
7 | final double height;
8 |
9 | final Size itemSize;
10 |
11 | final List children;
12 | final Widget centerWidget; // 中心控件在 children 下方
13 |
14 | const FerrisWheelWidget({
15 | Key key,
16 | this.children,
17 | this.width,
18 | this.height,
19 | this.centerWidget,
20 | this.itemSize,
21 | }) : assert(children != null),
22 | assert(itemSize != null),
23 | super(key: key);
24 |
25 | @override
26 | _FerrisWheelWidgetState createState() => _FerrisWheelWidgetState();
27 | }
28 |
29 | class _FerrisWheelWidgetState extends State with SingleTickerProviderStateMixin {
30 | double width;
31 | double height;
32 |
33 | AnimationController _controller;
34 | double rad = 0.0;
35 |
36 | @override
37 | void initState() {
38 | super.initState();
39 | _controller = AnimationController(duration: Duration(milliseconds: 15 * 1000), vsync: this)
40 | ..addListener(
41 | () => setState(() => rad = 1 - _controller.value * pi * 2),
42 | );
43 | _controller.repeat();
44 | }
45 |
46 | @override
47 | void dispose() {
48 | if (_controller != null) _controller.dispose(); //销毁变量,释放资源
49 | super.dispose();
50 | }
51 |
52 | @override
53 | Widget build(BuildContext context) {
54 | Size size = MediaQuery.of(context).size;
55 | width = widget.width != null ? widget.width : size.width;
56 | height = widget.height != null ? widget.height : size.height;
57 |
58 | return Stack(
59 | children: [
60 | widget.centerWidget == null
61 | ? SizedBox()
62 | : Transform.rotate(
63 | angle: rad,
64 | child: Container(
65 | width: width,
66 | height: height,
67 | child: widget.centerWidget,
68 | ),
69 | ),
70 | Container(
71 | width: width,
72 | height: height,
73 | child: Flow(
74 | delegate: _CircleFlowDelegate(rad, widget.itemSize),
75 | children: widget.children,
76 | ),
77 | ),
78 | ],
79 | );
80 | }
81 | }
82 |
83 | class _CircleFlowDelegate extends FlowDelegate {
84 | final double rad;
85 | final Size size;
86 |
87 | _CircleFlowDelegate(this.rad, this.size);
88 |
89 | @override
90 | void paintChildren(FlowPaintingContext context) {
91 | // 半径
92 | double radius = context.size.shortestSide / 2;
93 |
94 | var count = context.childCount;
95 | var perRad = 2 * pi / count;
96 | for (int i = 0; i < count; i++) {
97 | // item 的宽高
98 | var cSizeX = context.getChildSize(i).width / 2;
99 | var cSizeY = context.getChildSize(i).height / 2;
100 | // 每个 item 的位置
101 | var offsetX = (radius - cSizeX) * cos(i * perRad + rad) + radius;
102 | var offsetY = (radius - cSizeY) * sin(i * perRad + rad) + radius;
103 | context.paintChild(i, transform: Matrix4.translationValues(offsetX - cSizeX, offsetY - cSizeY, 0.0));
104 | }
105 | }
106 |
107 | @override
108 | Size getSize(BoxConstraints constraints) {
109 | return super.getSize(constraints);
110 | }
111 |
112 | @override
113 | BoxConstraints getConstraintsForChild(int i, BoxConstraints constraints) {
114 | return BoxConstraints(
115 | minWidth: size.width,
116 | minHeight: size.height,
117 | maxWidth: size.width,
118 | maxHeight: size.height,
119 | );
120 | }
121 |
122 | @override
123 | bool shouldRepaint(FlowDelegate oldDelegate) {
124 | return true;
125 | }
126 | }
127 |
--------------------------------------------------------------------------------
/lib/page/view/my_page_fade_route_builder.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | // 渐变出现
4 | class MyPageFadeTransitionRouteBuilder extends PageRouteBuilder {
5 | // 跳转的页面
6 | final Widget widget;
7 | final int duration;
8 |
9 | MyPageFadeTransitionRouteBuilder(this.widget, {this.duration = 500})
10 | : super(
11 | transitionDuration: Duration(milliseconds: duration),
12 | pageBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation) {
13 | return widget;
14 | },
15 | transitionsBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation, Widget child) {
16 | return FadeTransition(
17 | child: child,
18 | opacity: Tween(begin: 0.0, end: 1.0).animate(
19 | CurvedAnimation(parent: animation, curve: Curves.fastOutSlowIn),
20 | ),
21 | );
22 | },
23 | );
24 | }
25 |
--------------------------------------------------------------------------------
/lib/page/view/my_page_slide_route_builder.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | // 从下往上划出
4 | class MyPageSlideTransitionRouteBuilder extends PageRouteBuilder {
5 | // 跳转的页面
6 | final Widget widget;
7 | final int duration;
8 |
9 | MyPageSlideTransitionRouteBuilder(this.widget, {this.duration = 500})
10 | : super(
11 | transitionDuration: Duration(milliseconds: duration),
12 | pageBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation) {
13 | return widget;
14 | },
15 | transitionsBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation, Widget child) {
16 | return SlideTransition(
17 | child: child,
18 | position: Tween(begin: Offset(0.0, 1.0), end: Offset.zero).animate(
19 | CurvedAnimation(parent: animation, curve: Curves.fastOutSlowIn),
20 | ),
21 | );
22 | },
23 | );
24 | }
25 |
--------------------------------------------------------------------------------
/lib/utils/my_utils.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_animation_collection/page/view/my_page_fade_route_builder.dart';
3 | import 'package:flutter_animation_collection/page/view/my_page_slide_route_builder.dart';
4 |
5 | class MyUtils {
6 | static double screenWidth = 375.0;
7 |
8 | static double getScreenWidth(BuildContext context) {
9 | return MediaQuery.of(context).size.width;
10 | }
11 |
12 | static double getScreenHeight(BuildContext context) {
13 | return MediaQuery.of(context).size.height;
14 | }
15 |
16 | ///获取本地资源图片
17 | static String getImage(String imageName, {String format: 'png'}) {
18 | return "assets/images/$imageName.$format";
19 | }
20 |
21 | /// 跳转页面
22 | static Future