├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── flutter_microanimations
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── 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-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── assets
├── animations
│ ├── angry.json
│ ├── doubt.json
│ ├── happy.json
│ ├── sad.json
│ ├── superHappy.json
│ └── youtube-like.json
├── card.png
├── dice1.png
├── dice2.png
├── food01.png
├── food02.png
├── food03.png
├── food04.png
├── food05.png
├── food06.png
├── food07.png
├── food08.png
├── food09.png
└── food10.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
├── animations
│ ├── airbnb_loading_animation.dart
│ ├── animated_background.dart
│ ├── animated_play_button.dart
│ ├── animated_scroll
│ │ ├── components
│ │ │ └── animated_scroll_card.dart
│ │ └── pages
│ │ │ └── animated_scroll_screen.dart
│ ├── components
│ │ └── tween_wave.dart
│ ├── dice_animation.dart
│ ├── explicit_animations.dart
│ ├── figma_to_lottie.dart
│ ├── gradient_play_button.dart
│ ├── like_button.dart
│ ├── loop_button.dart
│ ├── music_wave.dart
│ ├── notification_rotation.dart
│ ├── ontap_animation.dart
│ ├── radial_menu.dart
│ ├── radio_button.dart
│ ├── raiting_interaction_screen.dart
│ ├── style
│ │ └── colors.dart
│ ├── tiktok_animation.dart
│ ├── tiktok_loading.dart
│ └── tutorials
│ │ ├── explicit_animation.dart
│ │ └── first_explicit_animation.dart
└── main.dart
├── pubspec.lock
├── pubspec.yaml
├── test
└── widget_test.dart
├── web
├── favicon.png
├── icons
│ ├── Icon-192.png
│ ├── Icon-512.png
│ ├── Icon-maskable-192.png
│ └── Icon-maskable-512.png
├── index.html
└── manifest.json
└── windows
├── .gitignore
├── CMakeLists.txt
├── flutter
├── CMakeLists.txt
├── generated_plugin_registrant.cc
├── generated_plugin_registrant.h
└── generated_plugins.cmake
└── runner
├── CMakeLists.txt
├── Runner.rc
├── flutter_window.cpp
├── flutter_window.h
├── main.cpp
├── resource.h
├── resources
└── app_icon.ico
├── runner.exe.manifest
├── utils.cpp
├── utils.h
├── win32_window.cpp
└── win32_window.h
/.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 |
43 | # Android Studio will place build artifacts here
44 | /android/app/debug
45 | /android/app/profile
46 | /android/app/release
47 |
--------------------------------------------------------------------------------
/.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: 097d3313d8e2c7f901932d63e537c1acefb87800
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # flutter_microanimations
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at
17 | # https://dart-lang.github.io/linter/lints/index.html.
18 | #
19 | # Instead of disabling a lint rule for the entire project in the
20 | # section below, it can also be suppressed for a single line of code
21 | # or a specific dart file by using the `// ignore: name_of_lint` and
22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
23 | # producing the lint.
24 | rules:
25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27 |
28 | # Additional information about this file can be found at
29 | # https://dart.dev/guides/language/analysis-options
30 |
--------------------------------------------------------------------------------
/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 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/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 flutter.compileSdkVersion
30 |
31 | compileOptions {
32 | sourceCompatibility JavaVersion.VERSION_1_8
33 | targetCompatibility JavaVersion.VERSION_1_8
34 | }
35 |
36 | kotlinOptions {
37 | jvmTarget = '1.8'
38 | }
39 |
40 | sourceSets {
41 | main.java.srcDirs += 'src/main/kotlin'
42 | }
43 |
44 | defaultConfig {
45 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
46 | applicationId "com.example.flutter_microanimations"
47 | minSdkVersion flutter.minSdkVersion
48 | targetSdkVersion flutter.targetSdkVersion
49 | versionCode flutterVersionCode.toInteger()
50 | versionName flutterVersionName
51 | }
52 |
53 | buildTypes {
54 | release {
55 | // TODO: Add your own signing config for the release build.
56 | // Signing with the debug keys for now, so `flutter run --release` works.
57 | signingConfig signingConfigs.debug
58 | }
59 | }
60 | }
61 |
62 | flutter {
63 | source '../..'
64 | }
65 |
66 | dependencies {
67 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
68 | }
69 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
15 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
30 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/flutter_microanimations/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.flutter_microanimations
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/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/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/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.6.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:4.1.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | mavenCentral()
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-6.7-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/animations/doubt.json:
--------------------------------------------------------------------------------
1 | {"v":"5.7.4","fr":60,"ip":0,"op":216,"w":500,"h":500,"nm":"042 - RollingEyesUp","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"Full","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.215,"y":1},"o":{"x":0.723,"y":0},"t":58.572,"s":[250,260.75,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.167,"y":0.167},"t":127.143,"s":[250,230.75,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.215,"y":1},"o":{"x":0.723,"y":0},"t":140,"s":[250,230.75,0],"to":[0,0,0],"ti":[0,0,0]},{"t":215,"s":[250,260.75,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ip":0,"op":216,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Mouth","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.215],"y":[1]},"o":{"x":[0.723],"y":[0]},"t":59,"s":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":127.143,"s":[-13.5]},{"i":{"x":[0.215],"y":[1]},"o":{"x":[0.723],"y":[0]},"t":140,"s":[-13.5]},{"t":215,"s":[0]}],"ix":10},"p":{"a":0,"k":[-0.25,90,0],"ix":2,"l":2},"a":{"a":0,"k":[-0.25,100.75,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.196,0.196],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"t":0,"s":[105,20]},{"i":{"x":[0,0.215],"y":[1,1]},"o":{"x":[0.723,0.723],"y":[0,0]},"t":59,"s":[150,50]},{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0,0]},"t":127.143,"s":[105,20]},{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.723,0.723],"y":[0,0]},"t":140,"s":[105,20]},{"t":215,"s":[105,20]}],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":1,"k":[{"i":{"x":[0.196],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[20]},{"t":59,"s":[191]}],"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.773832014495,0.282353001015,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.20000001496,0.192156877705,0.160784313725,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-0.25,100.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":216,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"R-BRow- 01","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.215,"y":1},"o":{"x":0.723,"y":0},"t":58.572,"s":[77.942,-102.785,0],"to":[0,4.167,0],"ti":[0,-4.167,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.167,"y":0.167},"t":127.143,"s":[77.942,-77.785,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.215,"y":1},"o":{"x":0.723,"y":0},"t":140,"s":[77.942,-77.785,0],"to":[0,-4.167,0],"ti":[0,4.167,0]},{"t":215,"s":[77.942,-102.785,0]}],"ix":2,"l":2},"a":{"a":0,"k":[48.44,8.698,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[4.665,0],[0,0],[0,4.665],[-4.665,0],[0,0],[0,-4.666]],"o":[[0,0],[-4.665,0],[0,-4.666],[0,0],[4.665,0],[0,4.665]],"v":[[39.743,8.447],[-39.742,8.447],[-48.189,0.001],[-39.742,-8.447],[39.743,-8.447],[48.189,0.001]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.2,0.19199999641,0.161000001197,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[48.439,8.698],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":216,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"L-BRow- 01","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.215,"y":1},"o":{"x":0.723,"y":0},"t":58.572,"s":[-77.942,-102.785,0],"to":[0,4.167,0],"ti":[0,-4.167,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.167,"y":0.167},"t":127.143,"s":[-77.942,-77.785,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.215,"y":1},"o":{"x":0.723,"y":0},"t":140,"s":[-77.942,-77.785,0],"to":[0,-4.167,0],"ti":[0,4.167,0]},{"t":215,"s":[-77.942,-102.785,0]}],"ix":2,"l":2},"a":{"a":0,"k":[48.44,8.698,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[4.665,0],[0,0],[0,4.665],[-4.665,0],[0,0],[0,-4.666]],"o":[[0,0],[-4.665,0],[0,-4.666],[0,0],[4.665,0],[0,4.665]],"v":[[39.742,8.447],[-39.742,8.447],[-48.19,0.001],[-39.742,-8.447],[39.742,-8.447],[48.19,0.001]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.2,0.19199999641,0.161000001197,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[48.44,8.698],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":216,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[329,235,0],"ix":2,"l":2},"a":{"a":0,"k":[-89.5,-15,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-145,-15],[-34,-15]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.20000001496,0.192156877705,0.160784313725,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":20,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.972549079446,0.768627510819,0.325490196078,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":23,"op":28,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Leye- Blink 4","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":180,"ix":10},"p":{"a":0,"k":[78.937,-26.517,0],"ix":2,"l":2},"a":{"a":0,"k":[59.918,59.919,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":5,"nm":"Linear Wipe","np":5,"mn":"ADBE Linear Wipe","ix":1,"en":1,"ef":[{"ty":0,"nm":"Transition Completion","mn":"ADBE Linear Wipe-0001","ix":1,"v":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":10,"s":[65]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":25,"s":[52.5]},{"t":40,"s":[65]}],"ix":1}},{"ty":0,"nm":"Wipe Angle","mn":"ADBE Linear Wipe-0002","ix":2,"v":{"a":0,"k":0,"ix":2}},{"ty":0,"nm":"Feather","mn":"ADBE Linear Wipe-0003","ix":3,"v":{"a":0,"k":0,"ix":3}}]}],"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-32.954],[32.954,0],[0,32.954],[-32.955,0]],"o":[[0,32.954],[-32.955,0],[0,-32.954],[32.954,0]],"v":[[59.669,-0.001],[0.001,59.669],[-59.669,-0.001],[0.001,-59.669]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.972549079446,0.768627510819,0.325490196078,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[59.918,59.919],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":10,"op":41,"st":10,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"Leye- Blink 3","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[78.937,-26.517,0],"ix":2,"l":2},"a":{"a":0,"k":[59.918,59.919,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":5,"nm":"Linear Wipe","np":5,"mn":"ADBE Linear Wipe","ix":1,"en":1,"ef":[{"ty":0,"nm":"Transition Completion","mn":"ADBE Linear Wipe-0001","ix":1,"v":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":10,"s":[60]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":25,"s":[47]},{"t":40,"s":[60]}],"ix":1}},{"ty":0,"nm":"Wipe Angle","mn":"ADBE Linear Wipe-0002","ix":2,"v":{"a":0,"k":180,"ix":2}},{"ty":0,"nm":"Feather","mn":"ADBE Linear Wipe-0003","ix":3,"v":{"a":0,"k":0,"ix":3}}]}],"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-32.954],[32.954,0],[0,32.954],[-32.955,0]],"o":[[0,32.954],[-32.955,0],[0,-32.954],[32.954,0]],"v":[[59.669,-0.001],[0.001,59.669],[-59.669,-0.001],[0.001,-59.669]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.972549079446,0.768627510819,0.325490196078,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[59.918,59.919],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":10,"op":41,"st":10,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"Reye- 01","parent":9,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[37.104,19.012,0],"ix":2,"l":2},"a":{"a":0,"k":[6.342,6.342,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-3.364],[3.364,0],[0,3.365],[-3.365,0]],"o":[[0,3.365],[-3.365,0],[0,-3.364],[3.364,0]],"v":[[6.093,0],[0.001,6.092],[-6.093,0],[0.001,-6.092]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[6.342,6.342],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":216,"st":0,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"Reye- 02","parent":15,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[179.662,22.779,0],"ix":2,"l":2},"a":{"a":0,"k":[22.779,22.779,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-12.442],[12.442,0],[0,12.442],[-12.443,0]],"o":[[0,12.442],[-12.443,0],[0,-12.442],[12.442,0]],"v":[[22.529,-0.001],[0.001,22.529],[-22.529,-0.001],[0.001,-22.529]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.2,0.19199999641,0.161000001197,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[22.779,22.779],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":216,"st":0,"bm":0},{"ddd":0,"ind":10,"ty":4,"nm":"Reye- 03","parent":16,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[215.802,59.919,0],"ix":2,"l":2},"a":{"a":0,"k":[59.918,59.919,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-32.954],[32.954,0],[0,32.954],[-32.953,0]],"o":[[0,32.954],[-32.953,0],[0,-32.954],[32.954,0]],"v":[[59.669,-0.001],[-0.001,59.669],[-59.669,-0.001],[-0.001,-59.669]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[59.919,59.919],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":216,"st":0,"bm":0},{"ddd":0,"ind":11,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[173,235,0],"ix":2,"l":2},"a":{"a":0,"k":[-89.5,-15,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-145,-15],[-34,-15]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.20000001496,0.192156877705,0.160784313725,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":20,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.972549079446,0.768627510819,0.325490196078,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":23,"op":28,"st":0,"bm":0},{"ddd":0,"ind":12,"ty":4,"nm":"Leye- Blink 2","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":180,"ix":10},"p":{"a":0,"k":[-77.063,-26.517,0],"ix":2,"l":2},"a":{"a":0,"k":[59.918,59.919,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":5,"nm":"Linear Wipe","np":5,"mn":"ADBE Linear Wipe","ix":1,"en":1,"ef":[{"ty":0,"nm":"Transition Completion","mn":"ADBE Linear Wipe-0001","ix":1,"v":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":10,"s":[65]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":25,"s":[52.5]},{"t":40,"s":[65]}],"ix":1}},{"ty":0,"nm":"Wipe Angle","mn":"ADBE Linear Wipe-0002","ix":2,"v":{"a":0,"k":0,"ix":2}},{"ty":0,"nm":"Feather","mn":"ADBE Linear Wipe-0003","ix":3,"v":{"a":0,"k":0,"ix":3}}]}],"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-32.954],[32.954,0],[0,32.954],[-32.955,0]],"o":[[0,32.954],[-32.955,0],[0,-32.954],[32.954,0]],"v":[[59.669,-0.001],[0.001,59.669],[-59.669,-0.001],[0.001,-59.669]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.972549079446,0.768627510819,0.325490196078,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[59.918,59.919],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":10,"op":41,"st":10,"bm":0},{"ddd":0,"ind":13,"ty":4,"nm":"Leye- Blink 1","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-77.063,-26.517,0],"ix":2,"l":2},"a":{"a":0,"k":[59.918,59.919,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":5,"nm":"Linear Wipe","np":5,"mn":"ADBE Linear Wipe","ix":1,"en":1,"ef":[{"ty":0,"nm":"Transition Completion","mn":"ADBE Linear Wipe-0001","ix":1,"v":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":10,"s":[60]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":25,"s":[47]},{"t":40,"s":[60]}],"ix":1}},{"ty":0,"nm":"Wipe Angle","mn":"ADBE Linear Wipe-0002","ix":2,"v":{"a":0,"k":180,"ix":2}},{"ty":0,"nm":"Feather","mn":"ADBE Linear Wipe-0003","ix":3,"v":{"a":0,"k":0,"ix":3}}]}],"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-32.954],[32.954,0],[0,32.954],[-32.955,0]],"o":[[0,32.954],[-32.955,0],[0,-32.954],[32.954,0]],"v":[[59.669,-0.001],[0.001,59.669],[-59.669,-0.001],[0.001,-59.669]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.972549079446,0.768627510819,0.325490196078,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[59.918,59.919],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":10,"op":41,"st":10,"bm":0},{"ddd":0,"ind":14,"ty":4,"nm":"Leye- 01","parent":15,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[37.104,19.012,0],"ix":2,"l":2},"a":{"a":0,"k":[6.342,6.342,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-3.364],[3.365,0],[0,3.365],[-3.364,0]],"o":[[0,3.365],[-3.364,0],[0,-3.364],[3.365,0]],"v":[[6.092,0],[0,6.092],[-6.092,0],[0,-6.092]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[6.342,6.342],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":216,"st":0,"bm":0},{"ddd":0,"ind":15,"ty":4,"nm":"Leye- 02","parent":16,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.676,"y":0},"o":{"x":0.629,"y":0},"t":30,"s":[60.937,56.483,0],"to":[-1.677,0.146,0],"ti":[-6.723,39.646,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.559,"y":0.995},"t":87.143,"s":[20.436,57.236,0],"to":[7.691,-45.352,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"t":127.143,"s":[75.937,25.483,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.215,"y":1},"o":{"x":0.622,"y":0},"t":140,"s":[75.937,25.483,0],"to":[0,0,0],"ti":[5.446,-10.54,0]},{"t":215,"s":[60.937,56.483,0]}],"ix":2,"l":2},"a":{"a":0,"k":[22.779,22.779,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-12.442],[12.442,0],[0,12.442],[-12.442,0]],"o":[[0,12.442],[-12.442,0],[0,-12.442],[12.442,0]],"v":[[22.529,-0.001],[0,22.529],[-22.529,-0.001],[0,-22.529]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.2,0.19199999641,0.161000001197,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[22.779,22.779],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":216,"st":0,"bm":0},{"ddd":0,"ind":16,"ty":4,"nm":"Leye- 03","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-77.063,-26.517,0],"ix":2,"l":2},"a":{"a":0,"k":[59.918,59.919,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-32.954],[32.954,0],[0,32.954],[-32.955,0]],"o":[[0,32.954],[-32.955,0],[0,-32.954],[32.954,0]],"v":[[59.669,-0.001],[0.001,59.669],[-59.669,-0.001],[0.001,-59.669]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[59.918,59.919],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":216,"st":0,"bm":0},{"ddd":0,"ind":17,"ty":4,"nm":"face - 01","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,240.496,0],"ix":2,"l":2},"a":{"a":0,"k":[181.13,181.13,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-99.897],[99.898,0],[0,99.897],[-99.897,0]],"o":[[0,99.897],[-99.897,0],[0,-99.897],[99.898,0]],"v":[[180.88,0.001],[0,180.88],[-180.88,0.001],[0,-180.88]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.847000002394,0.368999974868,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[181.13,181.13],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":216,"st":0,"bm":0},{"ddd":0,"ind":18,"ty":4,"nm":"face - 02","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,250,0],"ix":2,"l":2},"a":{"a":0,"k":[200.25,200.25,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-110.457],[110.457,0],[0,110.457],[-110.457,0]],"o":[[0,110.457],[-110.457,0],[0,-110.457],[110.457,0]],"v":[[200,0],[0,200],[-200,0],[0,-200]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.972999961703,0.769000004787,0.325,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[200.25,200.25],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":216,"st":0,"bm":0}],"markers":[]}
--------------------------------------------------------------------------------
/assets/card.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/assets/card.png
--------------------------------------------------------------------------------
/assets/dice1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/assets/dice1.png
--------------------------------------------------------------------------------
/assets/dice2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/assets/dice2.png
--------------------------------------------------------------------------------
/assets/food01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/assets/food01.png
--------------------------------------------------------------------------------
/assets/food02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/assets/food02.png
--------------------------------------------------------------------------------
/assets/food03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/assets/food03.png
--------------------------------------------------------------------------------
/assets/food04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/assets/food04.png
--------------------------------------------------------------------------------
/assets/food05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/assets/food05.png
--------------------------------------------------------------------------------
/assets/food06.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/assets/food06.png
--------------------------------------------------------------------------------
/assets/food07.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/assets/food07.png
--------------------------------------------------------------------------------
/assets/food08.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/assets/food08.png
--------------------------------------------------------------------------------
/assets/food09.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/assets/food09.png
--------------------------------------------------------------------------------
/assets/food10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/assets/food10.png
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | 12.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 = 54;
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 = 1510;
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 | alwaysOutOfDate = 1;
175 | buildActionMask = 2147483647;
176 | files = (
177 | );
178 | inputPaths = (
179 | "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
180 | );
181 | name = "Thin Binary";
182 | outputPaths = (
183 | );
184 | runOnlyForDeploymentPostprocessing = 0;
185 | shellPath = /bin/sh;
186 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
187 | };
188 | 9740EEB61CF901F6004384FC /* Run Script */ = {
189 | isa = PBXShellScriptBuildPhase;
190 | alwaysOutOfDate = 1;
191 | buildActionMask = 2147483647;
192 | files = (
193 | );
194 | inputPaths = (
195 | );
196 | name = "Run Script";
197 | outputPaths = (
198 | );
199 | runOnlyForDeploymentPostprocessing = 0;
200 | shellPath = /bin/sh;
201 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
202 | };
203 | /* End PBXShellScriptBuildPhase section */
204 |
205 | /* Begin PBXSourcesBuildPhase section */
206 | 97C146EA1CF9000F007C117D /* Sources */ = {
207 | isa = PBXSourcesBuildPhase;
208 | buildActionMask = 2147483647;
209 | files = (
210 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
211 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
212 | );
213 | runOnlyForDeploymentPostprocessing = 0;
214 | };
215 | /* End PBXSourcesBuildPhase section */
216 |
217 | /* Begin PBXVariantGroup section */
218 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
219 | isa = PBXVariantGroup;
220 | children = (
221 | 97C146FB1CF9000F007C117D /* Base */,
222 | );
223 | name = Main.storyboard;
224 | sourceTree = "";
225 | };
226 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
227 | isa = PBXVariantGroup;
228 | children = (
229 | 97C147001CF9000F007C117D /* Base */,
230 | );
231 | name = LaunchScreen.storyboard;
232 | sourceTree = "";
233 | };
234 | /* End PBXVariantGroup section */
235 |
236 | /* Begin XCBuildConfiguration section */
237 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
238 | isa = XCBuildConfiguration;
239 | buildSettings = {
240 | ALWAYS_SEARCH_USER_PATHS = NO;
241 | CLANG_ANALYZER_NONNULL = YES;
242 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
243 | CLANG_CXX_LIBRARY = "libc++";
244 | CLANG_ENABLE_MODULES = YES;
245 | CLANG_ENABLE_OBJC_ARC = YES;
246 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
247 | CLANG_WARN_BOOL_CONVERSION = YES;
248 | CLANG_WARN_COMMA = YES;
249 | CLANG_WARN_CONSTANT_CONVERSION = YES;
250 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
251 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
252 | CLANG_WARN_EMPTY_BODY = YES;
253 | CLANG_WARN_ENUM_CONVERSION = YES;
254 | CLANG_WARN_INFINITE_RECURSION = YES;
255 | CLANG_WARN_INT_CONVERSION = YES;
256 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
257 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
258 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
259 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
260 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
261 | CLANG_WARN_STRICT_PROTOTYPES = YES;
262 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
263 | CLANG_WARN_UNREACHABLE_CODE = YES;
264 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
265 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
266 | COPY_PHASE_STRIP = NO;
267 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
268 | ENABLE_NS_ASSERTIONS = NO;
269 | ENABLE_STRICT_OBJC_MSGSEND = YES;
270 | GCC_C_LANGUAGE_STANDARD = gnu99;
271 | GCC_NO_COMMON_BLOCKS = YES;
272 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
273 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
274 | GCC_WARN_UNDECLARED_SELECTOR = YES;
275 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
276 | GCC_WARN_UNUSED_FUNCTION = YES;
277 | GCC_WARN_UNUSED_VARIABLE = YES;
278 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
279 | MTL_ENABLE_DEBUG_INFO = NO;
280 | SDKROOT = iphoneos;
281 | SUPPORTED_PLATFORMS = iphoneos;
282 | TARGETED_DEVICE_FAMILY = "1,2";
283 | VALIDATE_PRODUCT = YES;
284 | };
285 | name = Profile;
286 | };
287 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
288 | isa = XCBuildConfiguration;
289 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
290 | buildSettings = {
291 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
292 | CLANG_ENABLE_MODULES = YES;
293 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
294 | DEVELOPMENT_TEAM = 427XUC28W5;
295 | ENABLE_BITCODE = NO;
296 | INFOPLIST_FILE = Runner/Info.plist;
297 | LD_RUNPATH_SEARCH_PATHS = (
298 | "$(inherited)",
299 | "@executable_path/Frameworks",
300 | );
301 | PRODUCT_BUNDLE_IDENTIFIER = com.junio9.flutterMicroanimations;
302 | PRODUCT_NAME = "$(TARGET_NAME)";
303 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
304 | SWIFT_VERSION = 5.0;
305 | VERSIONING_SYSTEM = "apple-generic";
306 | };
307 | name = Profile;
308 | };
309 | 97C147031CF9000F007C117D /* Debug */ = {
310 | isa = XCBuildConfiguration;
311 | buildSettings = {
312 | ALWAYS_SEARCH_USER_PATHS = NO;
313 | CLANG_ANALYZER_NONNULL = YES;
314 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
315 | CLANG_CXX_LIBRARY = "libc++";
316 | CLANG_ENABLE_MODULES = YES;
317 | CLANG_ENABLE_OBJC_ARC = YES;
318 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
319 | CLANG_WARN_BOOL_CONVERSION = YES;
320 | CLANG_WARN_COMMA = YES;
321 | CLANG_WARN_CONSTANT_CONVERSION = YES;
322 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
323 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
324 | CLANG_WARN_EMPTY_BODY = YES;
325 | CLANG_WARN_ENUM_CONVERSION = YES;
326 | CLANG_WARN_INFINITE_RECURSION = YES;
327 | CLANG_WARN_INT_CONVERSION = YES;
328 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
329 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
330 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
331 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
332 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
333 | CLANG_WARN_STRICT_PROTOTYPES = YES;
334 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
335 | CLANG_WARN_UNREACHABLE_CODE = YES;
336 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
337 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
338 | COPY_PHASE_STRIP = NO;
339 | DEBUG_INFORMATION_FORMAT = dwarf;
340 | ENABLE_STRICT_OBJC_MSGSEND = YES;
341 | ENABLE_TESTABILITY = YES;
342 | GCC_C_LANGUAGE_STANDARD = gnu99;
343 | GCC_DYNAMIC_NO_PIC = NO;
344 | GCC_NO_COMMON_BLOCKS = YES;
345 | GCC_OPTIMIZATION_LEVEL = 0;
346 | GCC_PREPROCESSOR_DEFINITIONS = (
347 | "DEBUG=1",
348 | "$(inherited)",
349 | );
350 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
351 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
352 | GCC_WARN_UNDECLARED_SELECTOR = YES;
353 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
354 | GCC_WARN_UNUSED_FUNCTION = YES;
355 | GCC_WARN_UNUSED_VARIABLE = YES;
356 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
357 | MTL_ENABLE_DEBUG_INFO = YES;
358 | ONLY_ACTIVE_ARCH = YES;
359 | SDKROOT = iphoneos;
360 | TARGETED_DEVICE_FAMILY = "1,2";
361 | };
362 | name = Debug;
363 | };
364 | 97C147041CF9000F007C117D /* Release */ = {
365 | isa = XCBuildConfiguration;
366 | buildSettings = {
367 | ALWAYS_SEARCH_USER_PATHS = NO;
368 | CLANG_ANALYZER_NONNULL = YES;
369 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
370 | CLANG_CXX_LIBRARY = "libc++";
371 | CLANG_ENABLE_MODULES = YES;
372 | CLANG_ENABLE_OBJC_ARC = YES;
373 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
374 | CLANG_WARN_BOOL_CONVERSION = YES;
375 | CLANG_WARN_COMMA = YES;
376 | CLANG_WARN_CONSTANT_CONVERSION = YES;
377 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
378 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
379 | CLANG_WARN_EMPTY_BODY = YES;
380 | CLANG_WARN_ENUM_CONVERSION = YES;
381 | CLANG_WARN_INFINITE_RECURSION = YES;
382 | CLANG_WARN_INT_CONVERSION = YES;
383 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
384 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
385 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
386 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
387 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
388 | CLANG_WARN_STRICT_PROTOTYPES = YES;
389 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
390 | CLANG_WARN_UNREACHABLE_CODE = YES;
391 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
392 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
393 | COPY_PHASE_STRIP = NO;
394 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
395 | ENABLE_NS_ASSERTIONS = NO;
396 | ENABLE_STRICT_OBJC_MSGSEND = YES;
397 | GCC_C_LANGUAGE_STANDARD = gnu99;
398 | GCC_NO_COMMON_BLOCKS = YES;
399 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
400 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
401 | GCC_WARN_UNDECLARED_SELECTOR = YES;
402 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
403 | GCC_WARN_UNUSED_FUNCTION = YES;
404 | GCC_WARN_UNUSED_VARIABLE = YES;
405 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
406 | MTL_ENABLE_DEBUG_INFO = NO;
407 | SDKROOT = iphoneos;
408 | SUPPORTED_PLATFORMS = iphoneos;
409 | SWIFT_COMPILATION_MODE = wholemodule;
410 | SWIFT_OPTIMIZATION_LEVEL = "-O";
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 | DEVELOPMENT_TEAM = 427XUC28W5;
424 | ENABLE_BITCODE = NO;
425 | INFOPLIST_FILE = Runner/Info.plist;
426 | LD_RUNPATH_SEARCH_PATHS = (
427 | "$(inherited)",
428 | "@executable_path/Frameworks",
429 | );
430 | PRODUCT_BUNDLE_IDENTIFIER = com.junio9.flutterMicroanimations;
431 | PRODUCT_NAME = "$(TARGET_NAME)";
432 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
433 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
434 | SWIFT_VERSION = 5.0;
435 | VERSIONING_SYSTEM = "apple-generic";
436 | };
437 | name = Debug;
438 | };
439 | 97C147071CF9000F007C117D /* Release */ = {
440 | isa = XCBuildConfiguration;
441 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
442 | buildSettings = {
443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
444 | CLANG_ENABLE_MODULES = YES;
445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
446 | DEVELOPMENT_TEAM = 427XUC28W5;
447 | ENABLE_BITCODE = NO;
448 | INFOPLIST_FILE = Runner/Info.plist;
449 | LD_RUNPATH_SEARCH_PATHS = (
450 | "$(inherited)",
451 | "@executable_path/Frameworks",
452 | );
453 | PRODUCT_BUNDLE_IDENTIFIER = com.junio9.flutterMicroanimations;
454 | PRODUCT_NAME = "$(TARGET_NAME)";
455 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
456 | SWIFT_VERSION = 5.0;
457 | VERSIONING_SYSTEM = "apple-generic";
458 | };
459 | name = Release;
460 | };
461 | /* End XCBuildConfiguration section */
462 |
463 | /* Begin XCConfigurationList section */
464 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
465 | isa = XCConfigurationList;
466 | buildConfigurations = (
467 | 97C147031CF9000F007C117D /* Debug */,
468 | 97C147041CF9000F007C117D /* Release */,
469 | 249021D3217E4FDB00AE95B9 /* Profile */,
470 | );
471 | defaultConfigurationIsVisible = 0;
472 | defaultConfigurationName = Release;
473 | };
474 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
475 | isa = XCConfigurationList;
476 | buildConfigurations = (
477 | 97C147061CF9000F007C117D /* Debug */,
478 | 97C147071CF9000F007C117D /* Release */,
479 | 249021D4217E4FDB00AE95B9 /* Profile */,
480 | );
481 | defaultConfigurationIsVisible = 0;
482 | defaultConfigurationName = Release;
483 | };
484 | /* End XCConfigurationList section */
485 | };
486 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
487 | }
488 |
--------------------------------------------------------------------------------
/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 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
69 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/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/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/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/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/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/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/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/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/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/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/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/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/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/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/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/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/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/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/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/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/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/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/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/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/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/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/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/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/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/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/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/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/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 | CADisableMinimumFrameDurationOnPhone
6 |
7 | CFBundleDevelopmentRegion
8 | $(DEVELOPMENT_LANGUAGE)
9 | CFBundleDisplayName
10 | Flutter Microanimations
11 | CFBundleExecutable
12 | $(EXECUTABLE_NAME)
13 | CFBundleIdentifier
14 | $(PRODUCT_BUNDLE_IDENTIFIER)
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleName
18 | flutter_microanimations
19 | CFBundlePackageType
20 | APPL
21 | CFBundleShortVersionString
22 | $(FLUTTER_BUILD_NAME)
23 | CFBundleSignature
24 | ????
25 | CFBundleVersion
26 | $(FLUTTER_BUILD_NUMBER)
27 | LSRequiresIPhoneOS
28 |
29 | UIApplicationSupportsIndirectInputEvents
30 |
31 | UILaunchStoryboardName
32 | LaunchScreen
33 | UIMainStoryboardFile
34 | Main
35 | UISupportedInterfaceOrientations
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationLandscapeLeft
39 | UIInterfaceOrientationLandscapeRight
40 |
41 | UISupportedInterfaceOrientations~ipad
42 |
43 | UIInterfaceOrientationPortrait
44 | UIInterfaceOrientationPortraitUpsideDown
45 | UIInterfaceOrientationLandscapeLeft
46 | UIInterfaceOrientationLandscapeRight
47 |
48 | UIViewControllerBasedStatusBarAppearance
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/lib/animations/airbnb_loading_animation.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_microanimations/animations/style/colors.dart';
3 |
4 | class AirbnbLoadingAnimation extends StatefulWidget {
5 | const AirbnbLoadingAnimation({Key? key}) : super(key: key);
6 |
7 | @override
8 | State createState() => _AirbnbLoadingAnimationState();
9 | }
10 |
11 | class _AirbnbLoadingAnimationState extends State
12 | with TickerProviderStateMixin {
13 | late AnimationController controller;
14 |
15 | late Animation firstCircle;
16 | late Animation secondCircle;
17 | late Animation thirdCircle;
18 | late Animation opacity;
19 |
20 | double begin = 0;
21 | double end = 5;
22 |
23 | @override
24 | void initState() {
25 | controller = AnimationController(
26 | duration: const Duration(milliseconds: 1000), vsync: this);
27 |
28 | firstCircle = getOffsetAnimation(0.0, 0.4);
29 | secondCircle = getOffsetAnimation(0.2, 0.6);
30 | thirdCircle = getOffsetAnimation(0.4, 0.8);
31 | opacity = Tween(begin: 1.0, end: 0.0).animate(
32 | CurvedAnimation(
33 | parent: controller,
34 | curve: const Interval(0.1, 1.0, curve: Curves.easeIn),
35 | ),
36 | );
37 | controller.repeat();
38 | super.initState();
39 | }
40 |
41 | Animation getOffsetAnimation(double lowLimit, double upperLimit) {
42 | return Tween(begin: begin, end: end).animate(
43 | CurvedAnimation(
44 | parent: controller,
45 | curve: Interval(lowLimit, upperLimit, curve: Curves.fastOutSlowIn),
46 | ),
47 | );
48 | }
49 |
50 | @override
51 | Widget build(BuildContext context) {
52 | return Scaffold(
53 | backgroundColor: primaryColor,
54 | body: Column(
55 | mainAxisAlignment: MainAxisAlignment.center,
56 | children: [
57 | Center(
58 | child: AnimatedBuilder(
59 | animation: controller.view,
60 | builder: (BuildContext context, _) {
61 | return Opacity(
62 | opacity: opacity.value,
63 | child: Row(
64 | mainAxisAlignment: MainAxisAlignment.center,
65 | children: [
66 | _buildCircle(firstCircle.value),
67 | const SizedBox(
68 | width: 4,
69 | ),
70 | _buildCircle(secondCircle.value),
71 | const SizedBox(
72 | width: 4,
73 | ),
74 | _buildCircle(thirdCircle.value),
75 | ],
76 | ),
77 | );
78 | },
79 | ),
80 | ),
81 | const SizedBox(height: 16),
82 | const Text(
83 | 'LOADING',
84 | style: TextStyle(color: Colors.white, fontSize: 10),
85 | )
86 | ],
87 | ),
88 | );
89 | }
90 |
91 | Widget _buildCircle(double verticalPosition) {
92 | return Transform.translate(
93 | offset: Offset(0, verticalPosition),
94 | child: Container(
95 | width: 10,
96 | height: 10,
97 | decoration: const BoxDecoration(
98 | shape: BoxShape.circle,
99 | color: Colors.white,
100 | ),
101 | ),
102 | );
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/lib/animations/animated_background.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AnimatedBackground extends StatefulWidget {
4 | const AnimatedBackground({Key? key}) : super(key: key);
5 |
6 | @override
7 | _AnimatedBackgroundState createState() => _AnimatedBackgroundState();
8 | }
9 |
10 | class _AnimatedBackgroundState extends State
11 | with SingleTickerProviderStateMixin {
12 | late AnimationController _buttonController;
13 | final DecorationTween _decorationTween = DecorationTween(
14 | begin: const BoxDecoration(
15 | gradient: LinearGradient(
16 | begin: Alignment.topLeft,
17 | end: Alignment.bottomRight,
18 | stops: [0.2, 1],
19 | colors: [
20 | Color(0xFFFDC830),
21 | Color(0xFFF37335),
22 | ],
23 | ),
24 | ),
25 | end: const BoxDecoration(
26 | gradient: LinearGradient(
27 | begin: Alignment.topLeft,
28 | end: Alignment.bottomRight,
29 | stops: [0.2, 1],
30 | colors: [
31 | Color(0xFFb21f1f),
32 | Color(0xFF1a2a6c),
33 | ],
34 | ),
35 | ),
36 | );
37 |
38 | @override
39 | void initState() {
40 | super.initState();
41 | _buttonController = AnimationController(
42 | duration: const Duration(seconds: 3),
43 | vsync: this,
44 | )..repeat(reverse: true);
45 | }
46 |
47 | @override
48 | void dispose() {
49 | _buttonController.dispose();
50 | super.dispose();
51 | }
52 |
53 | @override
54 | Widget build(BuildContext context) {
55 | return Scaffold(
56 | body: SizedBox(
57 | height: MediaQuery.of(context).size.height,
58 | width: MediaQuery.of(context).size.width,
59 | child: DecoratedBoxTransition(
60 | decoration: _decorationTween.animate(_buttonController),
61 | child: const SizedBox(),
62 | ),
63 | ),
64 | );
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/lib/animations/animated_play_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AnimatedPlayButton extends StatelessWidget {
4 | const AnimatedPlayButton({Key? key}) : super(key: key);
5 |
6 | @override
7 | Widget build(BuildContext context) {
8 | const effectColor = Color(0xFFE54954);
9 | return Scaffold(
10 | backgroundColor: const Color(0xFF1C1B26),
11 | body: Center(
12 | child: Stack(
13 | children: [
14 | Center(
15 | child: SizedBox(
16 | width: 70,
17 | height: 70,
18 | child: CircularProgressIndicator(
19 | strokeWidth: 2,
20 | backgroundColor: effectColor.withOpacity(0.3),
21 | valueColor: const AlwaysStoppedAnimation(
22 | effectColor,
23 | ),
24 | ),
25 | ),
26 | ),
27 | const Center(
28 | child: CircleAvatar(
29 | radius: 30,
30 | backgroundColor: Colors.black,
31 | child: Icon(
32 | Icons.play_arrow,
33 | size: 30,
34 | ),
35 | ),
36 | )
37 | ],
38 | ),
39 | ),
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/lib/animations/animated_scroll/components/animated_scroll_card.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AnimatedScrollCard extends StatefulWidget {
4 | const AnimatedScrollCard({
5 | Key? key,
6 | required this.child,
7 | this.keepAlive = false,
8 | }) : super(key: key);
9 |
10 | final Widget child;
11 | final bool keepAlive;
12 |
13 | @override
14 | State createState() => _AnimatedScrollCardState();
15 | }
16 |
17 | class _AnimatedScrollCardState extends State
18 | with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin {
19 | late AnimationController controller;
20 | late Animation turns;
21 |
22 | @override
23 | void initState() {
24 | controller = AnimationController(
25 | vsync: this,
26 | duration: const Duration(milliseconds: 400),
27 | )..forward();
28 |
29 | turns = Tween(begin: 0.95, end: 1).animate(
30 | CurvedAnimation(
31 | parent: controller,
32 | curve: const Interval(0, 1, curve: Curves.easeInOutBack),
33 | ),
34 | );
35 | super.initState();
36 | }
37 |
38 | @override
39 | Widget build(BuildContext context) {
40 | super.build(context);
41 | return RotationTransition(
42 | turns: turns,
43 | child: widget.child,
44 | );
45 | }
46 |
47 | @override
48 | bool get wantKeepAlive => widget.keepAlive;
49 |
50 | @override
51 | void dispose() {
52 | controller.dispose();
53 | super.dispose();
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/lib/animations/animated_scroll/pages/animated_scroll_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_microanimations/animations/animated_scroll/components/animated_scroll_card.dart';
3 |
4 | class AnimatedScrollScreen extends StatelessWidget {
5 | const AnimatedScrollScreen({Key? key}) : super(key: key);
6 |
7 | @override
8 | Widget build(BuildContext context) {
9 | return Scaffold(
10 | body: ListView.builder(
11 | padding: const EdgeInsets.symmetric(horizontal: 16),
12 | cacheExtent: 0,
13 | itemCount: 8,
14 | itemBuilder: (context, index) {
15 | return AnimatedScrollCard(
16 | child: Card(
17 | elevation: 0,
18 | child: Column(
19 | children: [
20 | Image.asset(
21 | 'assets/food0${index + 1}.png',
22 | fit: BoxFit.cover,
23 | ),
24 | Padding(
25 | padding: const EdgeInsets.all(16.0),
26 | child: Column(
27 | crossAxisAlignment: CrossAxisAlignment.start,
28 | children: [
29 | const Row(
30 | children: [
31 | Text(
32 | 'Aji Sushi',
33 | style: TextStyle(fontWeight: FontWeight.bold),
34 | ),
35 | ],
36 | ),
37 | Text('\$0 Delivery Fee . 35-45 min',
38 | style: Theme.of(context).textTheme.labelSmall),
39 | ],
40 | ),
41 | ),
42 | ],
43 | ),
44 | ),
45 | );
46 | },
47 | ),
48 | );
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/lib/animations/components/tween_wave.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class TweenWave extends StatelessWidget {
4 | const TweenWave(
5 | {Key? key,
6 | required this.barScale,
7 | required this.barHeight,
8 | required this.updateScale,
9 | required this.waveDuration})
10 | : super(key: key);
11 |
12 | final double barScale;
13 | final double barHeight;
14 | final void Function(double) updateScale;
15 | final int waveDuration;
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | return TweenAnimationBuilder(
20 | duration: Duration(milliseconds: waveDuration),
21 | curve: Curves.ease,
22 | tween: Tween(begin: 0.2, end: barScale),
23 | onEnd: () {
24 | barScale == 1 ? updateScale(0.2) : updateScale(1.0);
25 | },
26 | builder: (_, double value, __) {
27 | return Padding(
28 | padding: const EdgeInsets.only(right: 2),
29 | child: Transform.scale(
30 | scaleY: value,
31 | origin: Offset(5, barHeight / 2),
32 | child: Container(color: Colors.white, width: 10, height: barHeight),
33 | )
34 | );
35 | },
36 | );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/lib/animations/dice_animation.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_microanimations/animations/style/colors.dart';
5 |
6 | class DiceAnimation extends StatefulWidget {
7 | const DiceAnimation({Key? key}) : super(key: key);
8 |
9 | @override
10 | State createState() => _DiceAnimationState();
11 | }
12 |
13 | class _DiceAnimationState extends State
14 | with TickerProviderStateMixin {
15 | late AnimationController controller;
16 | late Animation diceRotation;
17 | late Animation diceRotation2;
18 | late Animation yPosition;
19 | late Animation yPosition2;
20 |
21 | @override
22 | void initState() {
23 | controller = AnimationController(
24 | duration: const Duration(milliseconds: 500),
25 | vsync: this,
26 | );
27 |
28 | diceRotation = Tween(
29 | begin: pi / 12,
30 | end: -pi + pi / 12,
31 | ).animate(
32 | CurvedAnimation(
33 | parent: controller,
34 | curve: const Interval(0, 1, curve: Curves.easeInOutSine),
35 | ),
36 | );
37 |
38 | diceRotation2 = Tween(
39 | begin: -pi / 12,
40 | end: -pi / 12 - pi,
41 | ).animate(
42 | CurvedAnimation(
43 | parent: controller,
44 | curve: const Interval(0, 1, curve: Curves.easeInSine),
45 | ),
46 | );
47 | yPosition = Tween(
48 | begin: 0,
49 | end: -10,
50 | ).animate(
51 | CurvedAnimation(
52 | parent: controller,
53 | curve: const Interval(0, 0.5, curve: Curves.easeInBack),
54 | ),
55 | );
56 |
57 | yPosition2 = Tween(
58 | begin: -10,
59 | end: 0,
60 | ).animate(
61 | CurvedAnimation(
62 | parent: controller,
63 | curve: const Interval(0.5, 1.0, curve: Curves.easeInOutBack),
64 | ),
65 | );
66 |
67 | super.initState();
68 | }
69 |
70 | @override
71 | Widget build(BuildContext context) {
72 | return Scaffold(
73 | backgroundColor: primaryColor,
74 | body: Center(
75 | child: GestureDetector(
76 | onTap: (() {
77 | controller.forward(
78 | from: 0,
79 | );
80 | }),
81 | child: Container(
82 | width: 220,
83 | height: 50,
84 | decoration: BoxDecoration(
85 | borderRadius: BorderRadius.circular(30),
86 | color: secondaryColor,
87 | ),
88 | child: Padding(
89 | padding: const EdgeInsets.all(8.0),
90 | child: Row(
91 | mainAxisAlignment: MainAxisAlignment.center,
92 | crossAxisAlignment: CrossAxisAlignment.end,
93 | children: [
94 | _buildDiceAnimation(),
95 | const SizedBox(width: 8),
96 | Column(
97 | mainAxisAlignment: MainAxisAlignment.center,
98 | children: const [
99 | Text(
100 | 'Shuffle Suggestions',
101 | style: TextStyle(
102 | color: Colors.white,
103 | ),
104 | ),
105 | SizedBox(
106 | height: 2,
107 | ),
108 | ],
109 | ),
110 | ],
111 | ),
112 | ),
113 | ),
114 | ),
115 | ),
116 | );
117 | }
118 |
119 | AnimatedBuilder _buildDiceAnimation() {
120 | return AnimatedBuilder(
121 | animation: controller.view,
122 | builder: (context, _) {
123 | return Row(
124 | mainAxisAlignment: MainAxisAlignment.center,
125 | children: [
126 | Transform.translate(
127 | offset: Offset(0, yPosition.value + yPosition2.value),
128 | child: Transform.rotate(
129 | angle: diceRotation.value,
130 | child: Image.asset(
131 | 'assets/dice1.png',
132 | width: 16.0,
133 | ),
134 | ),
135 | ),
136 | const SizedBox(width: 4),
137 | Transform.translate(
138 | offset: Offset(0, yPosition.value + yPosition2.value),
139 | child: Transform.rotate(
140 | angle: diceRotation2.value,
141 | child: Image.asset(
142 | 'assets/dice2.png',
143 | width: 16.0,
144 | ),
145 | ),
146 | )
147 | ],
148 | );
149 | },
150 | );
151 | }
152 | }
153 |
--------------------------------------------------------------------------------
/lib/animations/explicit_animations.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | class ExplicitAnimation extends StatefulWidget {
6 | const ExplicitAnimation({Key? key}) : super(key: key);
7 |
8 | @override
9 | State createState() => _ExplicitAnimationState();
10 | }
11 |
12 | class _ExplicitAnimationState extends State
13 | with SingleTickerProviderStateMixin {
14 | late AnimationController controller;
15 |
16 | late Animation scale;
17 | late Animation translate;
18 | late Animation rotation;
19 |
20 | @override
21 | void initState() {
22 | controller = AnimationController(
23 | vsync: this,
24 | duration: const Duration(milliseconds: 500),
25 | );
26 | scale = Tween(begin: 1, end: 0.0).animate(
27 | CurvedAnimation(
28 | parent: controller,
29 | curve: Curves.easeInOutBack,
30 | ),
31 | );
32 |
33 | translate = Tween(begin: 0, end: 100).animate(
34 | CurvedAnimation(
35 | parent: controller,
36 | curve: Curves.easeInOutBack,
37 | ),
38 | );
39 |
40 | rotation = Tween(begin: pi, end: 0).animate(CurvedAnimation(
41 | parent: controller,
42 | curve: const Interval(
43 | 0.0,
44 | 0.7,
45 | curve: Curves.easeIn,
46 | ),
47 | ));
48 | super.initState();
49 | }
50 |
51 | @override
52 | Widget build(BuildContext context) {
53 | return Scaffold(
54 | body: Center(
55 | child: Column(
56 | mainAxisAlignment: MainAxisAlignment.center,
57 | children: [
58 | // ScaleTransition(
59 | // scale: controller,
60 | // child: const Text('MUSTR'),
61 | // ),
62 | AnimatedBuilder(
63 | animation: controller,
64 | builder: ((context, _) {
65 | return Transform.rotate(
66 | angle: rotation.value,
67 | child: Stack(
68 | children: [
69 | _buildIconButton(
70 | angle: 0,
71 | icon: Icons.facebook,
72 | ),
73 | _buildIconButton(
74 | angle: -45,
75 | icon: Icons.facebook,
76 | ),
77 | _buildIconButton(
78 | angle: -90,
79 | icon: Icons.facebook,
80 | ),
81 | _buildIconButton(
82 | angle: -135,
83 | icon: Icons.facebook,
84 | ),
85 | _buildIconButton(
86 | angle: -180,
87 | icon: Icons.facebook,
88 | ),
89 | Transform.scale(
90 | scale: scale.value - 1,
91 | child: FloatingActionButton(
92 | backgroundColor: Colors.red,
93 | onPressed: () {
94 | controller.reverse();
95 | },
96 | child: const Icon(Icons.close),
97 | ),
98 | ),
99 | Transform.scale(
100 | scale: scale.value,
101 | child: FloatingActionButton(
102 | onPressed: () {
103 | controller.forward();
104 | },
105 | child: const Icon(Icons.menu),
106 | ),
107 | )
108 | ],
109 | ),
110 | );
111 | }),
112 | ),
113 | ],
114 | ),
115 | ),
116 | );
117 | }
118 |
119 | Transform _buildIconButton({
120 | required double angle,
121 | required IconData icon,
122 | }) {
123 | return Transform(
124 | transform: Matrix4.identity()
125 | ..translate(
126 | translate.value * cos(degreeToRadian(angle)),
127 | translate.value * sin(degreeToRadian(angle)),
128 | ),
129 | child: FloatingActionButton(
130 | onPressed: () {},
131 | child: Icon(icon),
132 | ),
133 | );
134 | }
135 |
136 | double degreeToRadian(double degree) {
137 | return degree * pi / 180;
138 | }
139 | }
140 |
--------------------------------------------------------------------------------
/lib/animations/figma_to_lottie.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:lottie/lottie.dart';
3 |
4 | class FigmaToLottie extends StatefulWidget {
5 | const FigmaToLottie({Key? key}) : super(key: key);
6 |
7 | @override
8 | State createState() => _FigmaToLottieState();
9 | }
10 |
11 | class _FigmaToLottieState extends State
12 | with SingleTickerProviderStateMixin {
13 | late AnimationController _controller;
14 | @override
15 | void initState() {
16 | _controller = AnimationController(
17 | vsync: this,
18 | duration: const Duration(
19 | milliseconds: 1000,
20 | ));
21 | if (_controller.isCompleted) {
22 | Navigator.of(context).pop();
23 | }
24 | super.initState();
25 | }
26 |
27 | @override
28 | Widget build(BuildContext context) {
29 | return Scaffold(
30 | body: Center(
31 | child: IconButton(
32 | iconSize: 150,
33 | splashRadius: 32,
34 | onPressed: () {
35 | _controller.forward();
36 | if (_controller.isCompleted) {
37 | _controller.reset();
38 | }
39 | },
40 | icon: Lottie.asset(
41 | 'assets/animations/youtube-like.json',
42 | repeat: false,
43 | controller: _controller,
44 | ),
45 | ),
46 | ),
47 | );
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/lib/animations/gradient_play_button.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_microanimations/animations/style/colors.dart';
5 |
6 | class GradientPlayButton extends StatefulWidget {
7 | const GradientPlayButton({Key? key}) : super(key: key);
8 |
9 | @override
10 | State createState() => _GradientPlayButtonState();
11 | }
12 |
13 | class _GradientPlayButtonState extends State
14 | with SingleTickerProviderStateMixin {
15 | late AnimationController controller;
16 | late Animation circularProgressRotation;
17 |
18 | @override
19 | void initState() {
20 | super.initState();
21 | controller = AnimationController(
22 | duration: const Duration(milliseconds: 2000), vsync: this)
23 | ..repeat();
24 | circularProgressRotation = Tween(
25 | begin: 0,
26 | end: 2 * pi,
27 | ).animate(
28 | CurvedAnimation(
29 | parent: controller,
30 | curve: Curves.linear,
31 | ),
32 | );
33 | }
34 |
35 | @override
36 | Widget build(BuildContext context) {
37 | return Scaffold(
38 | backgroundColor: primaryColor,
39 | body: Center(
40 | child: _buildCard(),
41 | ),
42 | );
43 | }
44 |
45 | Widget _buildCard() {
46 | return Stack(
47 | children: [
48 | Center(
49 | child: Container(
50 | width: 170,
51 | height: 250,
52 | decoration: BoxDecoration(
53 | borderRadius: BorderRadius.circular(8),
54 | boxShadow: [
55 | BoxShadow(
56 | color: Colors.grey.withOpacity(0.1),
57 | offset: const Offset(5, 5),
58 | blurRadius: 30,
59 | ),
60 | ],
61 | image: const DecorationImage(
62 | fit: BoxFit.cover,
63 | image: AssetImage('assets/card.png'),
64 | ),
65 | ),
66 | ),
67 | ),
68 | Align(
69 | alignment: Alignment.center,
70 | child: AnimatedBuilder(
71 | animation: controller.view,
72 | child: _buildPlayButton(),
73 | builder: (context, child) {
74 | return Stack(
75 | children: [
76 | Transform.rotate(
77 | angle: circularProgressRotation.value,
78 | child: Center(
79 | child: Container(
80 | width: 55,
81 | height: 55,
82 | decoration: BoxDecoration(
83 | borderRadius: BorderRadius.circular(60.0),
84 | gradient: SweepGradient(
85 | startAngle: 3 * pi / 2,
86 | endAngle: 7 * pi / 2,
87 | tileMode: TileMode.repeated,
88 | stops: const [0.0, 1],
89 | colors: [
90 | primaryColor.withOpacity(.3),
91 | secondaryColor,
92 | ],
93 | ),
94 | ),
95 | ),
96 | ),
97 | ),
98 | Center(child: child),
99 | ],
100 | );
101 | },
102 | ),
103 | ),
104 | ],
105 | );
106 | }
107 |
108 | Widget _buildPlayButton() {
109 | return Padding(
110 | padding: const EdgeInsets.all(2.0),
111 | child: Container(
112 | width: 50,
113 | height: 50,
114 | padding: const EdgeInsets.all(2),
115 | child: const CircleAvatar(
116 | radius: 30,
117 | backgroundColor: Colors.black,
118 | child: Icon(
119 | Icons.play_arrow,
120 | size: 40,
121 | ),
122 | ),
123 | ),
124 | );
125 | }
126 | }
127 |
--------------------------------------------------------------------------------
/lib/animations/like_button.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_microanimations/animations/style/colors.dart';
5 |
6 | class LikeButton extends StatefulWidget {
7 | const LikeButton({Key? key}) : super(key: key);
8 |
9 | @override
10 | State createState() => _LikeButtonState();
11 | }
12 |
13 | class _LikeButtonState extends State {
14 | Color disabledColor = Colors.white;
15 | Color enabledColor = Colors.black;
16 | double angle = 0;
17 | bool enabled = false;
18 | @override
19 | Widget build(BuildContext context) {
20 | return Scaffold(
21 | backgroundColor: primaryColor,
22 | body: Center(
23 | child: GestureDetector(
24 | onTap: () => setState(() {
25 | enabled = !enabled;
26 | angle = pi / 18.0;
27 | }),
28 | child: AnimatedContainer(
29 | width: 125,
30 | height: 50,
31 | decoration: BoxDecoration(
32 | color: enabled ? enabledColor : disabledColor,
33 | borderRadius: BorderRadius.circular(10),
34 | ),
35 | duration: const Duration(milliseconds: 400),
36 | curve: Curves.fastOutSlowIn,
37 | child: Row(
38 | mainAxisAlignment: MainAxisAlignment.center,
39 | children: [
40 | TweenAnimationBuilder(
41 | duration: const Duration(milliseconds: 300),
42 | curve: Curves.fastOutSlowIn,
43 | tween: Tween(
44 | begin: angle,
45 | end: angle,
46 | ),
47 | onEnd: () {
48 | if (angle == pi / 18.0) {
49 | setState(() => angle = -pi / 18.0);
50 | } else {
51 | setState(() => angle = 0);
52 | }
53 | },
54 | builder: (_, double value, __) {
55 | return Transform.rotate(
56 | angle: value,
57 | child: Icon(
58 | enabled ? Icons.favorite : Icons.favorite_border,
59 | color: enabled ? disabledColor : enabledColor,
60 | ),
61 | );
62 | },
63 | ),
64 | const SizedBox(width: 12),
65 | Text(
66 | 'LIKE',
67 | style: TextStyle(
68 | fontWeight: FontWeight.bold,
69 | color: enabled ? disabledColor : enabledColor),
70 | ),
71 | ],
72 | ),
73 | ),
74 | ),
75 | ),
76 | );
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/lib/animations/loop_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_microanimations/animations/style/colors.dart';
3 |
4 | class ButtonLoop extends StatefulWidget {
5 | const ButtonLoop({Key? key}) : super(key: key);
6 |
7 | @override
8 | State createState() => _ButtonLoopState();
9 | }
10 |
11 | class _ButtonLoopState extends State {
12 | double buttonScale = 1.0;
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | double buttonScale = 1.0;
17 | return Scaffold(
18 | backgroundColor: primaryColor,
19 | body: Center(
20 | child: TweenAnimationBuilder(
21 | duration: const Duration(milliseconds: 2000),
22 | curve: Curves.easeInOut,
23 | tween: Tween(
24 | begin: 0.2,
25 | end: buttonScale,
26 | ),
27 | onEnd: () {
28 | if (buttonScale == 1) {
29 | setState(() => buttonScale = 0.9);
30 | } else {
31 | setState(() => buttonScale = 1.0);
32 | }
33 | },
34 | builder: (_, double value, __) {
35 | return Padding(
36 | padding: const EdgeInsets.only(right: 2),
37 | child: Transform.scale(
38 | scale: value,
39 | child: Container(
40 | decoration: const BoxDecoration(
41 | color: Colors.grey,
42 | shape: BoxShape.circle,
43 | ),
44 | child: Image.asset('assets/animations/shazam.png'),
45 | width: 150,
46 | height: 150,
47 | ),
48 | ),
49 | );
50 | },
51 | ),
52 | ),
53 | );
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/lib/animations/music_wave.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_microanimations/animations/components/tween_wave.dart';
3 | import 'package:flutter_microanimations/animations/style/colors.dart';
4 |
5 | class MusicWave extends StatefulWidget {
6 | const MusicWave({Key? key}) : super(key: key);
7 |
8 | @override
9 | State createState() => _MusicWaveState();
10 | }
11 |
12 | class _MusicWaveState extends State {
13 | double bar1Scale = 1.0;
14 | double bar2Scale = 1.0;
15 | double bar3Scale = 1.0;
16 | double bar4Scale = 1.0;
17 |
18 | double barHeight1 = 60;
19 | double barHeight2 = 40;
20 | double barHeight3 = 40;
21 | double barHeight4 = 50;
22 |
23 | @override
24 | Widget build(BuildContext context) {
25 | return Scaffold(
26 | backgroundColor: primaryColor,
27 | body: Center(
28 | child: Row(
29 | crossAxisAlignment: CrossAxisAlignment.end,
30 | mainAxisAlignment: MainAxisAlignment.center,
31 | children: [
32 | TweenWave(
33 | barScale: bar1Scale,
34 | barHeight: barHeight1,
35 | updateScale: (newScale) => setState(() => bar1Scale = newScale),
36 | waveDuration: 550,
37 | ),
38 | TweenWave(
39 | barScale: bar2Scale,
40 | barHeight: barHeight2,
41 | updateScale: (newScale) => setState(() => bar2Scale = newScale),
42 | waveDuration: 275,
43 | ),
44 | TweenWave(
45 | barScale: bar3Scale,
46 | barHeight: barHeight3,
47 | updateScale: (newScale) => setState(() => bar3Scale = newScale),
48 | waveDuration: 413,
49 | ),
50 | TweenWave(
51 | barScale: bar4Scale,
52 | barHeight: barHeight4,
53 | updateScale: (newScale) => setState(() => bar4Scale = newScale),
54 | waveDuration: 275,
55 | ),
56 | ],
57 | ),
58 | ),
59 | );
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/lib/animations/notification_rotation.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_microanimations/animations/style/colors.dart';
4 |
5 | class NotificationRotation extends StatefulWidget {
6 | const NotificationRotation({Key? key}) : super(key: key);
7 |
8 | @override
9 | State createState() => _NotificationRotationState();
10 | }
11 |
12 | class _NotificationRotationState extends State {
13 | double angle = pi / 12.0;
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | return Scaffold(
18 | backgroundColor: primaryColor,
19 | body: Center(
20 | child: TweenAnimationBuilder(
21 | duration: const Duration(milliseconds: 400),
22 | curve: Curves.ease,
23 | tween: Tween(
24 | begin: -pi / 12.0,
25 | end: angle,
26 | ),
27 | onEnd: () {
28 | if (angle == pi / 12.0) {
29 | setState(() {
30 | angle = -pi / 12.0;
31 | });
32 | } else {
33 | setState(() {
34 | angle = 0;
35 | });
36 | }
37 | },
38 | builder: (_, double value, __) {
39 | return Transform.rotate(
40 | angle: value,
41 | child: const Stack(
42 | children: [
43 | Icon(
44 | Icons.notifications,
45 | size: 30,
46 | color: Colors.white,
47 | ),
48 | Positioned(
49 | top: 0,
50 | right: 0,
51 | child: CircleAvatar(
52 | backgroundColor: Colors.red,
53 | radius: 8,
54 | child: Text(
55 | '2',
56 | style: TextStyle(
57 | fontSize: 10,
58 | fontWeight: FontWeight.bold,
59 | ),
60 | ),
61 | ),
62 | )
63 | ],
64 | ),
65 | );
66 | },
67 | ),
68 | ),
69 | );
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/lib/animations/ontap_animation.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_microanimations/animations/style/colors.dart';
3 |
4 | class OnTapAnimation extends StatefulWidget {
5 | const OnTapAnimation({Key? key}) : super(key: key);
6 |
7 | @override
8 | State createState() => _OnTapAnimationState();
9 | }
10 |
11 | class _OnTapAnimationState extends State
12 | with TickerProviderStateMixin {
13 | late AnimationController controller;
14 | late AnimationController playController;
15 |
16 | late Animation scaleCircle1;
17 | late Animation scaleCircle2;
18 | late Animation scaleCircle3;
19 |
20 | late Animation opacityCircle1;
21 | late Animation opacityCircle2;
22 | late Animation opacityCircle3;
23 |
24 | @override
25 | void initState() {
26 | controller = AnimationController(
27 | duration: const Duration(milliseconds: 2500),
28 | vsync: this,
29 | );
30 |
31 | playController = AnimationController(
32 | vsync: this,
33 | duration: const Duration(milliseconds: 300),
34 | );
35 |
36 | scaleCircle3 = getScaleAnimation(0.0, 0.3);
37 | scaleCircle1 = getScaleAnimation(0.1, .6);
38 | scaleCircle2 = getScaleAnimation(0.3, 0.8);
39 |
40 | opacityCircle3 = getOpacityAnimation(.6, 1.0);
41 | opacityCircle1 = getOpacityAnimation(.2, .6);
42 | opacityCircle2 = getOpacityAnimation(.5, 0.8);
43 | super.initState();
44 | }
45 |
46 | Animation getScaleAnimation(double lowLimit, double upperLimit) {
47 | return Tween(
48 | begin: 0.0,
49 | end: 1,
50 | ).animate(
51 | CurvedAnimation(
52 | parent: controller,
53 | curve: Interval(
54 | lowLimit,
55 | upperLimit,
56 | curve: Curves.easeInOutSine,
57 | ),
58 | ),
59 | );
60 | }
61 |
62 | Animation getOpacityAnimation(double lowLimit, double upperLimit) {
63 | return Tween(
64 | begin: 1.0,
65 | end: 0.0,
66 | ).animate(
67 | CurvedAnimation(
68 | parent: controller,
69 | curve: Interval(lowLimit, upperLimit, curve: Curves.easeOut),
70 | ),
71 | );
72 | }
73 |
74 | @override
75 | Widget build(BuildContext context) {
76 | return Scaffold(
77 | backgroundColor: primaryColor,
78 | body: Center(
79 | child: Stack(
80 | children: [
81 | AnimatedBuilder(
82 | animation: controller.view,
83 | builder: (context, _) {
84 | return Stack(
85 | children: [
86 | Opacity(
87 | opacity: opacityCircle1.value,
88 | child: _buildCircle(
89 | diameter: 150,
90 | color: Colors.white.withOpacity(.1),
91 | scale: scaleCircle1.value,
92 | ),
93 | ),
94 | Opacity(
95 | opacity: opacityCircle2.value,
96 | child: _buildCircle(
97 | diameter: 150,
98 | color: Colors.white.withOpacity(.1),
99 | scale: scaleCircle2.value,
100 | ),
101 | ),
102 | Opacity(
103 | opacity: opacityCircle3.value,
104 | child: _buildCircle(
105 | diameter: 75,
106 | color: Colors.white.withOpacity(0.2),
107 | scale: scaleCircle3.value,
108 | ),
109 | ),
110 | ],
111 | );
112 | },
113 | ),
114 | Center(
115 | child: GestureDetector(
116 | onTap: () {
117 | if (playController.isCompleted) {
118 | controller.stop();
119 | playController.reverse();
120 | } else {
121 | controller.repeat();
122 | playController.forward();
123 | }
124 | },
125 | child: Container(
126 | width: 50,
127 | height: 50,
128 | decoration: const BoxDecoration(
129 | shape: BoxShape.circle, color: secondaryColor),
130 | child: Center(
131 | child: AnimatedIcon(
132 | icon: AnimatedIcons.play_pause,
133 | color: Colors.white,
134 | progress: playController,
135 | ),
136 | ),
137 | ),
138 | ),
139 | ),
140 | ],
141 | ),
142 | ),
143 | );
144 | }
145 |
146 | Widget _buildCircle({
147 | required double diameter,
148 | required Color color,
149 | required double scale,
150 | }) {
151 | return Center(
152 | child: Transform.scale(
153 | scale: scale,
154 | child: Container(
155 | width: diameter,
156 | height: diameter,
157 | decoration: BoxDecoration(
158 | shape: BoxShape.circle,
159 | color: color,
160 | ),
161 | ),
162 | ),
163 | );
164 | }
165 | }
166 |
--------------------------------------------------------------------------------
/lib/animations/radial_menu.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_microanimations/animations/style/colors.dart';
5 | import 'package:font_awesome_flutter/font_awesome_flutter.dart';
6 |
7 | class RadialMenu extends StatefulWidget {
8 | const RadialMenu({Key? key}) : super(key: key);
9 |
10 | @override
11 | State createState() => _RadialMenuState();
12 | }
13 |
14 | class _RadialMenuState extends State
15 | with SingleTickerProviderStateMixin {
16 | late AnimationController controller;
17 |
18 | late Animation scale;
19 | late Animation translate;
20 | late Animation opacity;
21 | late Animation rotation;
22 |
23 | @override
24 | void initState() {
25 | super.initState();
26 | controller = AnimationController(
27 | vsync: this,
28 | duration: const Duration(milliseconds: 500),
29 | );
30 | scale = Tween(begin: 1, end: 0.0).animate(
31 | CurvedAnimation(parent: controller, curve: Curves.easeInOutBack),
32 | );
33 | translate = Tween(begin: 0, end: 100).animate(
34 | CurvedAnimation(
35 | parent: controller,
36 | curve: Curves.easeInOutBack,
37 | ),
38 | );
39 | opacity = Tween(begin: 0, end: 1).animate(
40 | CurvedAnimation(
41 | parent: controller,
42 | curve: const Interval(0.3, .5),
43 | ),
44 | );
45 | rotation = Tween(begin: pi, end: 0).animate(
46 | CurvedAnimation(
47 | parent: controller,
48 | curve: const Interval(0, .7, curve: Curves.easeInOut),
49 | ),
50 | );
51 | }
52 |
53 | _open() {
54 | controller.forward();
55 | }
56 |
57 | _close() {
58 | controller.reverse();
59 | }
60 |
61 | @override
62 | Widget build(BuildContext context) {
63 | return Scaffold(
64 | backgroundColor: primaryColor,
65 | body: Center(
66 | child: AnimatedBuilder(
67 | animation: controller.view,
68 | builder: (context, _) {
69 | return Transform.rotate(
70 | angle: rotation.value,
71 | child: Stack(
72 | alignment: Alignment.center,
73 | children: [
74 | _buildMenuOption(
75 | angle: 0,
76 | icon: const Icon(
77 | Icons.facebook,
78 | color: Colors.white,
79 | ),
80 | color: const Color(0xFF0073F5)),
81 | _buildMenuOption(
82 | angle: -45,
83 | icon: const Icon(
84 | FontAwesomeIcons.instagram,
85 | color: Colors.white,
86 | ),
87 | color: const Color(0xFFFF0F5C),
88 | ),
89 | _buildMenuOption(
90 | angle: -90,
91 | icon: const Icon(
92 | FontAwesomeIcons.twitter,
93 | color: Colors.white,
94 | ),
95 | color: const Color(0xFF1D9CEF),
96 | ),
97 | _buildMenuOption(
98 | angle: -135,
99 | icon: const Icon(
100 | FontAwesomeIcons.youtube,
101 | color: Colors.white,
102 | ),
103 | color: const Color(0xFFFF0200),
104 | ),
105 | _buildMenuOption(
106 | angle: 180,
107 | icon: const Icon(
108 | FontAwesomeIcons.github,
109 | color: Colors.white,
110 | ),
111 | color: const Color(0xFF24292E),
112 | ),
113 | Transform.scale(
114 | scale: scale.value - 1,
115 | child: FloatingActionButton(
116 | backgroundColor: Colors.red,
117 | onPressed: _close,
118 | child: const Icon(Icons.close),
119 | ),
120 | ),
121 | Transform.scale(
122 | scale: scale.value,
123 | child: FloatingActionButton(
124 | backgroundColor: Colors.green,
125 | onPressed: _open,
126 | child: const Icon(Icons.menu),
127 | ),
128 | ),
129 | ],
130 | ),
131 | );
132 | }),
133 | ),
134 | );
135 | }
136 |
137 | Widget _buildMenuOption({
138 | required double angle,
139 | required Widget icon,
140 | required Color color,
141 | }) {
142 | return Opacity(
143 | opacity: opacity.value,
144 | child: Transform(
145 | transform: Matrix4.identity()
146 | ..translate(
147 | translate.value * cos(degreeToRadian(angle)),
148 | translate.value * sin(degreeToRadian(angle)),
149 | ),
150 | child: FloatingActionButton(
151 | backgroundColor: color,
152 | child: icon,
153 | onPressed: () {},
154 | ),
155 | ),
156 | );
157 | }
158 |
159 | double degreeToRadian(double degree) {
160 | return degree * pi / 180;
161 | }
162 | }
163 |
--------------------------------------------------------------------------------
/lib/animations/radio_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class RadioButton extends StatefulWidget {
4 | const RadioButton({Key? key}) : super(key: key);
5 |
6 | @override
7 | State createState() => _RadioButtonState();
8 | }
9 |
10 | class _RadioButtonState extends State {
11 | final primaryColor = const Color(0xFF48C0B2);
12 |
13 | double heigthCircle1 = 30;
14 | double heigthCircle2 = 30;
15 |
16 | double yPositionCircle1 = 5;
17 | double yPositionCircle2 = 40;
18 |
19 | bool isUp = true;
20 |
21 | @override
22 | Widget build(BuildContext context) {
23 | return Scaffold(
24 | backgroundColor: const Color(0xFF75FDEC),
25 | body: Center(
26 | child: GestureDetector(
27 | onTap: () async {
28 | if (isUp) {
29 | setState(
30 | () {
31 | heigthCircle1 = 70;
32 | yPositionCircle1 = 40;
33 | yPositionCircle2 = 5;
34 | isUp = !isUp;
35 | },
36 | );
37 | await Future.delayed(const Duration(milliseconds: 300));
38 | setState(() {
39 | heigthCircle1 = 30;
40 | });
41 | } else {
42 | setState(
43 | () {
44 | heigthCircle2 = 70;
45 | yPositionCircle2 = 40;
46 | yPositionCircle1 = 5;
47 | isUp = !isUp;
48 | },
49 | );
50 | await Future.delayed(const Duration(milliseconds: 300));
51 | setState(() {
52 | heigthCircle2 = 30;
53 | });
54 | }
55 | },
56 | child: Container(
57 | decoration: BoxDecoration(
58 | borderRadius: BorderRadius.circular(20),
59 | color: Colors.white,
60 | ),
61 | width: 300,
62 | height: 200,
63 | child: Padding(
64 | padding: const EdgeInsets.all(16.0),
65 | child: Row(
66 | children: [
67 | _buildToggles(),
68 | Column(
69 | crossAxisAlignment: CrossAxisAlignment.start,
70 | mainAxisAlignment: MainAxisAlignment.start,
71 | children: const [
72 | SizedBox(
73 | height: 8,
74 | ),
75 | Text(
76 | 'Android',
77 | style: TextStyle(
78 | fontSize: 18,
79 | ),
80 | ),
81 | SizedBox(
82 | height: 16,
83 | ),
84 | Text(
85 | 'iOS',
86 | style: TextStyle(
87 | fontSize: 18,
88 | ),
89 | ),
90 | ],
91 | )
92 | ],
93 | ),
94 | ),
95 | ),
96 | ),
97 | ),
98 | );
99 | }
100 |
101 | Widget _buildToggles() {
102 | return Column(
103 | children: [
104 | Stack(
105 | children: [
106 | const SizedBox(
107 | height: 100,
108 | width: 40,
109 | ),
110 | _buildAndroidCircle(),
111 | _buildiOSCircle(),
112 | ],
113 | ),
114 | ],
115 | );
116 | }
117 |
118 | Widget _buildiOSCircle() {
119 | return AnimatedPositioned(
120 | duration: const Duration(milliseconds: 600),
121 | top: yPositionCircle2,
122 | curve: Curves.easeInBack,
123 | child: GestureDetector(
124 | child: AnimatedContainer(
125 | width: 30,
126 | height: heigthCircle2,
127 | duration: const Duration(milliseconds: 300),
128 | decoration: BoxDecoration(
129 | borderRadius: BorderRadius.circular(60),
130 | color: const Color(0xffD7EDE9),
131 | ),
132 | ),
133 | ),
134 | );
135 | }
136 |
137 | Widget _buildAndroidCircle() {
138 | return AnimatedPositioned(
139 | top: yPositionCircle1,
140 | curve: Curves.easeInBack,
141 | duration: const Duration(milliseconds: 600),
142 | child: GestureDetector(
143 | child: AnimatedContainer(
144 | width: 30,
145 | height: heigthCircle1,
146 | duration: const Duration(milliseconds: 300),
147 | decoration: BoxDecoration(
148 | borderRadius: BorderRadius.circular(60),
149 | color: primaryColor,
150 | ),
151 | ),
152 | ),
153 | );
154 | }
155 | }
156 |
--------------------------------------------------------------------------------
/lib/animations/raiting_interaction_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:dots_indicator/dots_indicator.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:lottie/lottie.dart';
4 |
5 | class RaitingInteractionScreen extends StatefulWidget {
6 | const RaitingInteractionScreen({Key? key}) : super(key: key);
7 |
8 | @override
9 | State createState() =>
10 | _RaitingInteractionScreenState();
11 | }
12 |
13 | class _RaitingInteractionScreenState extends State
14 | with TickerProviderStateMixin {
15 | late AnimationController controller;
16 | late Animation scale;
17 |
18 | List colors = [
19 | const Color(0xFFFF4A4F),
20 | const Color(0xFFFE9160),
21 | const Color(0xFF7502FF),
22 | const Color(0xFF7395FF),
23 | const Color(0xFF84E257)
24 | ];
25 | List controllers = [];
26 | List> scales = [];
27 |
28 | List lotties = [
29 | 'assets/animations/angry.json',
30 | 'assets/animations/sad.json',
31 | 'assets/animations/doubt.json',
32 | 'assets/animations/happy.json',
33 | 'assets/animations/superHappy.json',
34 | ];
35 |
36 | int currentPage = 0;
37 | Color currentBackgroundColor = Colors.white;
38 | static const int kAnimationDuration = 400;
39 |
40 | @override
41 | void initState() {
42 | controller = AnimationController(
43 | vsync: this,
44 | duration: const Duration(milliseconds: kAnimationDuration),
45 | );
46 |
47 | controllers.add(controller);
48 | controllers.add(controller);
49 | controllers.add(controller);
50 | controllers.add(controller);
51 | controllers.add(controller);
52 |
53 | for (var i = 0; i < 5; i++) {
54 | scale = Tween(begin: 0, end: 1).animate(
55 | CurvedAnimation(
56 | parent: controllers[i],
57 | curve: const Interval(.5, 1, curve: Curves.easeOutBack),
58 | ),
59 | );
60 | scales.add(scale);
61 | }
62 | controllers[0].forward();
63 | super.initState();
64 | }
65 |
66 | @override
67 | Widget build(BuildContext context) {
68 | return Scaffold(
69 | backgroundColor: currentBackgroundColor,
70 | body: GestureDetector(
71 | onHorizontalDragEnd: onDragInteraction,
72 | child: Stack(
73 | fit: StackFit.expand,
74 | children: [
75 | _buildBackgroundAnimation(),
76 | Column(
77 | mainAxisAlignment: MainAxisAlignment.center,
78 | children: [
79 | _buildTitle(),
80 | const SizedBox(height: 50),
81 | _buildEmojiAnimation(),
82 | const SizedBox(height: 50),
83 | _buildDotsIndicator(),
84 | const SizedBox(height: 100),
85 | _buildMainButton()
86 | ],
87 | ),
88 | ],
89 | ),
90 | ),
91 | );
92 | }
93 |
94 | Widget _buildDotsIndicator() {
95 | return DotsIndicator(
96 | dotsCount: 5,
97 | position: currentPage.toDouble(),
98 | decorator: DotsDecorator(
99 | activeColor: Colors.white,
100 | color: Colors.grey.withOpacity(.5),
101 | ),
102 | );
103 | }
104 |
105 | Widget _buildTitle() {
106 | return const Text(
107 | 'Rate your \nexperience',
108 | textAlign: TextAlign.center,
109 | style: TextStyle(
110 | color: Colors.white,
111 | fontWeight: FontWeight.bold,
112 | fontSize: 32,
113 | ),
114 | );
115 | }
116 |
117 | Widget _buildBackgroundAnimation() {
118 | return AnimatedBuilder(
119 | animation: controllers[currentPage].view,
120 | builder: (BuildContext context, Widget? child) {
121 | return Transform.scale(
122 | scale: controllers[currentPage].value * 2.5,
123 | child: Container(
124 | height: MediaQuery.of(context).size.height * 2,
125 | decoration: BoxDecoration(
126 | shape: BoxShape.circle,
127 | color: colors[currentPage],
128 | ),
129 | ),
130 | );
131 | },
132 | );
133 | }
134 |
135 | Widget _buildEmojiAnimation() {
136 | return SizedBox(
137 | width: 200,
138 | height: 200,
139 | child: Stack(
140 | children: [
141 | AnimatedBuilder(
142 | animation: controllers[currentPage].view,
143 | builder: (BuildContext context, _) {
144 | return Transform.scale(
145 | scale: scales[currentPage].value,
146 | child: Lottie.asset(
147 | lotties[currentPage],
148 | ),
149 | );
150 | },
151 | ),
152 | ],
153 | ),
154 | );
155 | }
156 |
157 | Widget _buildMainButton() {
158 | return SizedBox(
159 | height: 60,
160 | width: 300,
161 | child: ElevatedButton(
162 | style: ElevatedButton.styleFrom(
163 | shape: RoundedRectangleBorder(
164 | borderRadius: BorderRadius.circular(30.0),
165 | ),
166 | ),
167 | onPressed: () {},
168 | child: const Text('Send Raiting'),
169 | ),
170 | );
171 | }
172 |
173 | void onDragInteraction(details) {
174 | if (details.primaryVelocity == null) return;
175 | if (details.primaryVelocity! < 0) {
176 | // drag from right to left
177 | if (currentPage < 4) {
178 | setState(() {
179 | currentPage++;
180 | currentBackgroundColor = colors[currentPage - 1];
181 | });
182 | controllers[currentPage - 1].reset();
183 | controllers[currentPage].forward(from: 0);
184 | }
185 | } else {
186 | if (currentPage > 0) {
187 | setState(() {
188 | currentPage--;
189 | currentBackgroundColor = colors[currentPage + 1];
190 | });
191 | controllers[currentPage].forward(from: 0);
192 | //controllers[currentPage + 1].reset();
193 | }
194 | }
195 | }
196 | }
197 |
--------------------------------------------------------------------------------
/lib/animations/style/colors.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | const primaryColor = Color(0xFF1C1B26);
4 | const secondaryColor = Color(0xFFF3B809);
5 | const tertiaryColor = Color(0xFF5C2576);
6 |
--------------------------------------------------------------------------------
/lib/animations/tiktok_animation.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class TikTokAnimation extends StatefulWidget {
4 | const TikTokAnimation({Key? key}) : super(key: key);
5 |
6 | @override
7 | State createState() => _TikTokAnimationState();
8 | }
9 |
10 | class _TikTokAnimationState extends State
11 | with SingleTickerProviderStateMixin {
12 | Color tiktok1 = const Color(0xFFFE2D55);
13 |
14 | Color tiktok2 = const Color(0xFF1FDAEB);
15 |
16 | late AnimationController controller;
17 | late Animation scaleBlue;
18 | late Animation offsetBlue;
19 |
20 | late Animation scaleRedLeft;
21 | late Animation offsetRedLeft;
22 |
23 | late Animation scaleRedRight;
24 | late Animation offsetRedRight;
25 |
26 | @override
27 | void initState() {
28 | super.initState();
29 | controller = AnimationController(
30 | vsync: this,
31 | duration: const Duration(milliseconds: 500),
32 | );
33 |
34 | scaleBlue = TweenSequence(
35 | >[
36 | TweenSequenceItem(
37 | tween: Tween(
38 | begin: 1.0,
39 | end: .9,
40 | ).chain(
41 | CurveTween(curve: Curves.easeIn),
42 | ),
43 | weight: 50.0,
44 | ),
45 | TweenSequenceItem(
46 | tween: Tween(
47 | begin: .9,
48 | end: 1.0,
49 | ).chain(
50 | CurveTween(curve: Curves.easeOut),
51 | ),
52 | weight: 50.0,
53 | ),
54 | ],
55 | ).animate(controller);
56 |
57 | scaleRedLeft = TweenSequence(
58 | >[
59 | TweenSequenceItem(
60 | tween: Tween(
61 | begin: 1.1,
62 | end: 1.0,
63 | ).chain(
64 | CurveTween(curve: Curves.linear),
65 | ),
66 | weight: 50.0,
67 | ),
68 | TweenSequenceItem(
69 | tween: ConstantTween(0),
70 | weight: 50.0,
71 | ),
72 | ],
73 | ).animate(controller);
74 |
75 | offsetRedLeft = Tween(
76 | begin: 0,
77 | end: 10,
78 | ).animate(
79 | CurvedAnimation(parent: controller, curve: Curves.ease),
80 | );
81 |
82 | offsetBlue = Tween(
83 | begin: 18,
84 | end: 0,
85 | ).animate(
86 | CurvedAnimation(parent: controller, curve: Curves.ease),
87 | );
88 |
89 | scaleRedRight = TweenSequence(
90 | >[
91 | TweenSequenceItem(
92 | tween: ConstantTween(0),
93 | weight: 50.0,
94 | ),
95 | TweenSequenceItem(
96 | tween: Tween(
97 | begin: 1.0,
98 | end: 1.1,
99 | ).chain(
100 | CurveTween(curve: Curves.linear),
101 | ),
102 | weight: 50.0,
103 | ),
104 | ],
105 | ).animate(controller);
106 |
107 | offsetRedRight = Tween(
108 | begin: 8,
109 | end: 18,
110 | ).animate(
111 | CurvedAnimation(parent: controller, curve: Curves.ease),
112 | );
113 |
114 | offsetBlue = Tween(
115 | begin: 18,
116 | end: 0,
117 | ).animate(
118 | CurvedAnimation(parent: controller, curve: Curves.ease),
119 | );
120 |
121 | controller.repeat(reverse: true);
122 | }
123 |
124 | @override
125 | Widget build(BuildContext context) {
126 | return Scaffold(
127 | body: Center(
128 | child: AnimatedBuilder(
129 | animation: controller.view,
130 | builder: (context, _) {
131 | return Stack(
132 | children: [
133 | Transform.translate(
134 | offset: Offset(offsetRedLeft.value, 0),
135 | child: Transform.scale(
136 | scale: scaleRedLeft.value,
137 | child: CircleAvatar(
138 | radius: 8,
139 | backgroundColor: tiktok1,
140 | ),
141 | ),
142 | ),
143 | Transform.translate(
144 | offset: Offset(offsetBlue.value, 0),
145 | child: Transform.scale(
146 | scale: scaleBlue.value,
147 | child: CircleAvatar(
148 | radius: 8,
149 | backgroundColor: tiktok2,
150 | ),
151 | ),
152 | ),
153 | Transform.translate(
154 | offset: Offset(offsetRedRight.value, 0),
155 | child: Transform.scale(
156 | scale: scaleRedRight.value,
157 | child: CircleAvatar(
158 | radius: 8,
159 | backgroundColor: tiktok1,
160 | ),
161 | ),
162 | ),
163 | ],
164 | );
165 | },
166 | ),
167 | ));
168 | }
169 | }
170 |
--------------------------------------------------------------------------------
/lib/animations/tiktok_loading.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_microanimations/animations/style/colors.dart';
3 |
4 | class TikTokLoading extends StatefulWidget {
5 | const TikTokLoading({Key? key}) : super(key: key);
6 |
7 | @override
8 | State createState() => _TikTokLoadingState();
9 | }
10 |
11 | class _TikTokLoadingState extends State
12 | with SingleTickerProviderStateMixin {
13 | Color tiktok1 = const Color(0xFFFE2D55);
14 | Color tiktok2 = const Color(0xFF1FDAEB);
15 | final animationDuration = const Duration(milliseconds: 700);
16 |
17 | late AnimationController controller;
18 | late Animation scaleRedLeft;
19 | late Animation scaleRedRight;
20 |
21 | late Animation offsetRedLeft;
22 | late Animation offsetRedRight;
23 | late Animation offsetBlue;
24 |
25 | late Animation scaleBlue;
26 |
27 | @override
28 | void initState() {
29 | super.initState();
30 | controller = AnimationController(
31 | vsync: this,
32 | duration: animationDuration,
33 | );
34 |
35 | scaleBlue = TweenSequence(
36 | >[
37 | TweenSequenceItem(
38 | tween: Tween(
39 | begin: 1.0,
40 | end: .9,
41 | ).chain(
42 | CurveTween(curve: Curves.easeIn),
43 | ),
44 | weight: 50.0,
45 | ),
46 | TweenSequenceItem(
47 | tween: Tween(
48 | begin: .9,
49 | end: 1.0,
50 | ).chain(
51 | CurveTween(curve: Curves.easeOut),
52 | ),
53 | weight: 50.0,
54 | ),
55 | ],
56 | ).animate(controller);
57 | scaleRedLeft = TweenSequence(
58 | >[
59 | TweenSequenceItem(
60 | tween: Tween(
61 | begin: 1.1,
62 | end: 1.0,
63 | ).chain(
64 | CurveTween(curve: Curves.linear),
65 | ),
66 | weight: 50.0,
67 | ),
68 | TweenSequenceItem(
69 | tween: ConstantTween(0),
70 | weight: 50.0,
71 | ),
72 | ],
73 | ).animate(controller);
74 | scaleRedRight = TweenSequence(
75 | >[
76 | TweenSequenceItem(
77 | tween: ConstantTween(0.0),
78 | weight: 50.0,
79 | ),
80 | TweenSequenceItem(
81 | tween: Tween(
82 | begin: 1.0,
83 | end: 1.1,
84 | ).chain(
85 | CurveTween(curve: Curves.linear),
86 | ),
87 | weight: 50.0,
88 | ),
89 | ],
90 | ).animate(controller);
91 |
92 | offsetBlue = Tween(
93 | begin: 18,
94 | end: 0,
95 | ).animate(
96 | CurvedAnimation(
97 | parent: controller,
98 | curve: Curves.linear,
99 | ),
100 | );
101 | offsetRedLeft = Tween(
102 | begin: 0,
103 | end: 9,
104 | ).animate(
105 | CurvedAnimation(
106 | parent: controller,
107 | curve: const Interval(0.0, 0.5, curve: Curves.linear),
108 | ),
109 | );
110 | offsetRedRight = Tween(
111 | begin: 7,
112 | end: 18.0,
113 | ).animate(
114 | CurvedAnimation(
115 | parent: controller,
116 | curve: const Interval(0.5, 1.0, curve: Curves.linear),
117 | ),
118 | );
119 |
120 | controller.repeat(reverse: true);
121 | }
122 |
123 | @override
124 | Widget build(BuildContext context) {
125 | return Scaffold(
126 | backgroundColor: primaryColor,
127 | body: Center(
128 | child: Stack(
129 | children: [
130 | AnimatedBuilder(
131 | animation: controller.view,
132 | builder: (context, _) {
133 | return Stack(
134 | children: [
135 | Transform.translate(
136 | offset: Offset(offsetRedLeft.value, 0),
137 | child: Transform.scale(
138 | scale: scaleRedLeft.value,
139 | child: CircleAvatar(
140 | radius: 8,
141 | backgroundColor: tiktok1,
142 | ),
143 | ),
144 | ),
145 | Transform.translate(
146 | offset: Offset(offsetBlue.value, 0),
147 | child: Transform.scale(
148 | scale: scaleBlue.value,
149 | child: CircleAvatar(
150 | radius: 8,
151 | backgroundColor: tiktok2,
152 | ),
153 | ),
154 | ),
155 | Transform.translate(
156 | offset: Offset(offsetRedRight.value, 0),
157 | child: Transform.scale(
158 | scale: scaleRedRight.value,
159 | child: CircleAvatar(
160 | radius: 8,
161 | backgroundColor: tiktok1,
162 | ),
163 | ),
164 | ),
165 | ],
166 | );
167 | },
168 | ),
169 | ],
170 | ),
171 | ),
172 | );
173 | }
174 | }
175 |
--------------------------------------------------------------------------------
/lib/animations/tutorials/explicit_animation.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart';
3 |
4 | class ExplicitAnimation extends StatefulWidget {
5 | const ExplicitAnimation({Key? key}) : super(key: key);
6 |
7 | @override
8 | State createState() => _ExplicitAnimationState();
9 | }
10 |
11 | class _ExplicitAnimationState extends State
12 | with SingleTickerProviderStateMixin {
13 | late AnimationController controller;
14 | late Animation position;
15 |
16 | @override
17 | void initState() {
18 | controller = AnimationController(
19 | vsync: this,
20 | duration: const Duration(
21 | milliseconds: 600,
22 | ),
23 | );
24 |
25 | position = Tween(
26 | begin: 0,
27 | end: 100,
28 | ).animate(
29 | CurvedAnimation(
30 | parent: controller,
31 | curve: Curves.bounceOut,
32 | ),
33 | );
34 | super.initState();
35 | }
36 |
37 | @override
38 | void dispose() {
39 | controller.dispose();
40 | super.dispose();
41 | }
42 |
43 | @override
44 | Widget build(BuildContext context) {
45 | return Scaffold(
46 | floatingActionButton: FloatingActionButton(
47 | onPressed: () {
48 | if (controller.isCompleted) {
49 | controller.reset();
50 | } else {
51 | controller.forward();
52 | }
53 | },
54 | backgroundColor: Colors.black,
55 | child: const Icon(FontAwesomeIcons.play),
56 | ),
57 | body: Column(
58 | mainAxisAlignment: MainAxisAlignment.center,
59 | children: [
60 | AnimatedBuilder(
61 | animation: controller.view,
62 | builder: ((context, child) => Transform.translate(
63 | offset: Offset(0, position.value),
64 | child: child,
65 | )),
66 | child: const Center(
67 | child: Icon(
68 | FontAwesomeIcons.basketball,
69 | size: 100,
70 | ),
71 | ),
72 | )
73 | ],
74 | ),
75 | );
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/lib/animations/tutorials/first_explicit_animation.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart';
3 |
4 | class ExplicitAnimation extends StatefulWidget {
5 | const ExplicitAnimation({Key? key}) : super(key: key);
6 |
7 | @override
8 | State createState() => _ExplicitAnimationState();
9 | }
10 |
11 | class _ExplicitAnimationState extends State
12 | with SingleTickerProviderStateMixin {
13 | late AnimationController controller;
14 | late Animation position;
15 |
16 | @override
17 | void initState() {
18 | controller = AnimationController(
19 | vsync: this,
20 | duration: const Duration(
21 | milliseconds: 600,
22 | ),
23 | );
24 |
25 | position = Tween(
26 | begin: 0,
27 | end: 100,
28 | ).animate(
29 | CurvedAnimation(
30 | parent: controller,
31 | curve: Curves.bounceOut,
32 | ),
33 | );
34 | super.initState();
35 | }
36 |
37 | @override
38 | void dispose() {
39 | controller.dispose();
40 | super.dispose();
41 | }
42 |
43 | @override
44 | Widget build(BuildContext context) {
45 | return Scaffold(
46 | floatingActionButton: FloatingActionButton(
47 | onPressed: () {
48 | if (controller.isCompleted) {
49 | controller.reset();
50 | } else {
51 | controller.forward();
52 | }
53 | },
54 | backgroundColor: Colors.black,
55 | child: const Icon(FontAwesomeIcons.play),
56 | ),
57 | body: Column(
58 | mainAxisAlignment: MainAxisAlignment.center,
59 | children: [
60 | AnimatedBuilder(
61 | animation: controller.view,
62 | builder: ((context, child) => Transform.translate(
63 | offset: Offset(0, position.value),
64 | child: child,
65 | )),
66 | child: const Center(
67 | child: Icon(
68 | FontAwesomeIcons.basketball,
69 | size: 100,
70 | ),
71 | ),
72 | )
73 | ],
74 | ),
75 | );
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_microanimations/animations/figma_to_lottie.dart';
3 |
4 | void main() {
5 | runApp(const MyApp());
6 | }
7 |
8 | class MyApp extends StatelessWidget {
9 | const MyApp({Key? key}) : super(key: key);
10 |
11 | // This widget is the root of your application.
12 | @override
13 | Widget build(BuildContext context) {
14 | return MaterialApp(
15 | title: 'Flutter Demo',
16 | theme: ThemeData(
17 | // This is the theme of your application.
18 | //
19 | // Try running your application with "flutter run". You'll see the
20 | // application has a blue toolbar. Then, without quitting the app, try
21 | // changing the primarySwatch below to Colors.green and then invoke
22 | // "hot reload" (press "r" in the console where you ran "flutter run",
23 | // or simply save your changes to "hot reload" in a Flutter IDE).
24 | // Notice that the counter didn't reset back to zero; the application
25 | // is not restarted.
26 | primarySwatch: Colors.blue,
27 | ),
28 | home: const FigmaToLottie(),
29 | );
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | archive:
5 | dependency: transitive
6 | description:
7 | name: archive
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "3.3.1"
11 | async:
12 | dependency: transitive
13 | description:
14 | name: async
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "2.8.2"
18 | boolean_selector:
19 | dependency: transitive
20 | description:
21 | name: boolean_selector
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "2.1.0"
25 | characters:
26 | dependency: transitive
27 | description:
28 | name: characters
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.2.0"
32 | charcode:
33 | dependency: transitive
34 | description:
35 | name: charcode
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.3.1"
39 | clock:
40 | dependency: transitive
41 | description:
42 | name: clock
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.1.0"
46 | collection:
47 | dependency: transitive
48 | description:
49 | name: collection
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "1.16.0"
53 | crypto:
54 | dependency: transitive
55 | description:
56 | name: crypto
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "3.0.2"
60 | cupertino_icons:
61 | dependency: "direct main"
62 | description:
63 | name: cupertino_icons
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "1.0.4"
67 | dots_indicator:
68 | dependency: "direct dev"
69 | description:
70 | name: dots_indicator
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "2.1.0"
74 | fake_async:
75 | dependency: transitive
76 | description:
77 | name: fake_async
78 | url: "https://pub.dartlang.org"
79 | source: hosted
80 | version: "1.3.0"
81 | flutter:
82 | dependency: "direct main"
83 | description: flutter
84 | source: sdk
85 | version: "0.0.0"
86 | flutter_lints:
87 | dependency: "direct dev"
88 | description:
89 | name: flutter_lints
90 | url: "https://pub.dartlang.org"
91 | source: hosted
92 | version: "1.0.4"
93 | flutter_test:
94 | dependency: "direct dev"
95 | description: flutter
96 | source: sdk
97 | version: "0.0.0"
98 | font_awesome_flutter:
99 | dependency: "direct dev"
100 | description:
101 | name: font_awesome_flutter
102 | url: "https://pub.dartlang.org"
103 | source: hosted
104 | version: "10.1.0"
105 | lints:
106 | dependency: transitive
107 | description:
108 | name: lints
109 | url: "https://pub.dartlang.org"
110 | source: hosted
111 | version: "1.0.1"
112 | lottie:
113 | dependency: "direct dev"
114 | description:
115 | name: lottie
116 | url: "https://pub.dartlang.org"
117 | source: hosted
118 | version: "1.4.1"
119 | matcher:
120 | dependency: transitive
121 | description:
122 | name: matcher
123 | url: "https://pub.dartlang.org"
124 | source: hosted
125 | version: "0.12.11"
126 | material_color_utilities:
127 | dependency: transitive
128 | description:
129 | name: material_color_utilities
130 | url: "https://pub.dartlang.org"
131 | source: hosted
132 | version: "0.1.4"
133 | meta:
134 | dependency: transitive
135 | description:
136 | name: meta
137 | url: "https://pub.dartlang.org"
138 | source: hosted
139 | version: "1.7.0"
140 | path:
141 | dependency: transitive
142 | description:
143 | name: path
144 | url: "https://pub.dartlang.org"
145 | source: hosted
146 | version: "1.8.1"
147 | sky_engine:
148 | dependency: transitive
149 | description: flutter
150 | source: sdk
151 | version: "0.0.99"
152 | source_span:
153 | dependency: transitive
154 | description:
155 | name: source_span
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "1.8.2"
159 | stack_trace:
160 | dependency: transitive
161 | description:
162 | name: stack_trace
163 | url: "https://pub.dartlang.org"
164 | source: hosted
165 | version: "1.10.0"
166 | stream_channel:
167 | dependency: transitive
168 | description:
169 | name: stream_channel
170 | url: "https://pub.dartlang.org"
171 | source: hosted
172 | version: "2.1.0"
173 | string_scanner:
174 | dependency: transitive
175 | description:
176 | name: string_scanner
177 | url: "https://pub.dartlang.org"
178 | source: hosted
179 | version: "1.1.0"
180 | term_glyph:
181 | dependency: transitive
182 | description:
183 | name: term_glyph
184 | url: "https://pub.dartlang.org"
185 | source: hosted
186 | version: "1.2.0"
187 | test_api:
188 | dependency: transitive
189 | description:
190 | name: test_api
191 | url: "https://pub.dartlang.org"
192 | source: hosted
193 | version: "0.4.9"
194 | typed_data:
195 | dependency: transitive
196 | description:
197 | name: typed_data
198 | url: "https://pub.dartlang.org"
199 | source: hosted
200 | version: "1.3.1"
201 | vector_math:
202 | dependency: transitive
203 | description:
204 | name: vector_math
205 | url: "https://pub.dartlang.org"
206 | source: hosted
207 | version: "2.1.2"
208 | sdks:
209 | dart: ">=2.17.0-0 <3.0.0"
210 | flutter: ">=2.10.0"
211 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_microanimations
2 | description: A new Flutter project.
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `flutter pub publish`. This is preferred for private packages.
6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
7 |
8 | # The following defines the version and build number for your application.
9 | # A version number is three numbers separated by dots, like 1.2.43
10 | # followed by an optional build number separated by a +.
11 | # Both the version and the builder number may be overridden in flutter
12 | # build by specifying --build-name and --build-number, respectively.
13 | # In Android, build-name is used as versionName while build-number used as versionCode.
14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
16 | # Read more about iOS versioning at
17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
18 | version: 1.0.0+1
19 |
20 | environment:
21 | sdk: ">=2.16.1 <3.0.0"
22 |
23 | # Dependencies specify other packages that your package needs in order to work.
24 | # To automatically upgrade your package dependencies to the latest versions
25 | # consider running `flutter pub upgrade --major-versions`. Alternatively,
26 | # dependencies can be manually updated by changing the version numbers below to
27 | # the latest version available on pub.dev. To see which dependencies have newer
28 | # versions available, run `flutter pub outdated`.
29 | dependencies:
30 | flutter:
31 | sdk: flutter
32 |
33 |
34 | # The following adds the Cupertino Icons font to your application.
35 | # Use with the CupertinoIcons class for iOS style icons.
36 | cupertino_icons: ^1.0.2
37 |
38 | dev_dependencies:
39 | flutter_test:
40 | sdk: flutter
41 |
42 | # The "flutter_lints" package below contains a set of recommended lints to
43 | # encourage good coding practices. The lint set provided by the package is
44 | # activated in the `analysis_options.yaml` file located at the root of your
45 | # package. See that file for information about deactivating specific lint
46 | # rules and activating additional ones.
47 | dots_indicator: ^2.1.0
48 | flutter_lints: ^1.0.0
49 | font_awesome_flutter:
50 | lottie:
51 |
52 | # For information on the generic Dart part of this file, see the
53 | # following page: https://dart.dev/tools/pub/pubspec
54 |
55 | # The following section is specific to Flutter.
56 | flutter:
57 |
58 | # The following line ensures that the Material Icons font is
59 | # included with your application, so that you can use the icons in
60 | # the material Icons class.
61 | uses-material-design: true
62 |
63 | # To add assets to your application, add an assets section, like this:
64 | assets:
65 | - assets/
66 | - assets/animations/
67 |
68 | # An image asset can refer to one or more resolution-specific "variants", see
69 | # https://flutter.dev/assets-and-images/#resolution-aware.
70 |
71 | # For details regarding adding assets from package dependencies, see
72 | # https://flutter.dev/assets-and-images/#from-packages
73 |
74 | # To add custom fonts to your application, add a fonts section here,
75 | # in this "flutter" section. Each entry in this list should have a
76 | # "family" key with the font family name, and a "fonts" key with a
77 | # list giving the asset and other descriptors for the font. For
78 | # example:
79 | # fonts:
80 | # - family: Schyler
81 | # fonts:
82 | # - asset: fonts/Schyler-Regular.ttf
83 | # - asset: fonts/Schyler-Italic.ttf
84 | # style: italic
85 | # - family: Trajan Pro
86 | # fonts:
87 | # - asset: fonts/TrajanPro.ttf
88 | # - asset: fonts/TrajanPro_Bold.ttf
89 | # weight: 700
90 | #
91 | # For details regarding fonts from package dependencies,
92 | # see https://flutter.dev/custom-fonts/#from-packages
93 |
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:flutter_microanimations/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(const MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/web/favicon.png
--------------------------------------------------------------------------------
/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/web/icons/Icon-maskable-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/web/icons/Icon-maskable-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-maskable-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/web/icons/Icon-maskable-512.png
--------------------------------------------------------------------------------
/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | flutter_microanimations
33 |
34 |
35 |
36 |
39 |
103 |
104 |
105 |
--------------------------------------------------------------------------------
/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "flutter_microanimations",
3 | "short_name": "flutter_microanimations",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | },
22 | {
23 | "src": "icons/Icon-maskable-192.png",
24 | "sizes": "192x192",
25 | "type": "image/png",
26 | "purpose": "maskable"
27 | },
28 | {
29 | "src": "icons/Icon-maskable-512.png",
30 | "sizes": "512x512",
31 | "type": "image/png",
32 | "purpose": "maskable"
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/windows/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral/
2 |
3 | # Visual Studio user-specific files.
4 | *.suo
5 | *.user
6 | *.userosscache
7 | *.sln.docstates
8 |
9 | # Visual Studio build-related files.
10 | x64/
11 | x86/
12 |
13 | # Visual Studio cache files
14 | # files ending in .cache can be ignored
15 | *.[Cc]ache
16 | # but keep track of directories ending in .cache
17 | !*.[Cc]ache/
18 |
--------------------------------------------------------------------------------
/windows/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(flutter_microanimations LANGUAGES CXX)
3 |
4 | set(BINARY_NAME "flutter_microanimations")
5 |
6 | cmake_policy(SET CMP0063 NEW)
7 |
8 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
9 |
10 | # Configure build options.
11 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
12 | if(IS_MULTICONFIG)
13 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release"
14 | CACHE STRING "" FORCE)
15 | else()
16 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
17 | set(CMAKE_BUILD_TYPE "Debug" CACHE
18 | STRING "Flutter build mode" FORCE)
19 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
20 | "Debug" "Profile" "Release")
21 | endif()
22 | endif()
23 |
24 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
25 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
26 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}")
27 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}")
28 |
29 | # Use Unicode for all projects.
30 | add_definitions(-DUNICODE -D_UNICODE)
31 |
32 | # Compilation settings that should be applied to most targets.
33 | function(APPLY_STANDARD_SETTINGS TARGET)
34 | target_compile_features(${TARGET} PUBLIC cxx_std_17)
35 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
36 | target_compile_options(${TARGET} PRIVATE /EHsc)
37 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
38 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>")
39 | endfunction()
40 |
41 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
42 |
43 | # Flutter library and tool build rules.
44 | add_subdirectory(${FLUTTER_MANAGED_DIR})
45 |
46 | # Application build
47 | add_subdirectory("runner")
48 |
49 | # Generated plugin build rules, which manage building the plugins and adding
50 | # them to the application.
51 | include(flutter/generated_plugins.cmake)
52 |
53 |
54 | # === Installation ===
55 | # Support files are copied into place next to the executable, so that it can
56 | # run in place. This is done instead of making a separate bundle (as on Linux)
57 | # so that building and running from within Visual Studio will work.
58 | set(BUILD_BUNDLE_DIR "$")
59 | # Make the "install" step default, as it's required to run.
60 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
61 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
62 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
63 | endif()
64 |
65 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
66 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}")
67 |
68 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
69 | COMPONENT Runtime)
70 |
71 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
72 | COMPONENT Runtime)
73 |
74 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
75 | COMPONENT Runtime)
76 |
77 | if(PLUGIN_BUNDLED_LIBRARIES)
78 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
79 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
80 | COMPONENT Runtime)
81 | endif()
82 |
83 | # Fully re-copy the assets directory on each build to avoid having stale files
84 | # from a previous install.
85 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
86 | install(CODE "
87 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
88 | " COMPONENT Runtime)
89 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
90 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
91 |
92 | # Install the AOT library on non-Debug builds only.
93 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
94 | CONFIGURATIONS Profile;Release
95 | COMPONENT Runtime)
96 |
--------------------------------------------------------------------------------
/windows/flutter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 |
3 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
4 |
5 | # Configuration provided via flutter tool.
6 | include(${EPHEMERAL_DIR}/generated_config.cmake)
7 |
8 | # TODO: Move the rest of this into files in ephemeral. See
9 | # https://github.com/flutter/flutter/issues/57146.
10 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
11 |
12 | # === Flutter Library ===
13 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
14 |
15 | # Published to parent scope for install step.
16 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
17 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
18 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
19 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE)
20 |
21 | list(APPEND FLUTTER_LIBRARY_HEADERS
22 | "flutter_export.h"
23 | "flutter_windows.h"
24 | "flutter_messenger.h"
25 | "flutter_plugin_registrar.h"
26 | "flutter_texture_registrar.h"
27 | )
28 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/")
29 | add_library(flutter INTERFACE)
30 | target_include_directories(flutter INTERFACE
31 | "${EPHEMERAL_DIR}"
32 | )
33 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib")
34 | add_dependencies(flutter flutter_assemble)
35 |
36 | # === Wrapper ===
37 | list(APPEND CPP_WRAPPER_SOURCES_CORE
38 | "core_implementations.cc"
39 | "standard_codec.cc"
40 | )
41 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/")
42 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN
43 | "plugin_registrar.cc"
44 | )
45 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/")
46 | list(APPEND CPP_WRAPPER_SOURCES_APP
47 | "flutter_engine.cc"
48 | "flutter_view_controller.cc"
49 | )
50 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/")
51 |
52 | # Wrapper sources needed for a plugin.
53 | add_library(flutter_wrapper_plugin STATIC
54 | ${CPP_WRAPPER_SOURCES_CORE}
55 | ${CPP_WRAPPER_SOURCES_PLUGIN}
56 | )
57 | apply_standard_settings(flutter_wrapper_plugin)
58 | set_target_properties(flutter_wrapper_plugin PROPERTIES
59 | POSITION_INDEPENDENT_CODE ON)
60 | set_target_properties(flutter_wrapper_plugin PROPERTIES
61 | CXX_VISIBILITY_PRESET hidden)
62 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter)
63 | target_include_directories(flutter_wrapper_plugin PUBLIC
64 | "${WRAPPER_ROOT}/include"
65 | )
66 | add_dependencies(flutter_wrapper_plugin flutter_assemble)
67 |
68 | # Wrapper sources needed for the runner.
69 | add_library(flutter_wrapper_app STATIC
70 | ${CPP_WRAPPER_SOURCES_CORE}
71 | ${CPP_WRAPPER_SOURCES_APP}
72 | )
73 | apply_standard_settings(flutter_wrapper_app)
74 | target_link_libraries(flutter_wrapper_app PUBLIC flutter)
75 | target_include_directories(flutter_wrapper_app PUBLIC
76 | "${WRAPPER_ROOT}/include"
77 | )
78 | add_dependencies(flutter_wrapper_app flutter_assemble)
79 |
80 | # === Flutter tool backend ===
81 | # _phony_ is a non-existent file to force this command to run every time,
82 | # since currently there's no way to get a full input/output list from the
83 | # flutter tool.
84 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_")
85 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE)
86 | add_custom_command(
87 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
88 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}
89 | ${CPP_WRAPPER_SOURCES_APP}
90 | ${PHONY_OUTPUT}
91 | COMMAND ${CMAKE_COMMAND} -E env
92 | ${FLUTTER_TOOL_ENVIRONMENT}
93 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
94 | windows-x64 $
95 | VERBATIM
96 | )
97 | add_custom_target(flutter_assemble DEPENDS
98 | "${FLUTTER_LIBRARY}"
99 | ${FLUTTER_LIBRARY_HEADERS}
100 | ${CPP_WRAPPER_SOURCES_CORE}
101 | ${CPP_WRAPPER_SOURCES_PLUGIN}
102 | ${CPP_WRAPPER_SOURCES_APP}
103 | )
104 |
--------------------------------------------------------------------------------
/windows/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 |
10 | void RegisterPlugins(flutter::PluginRegistry* registry) {
11 | }
12 |
--------------------------------------------------------------------------------
/windows/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void RegisterPlugins(flutter::PluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/windows/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | )
7 |
8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
9 | )
10 |
11 | set(PLUGIN_BUNDLED_LIBRARIES)
12 |
13 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
18 | endforeach(plugin)
19 |
20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
23 | endforeach(ffi_plugin)
24 |
--------------------------------------------------------------------------------
/windows/runner/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(runner LANGUAGES CXX)
3 |
4 | add_executable(${BINARY_NAME} WIN32
5 | "flutter_window.cpp"
6 | "main.cpp"
7 | "utils.cpp"
8 | "win32_window.cpp"
9 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
10 | "Runner.rc"
11 | "runner.exe.manifest"
12 | )
13 | apply_standard_settings(${BINARY_NAME})
14 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
15 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
16 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
17 | add_dependencies(${BINARY_NAME} flutter_assemble)
18 |
--------------------------------------------------------------------------------
/windows/runner/Runner.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #pragma code_page(65001)
4 | #include "resource.h"
5 |
6 | #define APSTUDIO_READONLY_SYMBOLS
7 | /////////////////////////////////////////////////////////////////////////////
8 | //
9 | // Generated from the TEXTINCLUDE 2 resource.
10 | //
11 | #include "winres.h"
12 |
13 | /////////////////////////////////////////////////////////////////////////////
14 | #undef APSTUDIO_READONLY_SYMBOLS
15 |
16 | /////////////////////////////////////////////////////////////////////////////
17 | // English (United States) resources
18 |
19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21 |
22 | #ifdef APSTUDIO_INVOKED
23 | /////////////////////////////////////////////////////////////////////////////
24 | //
25 | // TEXTINCLUDE
26 | //
27 |
28 | 1 TEXTINCLUDE
29 | BEGIN
30 | "resource.h\0"
31 | END
32 |
33 | 2 TEXTINCLUDE
34 | BEGIN
35 | "#include ""winres.h""\r\n"
36 | "\0"
37 | END
38 |
39 | 3 TEXTINCLUDE
40 | BEGIN
41 | "\r\n"
42 | "\0"
43 | END
44 |
45 | #endif // APSTUDIO_INVOKED
46 |
47 |
48 | /////////////////////////////////////////////////////////////////////////////
49 | //
50 | // Icon
51 | //
52 |
53 | // Icon with lowest ID value placed first to ensure application icon
54 | // remains consistent on all systems.
55 | IDI_APP_ICON ICON "resources\\app_icon.ico"
56 |
57 |
58 | /////////////////////////////////////////////////////////////////////////////
59 | //
60 | // Version
61 | //
62 |
63 | #ifdef FLUTTER_BUILD_NUMBER
64 | #define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER
65 | #else
66 | #define VERSION_AS_NUMBER 1,0,0
67 | #endif
68 |
69 | #ifdef FLUTTER_BUILD_NAME
70 | #define VERSION_AS_STRING #FLUTTER_BUILD_NAME
71 | #else
72 | #define VERSION_AS_STRING "1.0.0"
73 | #endif
74 |
75 | VS_VERSION_INFO VERSIONINFO
76 | FILEVERSION VERSION_AS_NUMBER
77 | PRODUCTVERSION VERSION_AS_NUMBER
78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
79 | #ifdef _DEBUG
80 | FILEFLAGS VS_FF_DEBUG
81 | #else
82 | FILEFLAGS 0x0L
83 | #endif
84 | FILEOS VOS__WINDOWS32
85 | FILETYPE VFT_APP
86 | FILESUBTYPE 0x0L
87 | BEGIN
88 | BLOCK "StringFileInfo"
89 | BEGIN
90 | BLOCK "040904e4"
91 | BEGIN
92 | VALUE "CompanyName", "com.example" "\0"
93 | VALUE "FileDescription", "flutter_microanimations" "\0"
94 | VALUE "FileVersion", VERSION_AS_STRING "\0"
95 | VALUE "InternalName", "flutter_microanimations" "\0"
96 | VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0"
97 | VALUE "OriginalFilename", "flutter_microanimations.exe" "\0"
98 | VALUE "ProductName", "flutter_microanimations" "\0"
99 | VALUE "ProductVersion", VERSION_AS_STRING "\0"
100 | END
101 | END
102 | BLOCK "VarFileInfo"
103 | BEGIN
104 | VALUE "Translation", 0x409, 1252
105 | END
106 | END
107 |
108 | #endif // English (United States) resources
109 | /////////////////////////////////////////////////////////////////////////////
110 |
111 |
112 |
113 | #ifndef APSTUDIO_INVOKED
114 | /////////////////////////////////////////////////////////////////////////////
115 | //
116 | // Generated from the TEXTINCLUDE 3 resource.
117 | //
118 |
119 |
120 | /////////////////////////////////////////////////////////////////////////////
121 | #endif // not APSTUDIO_INVOKED
122 |
--------------------------------------------------------------------------------
/windows/runner/flutter_window.cpp:
--------------------------------------------------------------------------------
1 | #include "flutter_window.h"
2 |
3 | #include
4 |
5 | #include "flutter/generated_plugin_registrant.h"
6 |
7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project)
8 | : project_(project) {}
9 |
10 | FlutterWindow::~FlutterWindow() {}
11 |
12 | bool FlutterWindow::OnCreate() {
13 | if (!Win32Window::OnCreate()) {
14 | return false;
15 | }
16 |
17 | RECT frame = GetClientArea();
18 |
19 | // The size here must match the window dimensions to avoid unnecessary surface
20 | // creation / destruction in the startup path.
21 | flutter_controller_ = std::make_unique(
22 | frame.right - frame.left, frame.bottom - frame.top, project_);
23 | // Ensure that basic setup of the controller was successful.
24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) {
25 | return false;
26 | }
27 | RegisterPlugins(flutter_controller_->engine());
28 | SetChildContent(flutter_controller_->view()->GetNativeWindow());
29 | return true;
30 | }
31 |
32 | void FlutterWindow::OnDestroy() {
33 | if (flutter_controller_) {
34 | flutter_controller_ = nullptr;
35 | }
36 |
37 | Win32Window::OnDestroy();
38 | }
39 |
40 | LRESULT
41 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message,
42 | WPARAM const wparam,
43 | LPARAM const lparam) noexcept {
44 | // Give Flutter, including plugins, an opportunity to handle window messages.
45 | if (flutter_controller_) {
46 | std::optional result =
47 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,
48 | lparam);
49 | if (result) {
50 | return *result;
51 | }
52 | }
53 |
54 | switch (message) {
55 | case WM_FONTCHANGE:
56 | flutter_controller_->engine()->ReloadSystemFonts();
57 | break;
58 | }
59 |
60 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
61 | }
62 |
--------------------------------------------------------------------------------
/windows/runner/flutter_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_FLUTTER_WINDOW_H_
2 | #define RUNNER_FLUTTER_WINDOW_H_
3 |
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | #include "win32_window.h"
10 |
11 | // A window that does nothing but host a Flutter view.
12 | class FlutterWindow : public Win32Window {
13 | public:
14 | // Creates a new FlutterWindow hosting a Flutter view running |project|.
15 | explicit FlutterWindow(const flutter::DartProject& project);
16 | virtual ~FlutterWindow();
17 |
18 | protected:
19 | // Win32Window:
20 | bool OnCreate() override;
21 | void OnDestroy() override;
22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,
23 | LPARAM const lparam) noexcept override;
24 |
25 | private:
26 | // The project to run.
27 | flutter::DartProject project_;
28 |
29 | // The Flutter instance hosted by this window.
30 | std::unique_ptr flutter_controller_;
31 | };
32 |
33 | #endif // RUNNER_FLUTTER_WINDOW_H_
34 |
--------------------------------------------------------------------------------
/windows/runner/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #include "flutter_window.h"
6 | #include "utils.h"
7 |
8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
9 | _In_ wchar_t *command_line, _In_ int show_command) {
10 | // Attach to console when present (e.g., 'flutter run') or create a
11 | // new console when running with a debugger.
12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
13 | CreateAndAttachConsole();
14 | }
15 |
16 | // Initialize COM, so that it is available for use in the library and/or
17 | // plugins.
18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
19 |
20 | flutter::DartProject project(L"data");
21 |
22 | std::vector command_line_arguments =
23 | GetCommandLineArguments();
24 |
25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
26 |
27 | FlutterWindow window(project);
28 | Win32Window::Point origin(10, 10);
29 | Win32Window::Size size(1280, 720);
30 | if (!window.CreateAndShow(L"flutter_microanimations", origin, size)) {
31 | return EXIT_FAILURE;
32 | }
33 | window.SetQuitOnClose(true);
34 |
35 | ::MSG msg;
36 | while (::GetMessage(&msg, nullptr, 0, 0)) {
37 | ::TranslateMessage(&msg);
38 | ::DispatchMessage(&msg);
39 | }
40 |
41 | ::CoUninitialize();
42 | return EXIT_SUCCESS;
43 | }
44 |
--------------------------------------------------------------------------------
/windows/runner/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Runner.rc
4 | //
5 | #define IDI_APP_ICON 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/windows/runner/resources/app_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robertodevs/flutter_microanimations/410a5a8453952905b29fe936c7b929a0597ce69e/windows/runner/resources/app_icon.ico
--------------------------------------------------------------------------------
/windows/runner/runner.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PerMonitorV2
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/windows/runner/utils.cpp:
--------------------------------------------------------------------------------
1 | #include "utils.h"
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | #include
9 |
10 | void CreateAndAttachConsole() {
11 | if (::AllocConsole()) {
12 | FILE *unused;
13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
14 | _dup2(_fileno(stdout), 1);
15 | }
16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) {
17 | _dup2(_fileno(stdout), 2);
18 | }
19 | std::ios::sync_with_stdio();
20 | FlutterDesktopResyncOutputStreams();
21 | }
22 | }
23 |
24 | std::vector GetCommandLineArguments() {
25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.
26 | int argc;
27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
28 | if (argv == nullptr) {
29 | return std::vector();
30 | }
31 |
32 | std::vector command_line_arguments;
33 |
34 | // Skip the first argument as it's the binary name.
35 | for (int i = 1; i < argc; i++) {
36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i]));
37 | }
38 |
39 | ::LocalFree(argv);
40 |
41 | return command_line_arguments;
42 | }
43 |
44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) {
45 | if (utf16_string == nullptr) {
46 | return std::string();
47 | }
48 | int target_length = ::WideCharToMultiByte(
49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
50 | -1, nullptr, 0, nullptr, nullptr);
51 | if (target_length == 0) {
52 | return std::string();
53 | }
54 | std::string utf8_string;
55 | utf8_string.resize(target_length);
56 | int converted_length = ::WideCharToMultiByte(
57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
58 | -1, utf8_string.data(),
59 | target_length, nullptr, nullptr);
60 | if (converted_length == 0) {
61 | return std::string();
62 | }
63 | return utf8_string;
64 | }
65 |
--------------------------------------------------------------------------------
/windows/runner/utils.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_UTILS_H_
2 | #define RUNNER_UTILS_H_
3 |
4 | #include
5 | #include
6 |
7 | // Creates a console for the process, and redirects stdout and stderr to
8 | // it for both the runner and the Flutter library.
9 | void CreateAndAttachConsole();
10 |
11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string
12 | // encoded in UTF-8. Returns an empty std::string on failure.
13 | std::string Utf8FromUtf16(const wchar_t* utf16_string);
14 |
15 | // Gets the command line arguments passed in as a std::vector,
16 | // encoded in UTF-8. Returns an empty std::vector on failure.
17 | std::vector GetCommandLineArguments();
18 |
19 | #endif // RUNNER_UTILS_H_
20 |
--------------------------------------------------------------------------------
/windows/runner/win32_window.cpp:
--------------------------------------------------------------------------------
1 | #include "win32_window.h"
2 |
3 | #include
4 |
5 | #include "resource.h"
6 |
7 | namespace {
8 |
9 | constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW";
10 |
11 | // The number of Win32Window objects that currently exist.
12 | static int g_active_window_count = 0;
13 |
14 | using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd);
15 |
16 | // Scale helper to convert logical scaler values to physical using passed in
17 | // scale factor
18 | int Scale(int source, double scale_factor) {
19 | return static_cast(source * scale_factor);
20 | }
21 |
22 | // Dynamically loads the |EnableNonClientDpiScaling| from the User32 module.
23 | // This API is only needed for PerMonitor V1 awareness mode.
24 | void EnableFullDpiSupportIfAvailable(HWND hwnd) {
25 | HMODULE user32_module = LoadLibraryA("User32.dll");
26 | if (!user32_module) {
27 | return;
28 | }
29 | auto enable_non_client_dpi_scaling =
30 | reinterpret_cast(
31 | GetProcAddress(user32_module, "EnableNonClientDpiScaling"));
32 | if (enable_non_client_dpi_scaling != nullptr) {
33 | enable_non_client_dpi_scaling(hwnd);
34 | FreeLibrary(user32_module);
35 | }
36 | }
37 |
38 | } // namespace
39 |
40 | // Manages the Win32Window's window class registration.
41 | class WindowClassRegistrar {
42 | public:
43 | ~WindowClassRegistrar() = default;
44 |
45 | // Returns the singleton registar instance.
46 | static WindowClassRegistrar* GetInstance() {
47 | if (!instance_) {
48 | instance_ = new WindowClassRegistrar();
49 | }
50 | return instance_;
51 | }
52 |
53 | // Returns the name of the window class, registering the class if it hasn't
54 | // previously been registered.
55 | const wchar_t* GetWindowClass();
56 |
57 | // Unregisters the window class. Should only be called if there are no
58 | // instances of the window.
59 | void UnregisterWindowClass();
60 |
61 | private:
62 | WindowClassRegistrar() = default;
63 |
64 | static WindowClassRegistrar* instance_;
65 |
66 | bool class_registered_ = false;
67 | };
68 |
69 | WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr;
70 |
71 | const wchar_t* WindowClassRegistrar::GetWindowClass() {
72 | if (!class_registered_) {
73 | WNDCLASS window_class{};
74 | window_class.hCursor = LoadCursor(nullptr, IDC_ARROW);
75 | window_class.lpszClassName = kWindowClassName;
76 | window_class.style = CS_HREDRAW | CS_VREDRAW;
77 | window_class.cbClsExtra = 0;
78 | window_class.cbWndExtra = 0;
79 | window_class.hInstance = GetModuleHandle(nullptr);
80 | window_class.hIcon =
81 | LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON));
82 | window_class.hbrBackground = 0;
83 | window_class.lpszMenuName = nullptr;
84 | window_class.lpfnWndProc = Win32Window::WndProc;
85 | RegisterClass(&window_class);
86 | class_registered_ = true;
87 | }
88 | return kWindowClassName;
89 | }
90 |
91 | void WindowClassRegistrar::UnregisterWindowClass() {
92 | UnregisterClass(kWindowClassName, nullptr);
93 | class_registered_ = false;
94 | }
95 |
96 | Win32Window::Win32Window() {
97 | ++g_active_window_count;
98 | }
99 |
100 | Win32Window::~Win32Window() {
101 | --g_active_window_count;
102 | Destroy();
103 | }
104 |
105 | bool Win32Window::CreateAndShow(const std::wstring& title,
106 | const Point& origin,
107 | const Size& size) {
108 | Destroy();
109 |
110 | const wchar_t* window_class =
111 | WindowClassRegistrar::GetInstance()->GetWindowClass();
112 |
113 | const POINT target_point = {static_cast(origin.x),
114 | static_cast(origin.y)};
115 | HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST);
116 | UINT dpi = FlutterDesktopGetDpiForMonitor(monitor);
117 | double scale_factor = dpi / 96.0;
118 |
119 | HWND window = CreateWindow(
120 | window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE,
121 | Scale(origin.x, scale_factor), Scale(origin.y, scale_factor),
122 | Scale(size.width, scale_factor), Scale(size.height, scale_factor),
123 | nullptr, nullptr, GetModuleHandle(nullptr), this);
124 |
125 | if (!window) {
126 | return false;
127 | }
128 |
129 | return OnCreate();
130 | }
131 |
132 | // static
133 | LRESULT CALLBACK Win32Window::WndProc(HWND const window,
134 | UINT const message,
135 | WPARAM const wparam,
136 | LPARAM const lparam) noexcept {
137 | if (message == WM_NCCREATE) {
138 | auto window_struct = reinterpret_cast(lparam);
139 | SetWindowLongPtr(window, GWLP_USERDATA,
140 | reinterpret_cast(window_struct->lpCreateParams));
141 |
142 | auto that = static_cast(window_struct->lpCreateParams);
143 | EnableFullDpiSupportIfAvailable(window);
144 | that->window_handle_ = window;
145 | } else if (Win32Window* that = GetThisFromHandle(window)) {
146 | return that->MessageHandler(window, message, wparam, lparam);
147 | }
148 |
149 | return DefWindowProc(window, message, wparam, lparam);
150 | }
151 |
152 | LRESULT
153 | Win32Window::MessageHandler(HWND hwnd,
154 | UINT const message,
155 | WPARAM const wparam,
156 | LPARAM const lparam) noexcept {
157 | switch (message) {
158 | case WM_DESTROY:
159 | window_handle_ = nullptr;
160 | Destroy();
161 | if (quit_on_close_) {
162 | PostQuitMessage(0);
163 | }
164 | return 0;
165 |
166 | case WM_DPICHANGED: {
167 | auto newRectSize = reinterpret_cast(lparam);
168 | LONG newWidth = newRectSize->right - newRectSize->left;
169 | LONG newHeight = newRectSize->bottom - newRectSize->top;
170 |
171 | SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth,
172 | newHeight, SWP_NOZORDER | SWP_NOACTIVATE);
173 |
174 | return 0;
175 | }
176 | case WM_SIZE: {
177 | RECT rect = GetClientArea();
178 | if (child_content_ != nullptr) {
179 | // Size and position the child window.
180 | MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left,
181 | rect.bottom - rect.top, TRUE);
182 | }
183 | return 0;
184 | }
185 |
186 | case WM_ACTIVATE:
187 | if (child_content_ != nullptr) {
188 | SetFocus(child_content_);
189 | }
190 | return 0;
191 | }
192 |
193 | return DefWindowProc(window_handle_, message, wparam, lparam);
194 | }
195 |
196 | void Win32Window::Destroy() {
197 | OnDestroy();
198 |
199 | if (window_handle_) {
200 | DestroyWindow(window_handle_);
201 | window_handle_ = nullptr;
202 | }
203 | if (g_active_window_count == 0) {
204 | WindowClassRegistrar::GetInstance()->UnregisterWindowClass();
205 | }
206 | }
207 |
208 | Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept {
209 | return reinterpret_cast(
210 | GetWindowLongPtr(window, GWLP_USERDATA));
211 | }
212 |
213 | void Win32Window::SetChildContent(HWND content) {
214 | child_content_ = content;
215 | SetParent(content, window_handle_);
216 | RECT frame = GetClientArea();
217 |
218 | MoveWindow(content, frame.left, frame.top, frame.right - frame.left,
219 | frame.bottom - frame.top, true);
220 |
221 | SetFocus(child_content_);
222 | }
223 |
224 | RECT Win32Window::GetClientArea() {
225 | RECT frame;
226 | GetClientRect(window_handle_, &frame);
227 | return frame;
228 | }
229 |
230 | HWND Win32Window::GetHandle() {
231 | return window_handle_;
232 | }
233 |
234 | void Win32Window::SetQuitOnClose(bool quit_on_close) {
235 | quit_on_close_ = quit_on_close;
236 | }
237 |
238 | bool Win32Window::OnCreate() {
239 | // No-op; provided for subclasses.
240 | return true;
241 | }
242 |
243 | void Win32Window::OnDestroy() {
244 | // No-op; provided for subclasses.
245 | }
246 |
--------------------------------------------------------------------------------
/windows/runner/win32_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_WIN32_WINDOW_H_
2 | #define RUNNER_WIN32_WINDOW_H_
3 |
4 | #include
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be
11 | // inherited from by classes that wish to specialize with custom
12 | // rendering and input handling
13 | class Win32Window {
14 | public:
15 | struct Point {
16 | unsigned int x;
17 | unsigned int y;
18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {}
19 | };
20 |
21 | struct Size {
22 | unsigned int width;
23 | unsigned int height;
24 | Size(unsigned int width, unsigned int height)
25 | : width(width), height(height) {}
26 | };
27 |
28 | Win32Window();
29 | virtual ~Win32Window();
30 |
31 | // Creates and shows a win32 window with |title| and position and size using
32 | // |origin| and |size|. New windows are created on the default monitor. Window
33 | // sizes are specified to the OS in physical pixels, hence to ensure a
34 | // consistent size to will treat the width height passed in to this function
35 | // as logical pixels and scale to appropriate for the default monitor. Returns
36 | // true if the window was created successfully.
37 | bool CreateAndShow(const std::wstring& title,
38 | const Point& origin,
39 | const Size& size);
40 |
41 | // Release OS resources associated with window.
42 | void Destroy();
43 |
44 | // Inserts |content| into the window tree.
45 | void SetChildContent(HWND content);
46 |
47 | // Returns the backing Window handle to enable clients to set icon and other
48 | // window properties. Returns nullptr if the window has been destroyed.
49 | HWND GetHandle();
50 |
51 | // If true, closing this window will quit the application.
52 | void SetQuitOnClose(bool quit_on_close);
53 |
54 | // Return a RECT representing the bounds of the current client area.
55 | RECT GetClientArea();
56 |
57 | protected:
58 | // Processes and route salient window messages for mouse handling,
59 | // size change and DPI. Delegates handling of these to member overloads that
60 | // inheriting classes can handle.
61 | virtual LRESULT MessageHandler(HWND window,
62 | UINT const message,
63 | WPARAM const wparam,
64 | LPARAM const lparam) noexcept;
65 |
66 | // Called when CreateAndShow is called, allowing subclass window-related
67 | // setup. Subclasses should return false if setup fails.
68 | virtual bool OnCreate();
69 |
70 | // Called when Destroy is called.
71 | virtual void OnDestroy();
72 |
73 | private:
74 | friend class WindowClassRegistrar;
75 |
76 | // OS callback called by message pump. Handles the WM_NCCREATE message which
77 | // is passed when the non-client area is being created and enables automatic
78 | // non-client DPI scaling so that the non-client area automatically
79 | // responsponds to changes in DPI. All other messages are handled by
80 | // MessageHandler.
81 | static LRESULT CALLBACK WndProc(HWND const window,
82 | UINT const message,
83 | WPARAM const wparam,
84 | LPARAM const lparam) noexcept;
85 |
86 | // Retrieves a class instance pointer for |window|
87 | static Win32Window* GetThisFromHandle(HWND const window) noexcept;
88 |
89 | bool quit_on_close_ = false;
90 |
91 | // window handle for top level window.
92 | HWND window_handle_ = nullptr;
93 |
94 | // window handle for hosted content.
95 | HWND child_content_ = nullptr;
96 | };
97 |
98 | #endif // RUNNER_WIN32_WINDOW_H_
99 |
--------------------------------------------------------------------------------