├── .gitignore ├── Isolate └── flutter_async │ ├── .gitignore │ ├── .idea │ ├── codeStyles │ │ └── Project.xml │ ├── libraries │ │ ├── Dart_Packages.xml │ │ ├── Dart_SDK.xml │ │ ├── Flutter_Plugins.xml │ │ └── Flutter_for_Android.xml │ ├── misc.xml │ ├── modules.xml │ ├── runConfigurations │ │ └── main_dart.xml │ └── workspace.xml │ ├── .metadata │ ├── README.md │ ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── flutterasync │ │ │ │ └── MainActivity.java │ │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle │ ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ └── contents.xcworkspacedata │ └── Runner │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── main.m │ ├── lib │ └── main.dart │ ├── pubspec.lock │ ├── pubspec.yaml │ └── test │ └── widget_test.dart ├── LICENSE ├── MediumClapAnimation └── medium_clap │ ├── .gitignore │ ├── .metadata │ ├── README.md │ ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── mediumclap │ │ │ │ └── MainActivity.java │ │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle │ ├── images │ ├── clap.png │ └── sparkles.png │ ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ └── contents.xcworkspacedata │ └── Runner │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── main.m │ ├── lib │ └── main.dart │ ├── pubspec.lock │ ├── pubspec.yaml │ └── test │ └── widget_test.dart ├── README.md └── youtube_bottom_sheet ├── .gitignore ├── .metadata ├── README.md ├── android ├── app │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── youtubebottomsheet │ │ │ └── MainActivity.java │ │ └── res │ │ ├── drawable │ │ └── launch_background.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ └── values │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── ios ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── main.m ├── lib ├── MainPage.dart ├── VideoPage.dart └── main.dart ├── pubspec.yaml └── test └── widget_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | out/ 15 | 16 | # Gradle files 17 | .gradle/ 18 | build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | 29 | # Android Studio Navigation editor temp files 30 | .navigation/ 31 | 32 | # Android Studio captures folder 33 | captures/ 34 | 35 | # Intellij 36 | *.iml 37 | .idea/workspace.xml 38 | .idea/tasks.xml 39 | .idea/gradle.xml 40 | .idea/dictionaries 41 | .idea/libraries 42 | 43 | # Keystore files 44 | *.jks 45 | 46 | # External native build folder generated in Android Studio 2.2 and later 47 | .externalNativeBuild 48 | 49 | # Google Services (e.g. APIs or Firebase) 50 | google-services.json 51 | 52 | # Freeline 53 | freeline.py 54 | freeline/ 55 | freeline_project_description.json 56 | -------------------------------------------------------------------------------- /Isolate/flutter_async/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | 7 | build/ 8 | 9 | .flutter-plugins 10 | -------------------------------------------------------------------------------- /Isolate/flutter_async/.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Isolate/flutter_async/.idea/libraries/Dart_SDK.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Isolate/flutter_async/.idea/libraries/Flutter_Plugins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Isolate/flutter_async/.idea/libraries/Flutter_for_Android.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Isolate/flutter_async/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Isolate/flutter_async/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Isolate/flutter_async/.idea/runConfigurations/main_dart.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /Isolate/flutter_async/.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 36 | 37 | 38 | 43 | 44 | 45 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 83 | 84 | 85 | 86 | 87 | 88 | 102 | 103 | 104 | 105 | 106 | 107 | 119 | 120 | 126 | 127 | 128 | 129 | 147 | 153 | 154 | 162 | 163 | 168 | 169 | 171 | 172 | 173 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 1530887666280 182 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | -------------------------------------------------------------------------------- /Isolate/flutter_async/.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: ea30c95dc99de6f86f23caca3d219c5f89a19bff 8 | channel: beta 9 | -------------------------------------------------------------------------------- /Isolate/flutter_async/README.md: -------------------------------------------------------------------------------- 1 | # Flutter Async 2 | 3 | Flutter app showing how to use **Isolates** to do heavy task in background and make flutter *butterly smooth* . 4 | To learn more, checkout my article on medium [here](https://blog.usejournal.com/flutter-async-beginner-friendly-guide-for-heavy-lifting-operations-cf8ec81833d7) 5 | 6 | ![Image](https://cdn-images-1.medium.com/max/1200/1*UhGrpHMnqkErJ85sIF8dfQ.gif) 7 | 8 | 9 | ## Getting Started 10 | 11 | For help getting started with Flutter, view our online 12 | [documentation](https://flutter.io/). 13 | -------------------------------------------------------------------------------- /Isolate/flutter_async/android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | *.class 3 | .gradle 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | /build 9 | /captures 10 | GeneratedPluginRegistrant.java 11 | -------------------------------------------------------------------------------- /Isolate/flutter_async/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 | apply plugin: 'com.android.application' 15 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 16 | 17 | android { 18 | compileSdkVersion 27 19 | 20 | lintOptions { 21 | disable 'InvalidPackage' 22 | } 23 | 24 | defaultConfig { 25 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 26 | applicationId "com.example.flutterasync" 27 | minSdkVersion 16 28 | targetSdkVersion 27 29 | versionCode 1 30 | versionName "1.0" 31 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 32 | } 33 | 34 | buildTypes { 35 | release { 36 | // TODO: Add your own signing config for the release build. 37 | // Signing with the debug keys for now, so `flutter run --release` works. 38 | signingConfig signingConfigs.debug 39 | } 40 | } 41 | } 42 | 43 | flutter { 44 | source '../..' 45 | } 46 | 47 | dependencies { 48 | testImplementation 'junit:junit:4.12' 49 | androidTestImplementation 'com.android.support.test:runner:1.0.1' 50 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 51 | } 52 | -------------------------------------------------------------------------------- /Isolate/flutter_async/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 15 | 19 | 26 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Isolate/flutter_async/android/app/src/main/java/com/example/flutterasync/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.flutterasync; 2 | 3 | import android.os.Bundle; 4 | 5 | import io.flutter.app.FlutterActivity; 6 | import io.flutter.plugins.GeneratedPluginRegistrant; 7 | 8 | public class MainActivity extends FlutterActivity { 9 | @Override 10 | protected void onCreate(Bundle savedInstanceState) { 11 | super.onCreate(savedInstanceState); 12 | GeneratedPluginRegistrant.registerWith(this); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Isolate/flutter_async/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /Isolate/flutter_async/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Isolate/flutter_async/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Isolate/flutter_async/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Isolate/flutter_async/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Isolate/flutter_async/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Isolate/flutter_async/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /Isolate/flutter_async/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.0.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /Isolate/flutter_async/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /Isolate/flutter_async/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Isolate/flutter_async/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip 7 | -------------------------------------------------------------------------------- /Isolate/flutter_async/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /Isolate/flutter_async/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /Isolate/flutter_async/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/app.flx 37 | /Flutter/app.zip 38 | /Flutter/flutter_assets/ 39 | /Flutter/App.framework 40 | /Flutter/Flutter.framework 41 | /Flutter/Generated.xcconfig 42 | /ServiceDefinitions.json 43 | 44 | Pods/ 45 | -------------------------------------------------------------------------------- /Isolate/flutter_async/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 | UIRequiredDeviceCapabilities 24 | 25 | arm64 26 | 27 | MinimumOSVersion 28 | 8.0 29 | 30 | 31 | -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 7 | [GeneratedPluginRegistrant registerWithRegistry:self]; 8 | // Override point for customization after application launch. 9 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Isolate/flutter_async/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 | -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /Isolate/flutter_async/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 | -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/Isolate/flutter_async/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /Isolate/flutter_async/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. -------------------------------------------------------------------------------- /Isolate/flutter_async/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 | -------------------------------------------------------------------------------- /Isolate/flutter_async/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 | -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flutter_async 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | arm64 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIViewControllerBasedStatusBarAppearance 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Isolate/flutter_async/ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Isolate/flutter_async/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'dart:async'; 3 | import 'dart:isolate'; 4 | import 'package:flutter/foundation.dart'; 5 | 6 | void main() => runApp(new MyApp()); 7 | 8 | class MyApp extends StatelessWidget { 9 | // This widget is the root of your application. 10 | @override 11 | Widget build(BuildContext context) { 12 | return new MaterialApp( 13 | title: 'Flutter Demo', 14 | theme: new ThemeData( 15 | primarySwatch: Colors.blue, 16 | ), 17 | home: new MyHomePage(title: 'Flutter Demo Home Page'), 18 | ); 19 | } 20 | } 21 | 22 | class MyHomePage extends StatefulWidget { 23 | MyHomePage({Key key, this.title}) : super(key: key); 24 | 25 | final String title; 26 | 27 | @override 28 | _MyHomePageState createState() => new _MyHomePageState(); 29 | } 30 | 31 | class _MyHomePageState extends State { 32 | int prime; 33 | 34 | _MyHomePageState() { 35 | prime = 0; 36 | } 37 | 38 | /// A slow algorithm to test if a number is prime or not. 39 | static bool isPrime(int n) { 40 | int count = 0; 41 | for (int i = 1; i <= n; ++i) { 42 | if (n % i == 0) { 43 | ++count; 44 | } 45 | } 46 | return count == 2; 47 | } 48 | 49 | /// Returns the nth prime number. 50 | static getnthPrime(SendPort sendPort) async { 51 | // Port for receiving message from main isolate. 52 | // We will receive the value of n using this port. 53 | ReceivePort receivePort = ReceivePort(); 54 | // Sending the send Port of isolate to receive port of main isolate. 55 | sendPort.send(receivePort.sendPort); 56 | var msg = await receivePort.first; 57 | 58 | int n = msg[0]; 59 | SendPort replyPort = msg[1]; 60 | int currentPrimeCount = 0; 61 | int candidate = 1; 62 | while (currentPrimeCount < n) { 63 | ++candidate; 64 | if (isPrime(candidate)) { 65 | ++currentPrimeCount; 66 | } 67 | } 68 | replyPort.send(candidate); 69 | 70 | } 71 | 72 | void _getPrime() async { 73 | // Port where we will receive our answer to nth prime. 74 | // From isolate to main isolate. 75 | ReceivePort receivePort = ReceivePort(); 76 | await Isolate.spawn(getnthPrime, receivePort.sendPort); 77 | 78 | // Send port for the prime number isolate. We will send parameter n 79 | // using this port. 80 | SendPort sendPort = await receivePort.first; 81 | int ans = await sendReceive(sendPort, 1000); 82 | setState(() { 83 | prime = ans; 84 | }); 85 | } 86 | 87 | Future sendReceive(SendPort send, message) { 88 | ReceivePort receivePort = ReceivePort(); 89 | send.send([message, receivePort.sendPort]); 90 | return receivePort.first; 91 | } 92 | 93 | @override 94 | Widget build(BuildContext context) { 95 | return new Scaffold( 96 | appBar: new AppBar( 97 | title: new Text(widget.title), 98 | ), 99 | body: new Center( 100 | child: new Column( 101 | mainAxisAlignment: MainAxisAlignment.center, 102 | children: [ 103 | Text(prime.toString()), 104 | LinearProgressIndicator( 105 | value: null, 106 | ) 107 | ], 108 | ), 109 | ), 110 | floatingActionButton: new FloatingActionButton( 111 | onPressed: _getPrime, 112 | tooltip: 'Find Prime', 113 | child: new Icon(Icons.autorenew), 114 | ), 115 | ); 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /Isolate/flutter_async/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://www.dartlang.org/tools/pub/glossary#lockfile 3 | packages: 4 | analyzer: 5 | dependency: transitive 6 | description: 7 | name: analyzer 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "0.31.1" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.4.2" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.0.6" 25 | barback: 26 | dependency: transitive 27 | description: 28 | name: barback 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "0.15.2+15" 32 | boolean_selector: 33 | dependency: transitive 34 | description: 35 | name: boolean_selector 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.0.3" 39 | charcode: 40 | dependency: transitive 41 | description: 42 | name: charcode 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.1.1" 46 | cli_util: 47 | dependency: transitive 48 | description: 49 | name: cli_util 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "0.1.2+1" 53 | collection: 54 | dependency: transitive 55 | description: 56 | name: collection 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.14.6" 60 | convert: 61 | dependency: transitive 62 | description: 63 | name: convert 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "2.0.1" 67 | crypto: 68 | dependency: transitive 69 | description: 70 | name: crypto 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "2.0.2+1" 74 | csslib: 75 | dependency: transitive 76 | description: 77 | name: csslib 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "0.14.1" 81 | cupertino_icons: 82 | dependency: "direct main" 83 | description: 84 | name: cupertino_icons 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "0.1.2" 88 | flutter: 89 | dependency: "direct main" 90 | description: flutter 91 | source: sdk 92 | version: "0.0.0" 93 | flutter_test: 94 | dependency: "direct dev" 95 | description: flutter 96 | source: sdk 97 | version: "0.0.0" 98 | front_end: 99 | dependency: transitive 100 | description: 101 | name: front_end 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "0.1.0-alpha.9" 105 | glob: 106 | dependency: transitive 107 | description: 108 | name: glob 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "1.1.5" 112 | html: 113 | dependency: transitive 114 | description: 115 | name: html 116 | url: "https://pub.dartlang.org" 117 | source: hosted 118 | version: "0.13.3" 119 | http: 120 | dependency: transitive 121 | description: 122 | name: http 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "0.11.3+16" 126 | http_multi_server: 127 | dependency: transitive 128 | description: 129 | name: http_multi_server 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "2.0.4" 133 | http_parser: 134 | dependency: transitive 135 | description: 136 | name: http_parser 137 | url: "https://pub.dartlang.org" 138 | source: hosted 139 | version: "3.1.1" 140 | io: 141 | dependency: transitive 142 | description: 143 | name: io 144 | url: "https://pub.dartlang.org" 145 | source: hosted 146 | version: "0.3.2+1" 147 | isolate: 148 | dependency: transitive 149 | description: 150 | name: isolate 151 | url: "https://pub.dartlang.org" 152 | source: hosted 153 | version: "1.1.0" 154 | js: 155 | dependency: transitive 156 | description: 157 | name: js 158 | url: "https://pub.dartlang.org" 159 | source: hosted 160 | version: "0.6.1" 161 | kernel: 162 | dependency: transitive 163 | description: 164 | name: kernel 165 | url: "https://pub.dartlang.org" 166 | source: hosted 167 | version: "0.3.0-alpha.9" 168 | logging: 169 | dependency: transitive 170 | description: 171 | name: logging 172 | url: "https://pub.dartlang.org" 173 | source: hosted 174 | version: "0.11.3+1" 175 | matcher: 176 | dependency: transitive 177 | description: 178 | name: matcher 179 | url: "https://pub.dartlang.org" 180 | source: hosted 181 | version: "0.12.1+4" 182 | meta: 183 | dependency: transitive 184 | description: 185 | name: meta 186 | url: "https://pub.dartlang.org" 187 | source: hosted 188 | version: "1.1.2" 189 | mime: 190 | dependency: transitive 191 | description: 192 | name: mime 193 | url: "https://pub.dartlang.org" 194 | source: hosted 195 | version: "0.9.6" 196 | multi_server_socket: 197 | dependency: transitive 198 | description: 199 | name: multi_server_socket 200 | url: "https://pub.dartlang.org" 201 | source: hosted 202 | version: "1.0.1" 203 | node_preamble: 204 | dependency: transitive 205 | description: 206 | name: node_preamble 207 | url: "https://pub.dartlang.org" 208 | source: hosted 209 | version: "1.4.0" 210 | package_config: 211 | dependency: transitive 212 | description: 213 | name: package_config 214 | url: "https://pub.dartlang.org" 215 | source: hosted 216 | version: "1.0.3" 217 | package_resolver: 218 | dependency: transitive 219 | description: 220 | name: package_resolver 221 | url: "https://pub.dartlang.org" 222 | source: hosted 223 | version: "1.0.2" 224 | path: 225 | dependency: transitive 226 | description: 227 | name: path 228 | url: "https://pub.dartlang.org" 229 | source: hosted 230 | version: "1.5.1" 231 | plugin: 232 | dependency: transitive 233 | description: 234 | name: plugin 235 | url: "https://pub.dartlang.org" 236 | source: hosted 237 | version: "0.2.0+2" 238 | pool: 239 | dependency: transitive 240 | description: 241 | name: pool 242 | url: "https://pub.dartlang.org" 243 | source: hosted 244 | version: "1.3.4" 245 | pub_semver: 246 | dependency: transitive 247 | description: 248 | name: pub_semver 249 | url: "https://pub.dartlang.org" 250 | source: hosted 251 | version: "1.3.6" 252 | quiver: 253 | dependency: transitive 254 | description: 255 | name: quiver 256 | url: "https://pub.dartlang.org" 257 | source: hosted 258 | version: "0.29.0+1" 259 | shelf: 260 | dependency: transitive 261 | description: 262 | name: shelf 263 | url: "https://pub.dartlang.org" 264 | source: hosted 265 | version: "0.7.2" 266 | shelf_packages_handler: 267 | dependency: transitive 268 | description: 269 | name: shelf_packages_handler 270 | url: "https://pub.dartlang.org" 271 | source: hosted 272 | version: "1.0.3" 273 | shelf_static: 274 | dependency: transitive 275 | description: 276 | name: shelf_static 277 | url: "https://pub.dartlang.org" 278 | source: hosted 279 | version: "0.2.7" 280 | shelf_web_socket: 281 | dependency: transitive 282 | description: 283 | name: shelf_web_socket 284 | url: "https://pub.dartlang.org" 285 | source: hosted 286 | version: "0.2.2" 287 | sky_engine: 288 | dependency: transitive 289 | description: flutter 290 | source: sdk 291 | version: "0.0.99" 292 | source_map_stack_trace: 293 | dependency: transitive 294 | description: 295 | name: source_map_stack_trace 296 | url: "https://pub.dartlang.org" 297 | source: hosted 298 | version: "1.1.4" 299 | source_maps: 300 | dependency: transitive 301 | description: 302 | name: source_maps 303 | url: "https://pub.dartlang.org" 304 | source: hosted 305 | version: "0.10.4" 306 | source_span: 307 | dependency: transitive 308 | description: 309 | name: source_span 310 | url: "https://pub.dartlang.org" 311 | source: hosted 312 | version: "1.4.0" 313 | stack_trace: 314 | dependency: transitive 315 | description: 316 | name: stack_trace 317 | url: "https://pub.dartlang.org" 318 | source: hosted 319 | version: "1.9.2" 320 | stream_channel: 321 | dependency: transitive 322 | description: 323 | name: stream_channel 324 | url: "https://pub.dartlang.org" 325 | source: hosted 326 | version: "1.6.4" 327 | string_scanner: 328 | dependency: transitive 329 | description: 330 | name: string_scanner 331 | url: "https://pub.dartlang.org" 332 | source: hosted 333 | version: "1.0.2" 334 | term_glyph: 335 | dependency: transitive 336 | description: 337 | name: term_glyph 338 | url: "https://pub.dartlang.org" 339 | source: hosted 340 | version: "1.0.0" 341 | test: 342 | dependency: transitive 343 | description: 344 | name: test 345 | url: "https://pub.dartlang.org" 346 | source: hosted 347 | version: "0.12.34" 348 | typed_data: 349 | dependency: transitive 350 | description: 351 | name: typed_data 352 | url: "https://pub.dartlang.org" 353 | source: hosted 354 | version: "1.1.5" 355 | utf: 356 | dependency: transitive 357 | description: 358 | name: utf 359 | url: "https://pub.dartlang.org" 360 | source: hosted 361 | version: "0.9.0+4" 362 | vector_math: 363 | dependency: transitive 364 | description: 365 | name: vector_math 366 | url: "https://pub.dartlang.org" 367 | source: hosted 368 | version: "2.0.6" 369 | watcher: 370 | dependency: transitive 371 | description: 372 | name: watcher 373 | url: "https://pub.dartlang.org" 374 | source: hosted 375 | version: "0.9.7+7" 376 | web_socket_channel: 377 | dependency: transitive 378 | description: 379 | name: web_socket_channel 380 | url: "https://pub.dartlang.org" 381 | source: hosted 382 | version: "1.0.7" 383 | yaml: 384 | dependency: transitive 385 | description: 386 | name: yaml 387 | url: "https://pub.dartlang.org" 388 | source: hosted 389 | version: "2.1.13" 390 | sdks: 391 | dart: ">=2.0.0-dev.28.0 <=2.0.0-edge.3c4dccbd46f152be9e1b6ca95c57357e8e48057c" 392 | -------------------------------------------------------------------------------- /Isolate/flutter_async/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_async 2 | description: A new Flutter application. 3 | 4 | dependencies: 5 | flutter: 6 | sdk: flutter 7 | 8 | # The following adds the Cupertino Icons font to your application. 9 | # Use with the CupertinoIcons class for iOS style icons. 10 | cupertino_icons: ^0.1.0 11 | 12 | dev_dependencies: 13 | flutter_test: 14 | sdk: flutter 15 | 16 | 17 | # For information on the generic Dart part of this file, see the 18 | # following page: https://www.dartlang.org/tools/pub/pubspec 19 | 20 | # The following section is specific to Flutter. 21 | flutter: 22 | 23 | # The following line ensures that the Material Icons font is 24 | # included with your application, so that you can use the icons in 25 | # the material Icons class. 26 | uses-material-design: true 27 | 28 | # To add assets to your application, add an assets section, like this: 29 | # assets: 30 | # - images/a_dot_burr.jpeg 31 | # - images/a_dot_ham.jpeg 32 | 33 | # An image asset can refer to one or more resolution-specific "variants", see 34 | # https://flutter.io/assets-and-images/#resolution-aware. 35 | 36 | # For details regarding adding assets from package dependencies, see 37 | # https://flutter.io/assets-and-images/#from-packages 38 | 39 | # To add custom fonts to your application, add a fonts section here, 40 | # in this "flutter" section. Each entry in this list should have a 41 | # "family" key with the font family name, and a "fonts" key with a 42 | # list giving the asset and other descriptors for the font. For 43 | # example: 44 | # fonts: 45 | # - family: Schyler 46 | # fonts: 47 | # - asset: fonts/Schyler-Regular.ttf 48 | # - asset: fonts/Schyler-Italic.ttf 49 | # style: italic 50 | # - family: Trajan Pro 51 | # fonts: 52 | # - asset: fonts/TrajanPro.ttf 53 | # - asset: fonts/TrajanPro_Bold.ttf 54 | # weight: 700 55 | # 56 | # For details regarding fonts from package dependencies, 57 | # see https://flutter.io/custom-fonts/#from-packages 58 | -------------------------------------------------------------------------------- /Isolate/flutter_async/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter 3 | // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to 4 | // find child widgets in the widget tree, read text, and verify that the values of widget properties 5 | // are correct. 6 | 7 | import 'package:flutter/material.dart'; 8 | import 'package:flutter_test/flutter_test.dart'; 9 | 10 | import 'package:flutter_async/main.dart'; 11 | 12 | void main() { 13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 14 | // Build our app and trigger a frame. 15 | await tester.pumpWidget(new MyApp()); 16 | 17 | // Verify that our counter starts at 0. 18 | expect(find.text('0'), findsOneWidget); 19 | expect(find.text('1'), findsNothing); 20 | 21 | // Tap the '+' icon and trigger a frame. 22 | await tester.tap(find.byIcon(Icons.add)); 23 | await tester.pump(); 24 | 25 | // Verify that our counter has incremented. 26 | expect(find.text('0'), findsNothing); 27 | expect(find.text('1'), findsOneWidget); 28 | }); 29 | } 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Kartik Sharma 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | .idea 7 | 8 | build/ 9 | 10 | .flutter-plugins 11 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/.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: ea30c95dc99de6f86f23caca3d219c5f89a19bff 8 | channel: beta 9 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/README.md: -------------------------------------------------------------------------------- 1 | # Medium Clap 2 | 3 | Project for introduction to animation in flutter. 4 | Project implements an hackish animation of medium clap animation. 5 | 6 | Read [this medium blog](https://medium.com/@Kartik1607/flutter-animation-creating-mediums-clap-animation-in-flutter-3168f047421e) for step by step guide. 7 | 8 | ![Output](https://imgur.com/53MotKF.gif) 9 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | *.class 3 | .gradle 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | /build 9 | /captures 10 | GeneratedPluginRegistrant.java 11 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/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 | apply plugin: 'com.android.application' 15 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 16 | 17 | android { 18 | compileSdkVersion 27 19 | 20 | lintOptions { 21 | disable 'InvalidPackage' 22 | } 23 | 24 | defaultConfig { 25 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 26 | applicationId "com.example.mediumclap" 27 | minSdkVersion 16 28 | targetSdkVersion 27 29 | versionCode 1 30 | versionName "1.0" 31 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 32 | } 33 | 34 | buildTypes { 35 | release { 36 | // TODO: Add your own signing config for the release build. 37 | // Signing with the debug keys for now, so `flutter run --release` works. 38 | signingConfig signingConfigs.debug 39 | } 40 | } 41 | } 42 | 43 | flutter { 44 | source '../..' 45 | } 46 | 47 | dependencies { 48 | testImplementation 'junit:junit:4.12' 49 | androidTestImplementation 'com.android.support.test:runner:1.0.1' 50 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 51 | } 52 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 15 | 19 | 26 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/android/app/src/main/java/com/example/mediumclap/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.mediumclap; 2 | 3 | import android.os.Bundle; 4 | 5 | import io.flutter.app.FlutterActivity; 6 | import io.flutter.plugins.GeneratedPluginRegistrant; 7 | 8 | public class MainActivity extends FlutterActivity { 9 | @Override 10 | protected void onCreate(Bundle savedInstanceState) { 11 | super.onCreate(savedInstanceState); 12 | GeneratedPluginRegistrant.registerWith(this); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.0.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip 7 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/images/clap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/images/clap.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/images/sparkles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/images/sparkles.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/app.flx 37 | /Flutter/app.zip 38 | /Flutter/flutter_assets/ 39 | /Flutter/App.framework 40 | /Flutter/Flutter.framework 41 | /Flutter/Generated.xcconfig 42 | /ServiceDefinitions.json 43 | 44 | Pods/ 45 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/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 | UIRequiredDeviceCapabilities 24 | 25 | arm64 26 | 27 | MinimumOSVersion 28 | 8.0 29 | 30 | 31 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 7 | [GeneratedPluginRegistrant registerWithRegistry:self]; 8 | // Override point for customization after application launch. 9 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/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 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/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 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/MediumClapAnimation/medium_clap/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/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. -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/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 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/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 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | medium_clap 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | arm64 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIViewControllerBasedStatusBarAppearance 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:math'; 3 | 4 | import 'package:flutter/material.dart'; 5 | 6 | void main() => runApp(new MyApp()); 7 | 8 | class MyApp extends StatelessWidget { 9 | @override 10 | Widget build(BuildContext context) { 11 | return new MaterialApp( 12 | title: 'Flutter Demo', 13 | theme: new ThemeData( 14 | primarySwatch: Colors.blue, 15 | ), 16 | home: new MyHomePage(title: 'Flutter Demo Home Page'), 17 | ); 18 | } 19 | } 20 | 21 | class MyHomePage extends StatefulWidget { 22 | MyHomePage({Key key, this.title}) : super(key: key); 23 | final String title; 24 | 25 | @override 26 | _MyHomePageState createState() => new _MyHomePageState(); 27 | } 28 | 29 | enum ScoreWidgetStatus { 30 | HIDDEN, 31 | BECOMING_VISIBLE, 32 | VISIBLE, 33 | BECOMING_INVISIBLE 34 | } 35 | 36 | class _MyHomePageState extends State with TickerProviderStateMixin { 37 | int _counter = 0; 38 | double _sparklesAngle = 0.0; 39 | ScoreWidgetStatus _scoreWidgetStatus = ScoreWidgetStatus.HIDDEN; 40 | final duration = new Duration(milliseconds: 400); 41 | final oneSecond = new Duration(seconds: 1); 42 | Random random; 43 | Timer holdTimer, scoreOutETA; 44 | AnimationController scoreInAnimationController, scoreOutAnimationController, 45 | scoreSizeAnimationController, sparklesAnimationController; 46 | Animation scoreOutPositionAnimation, sparklesAnimation; 47 | 48 | initState() { 49 | super.initState(); 50 | random = new Random(); 51 | scoreInAnimationController = new AnimationController(duration: new Duration(milliseconds: 150), vsync: this); 52 | scoreInAnimationController.addListener((){ 53 | setState(() {}); // Calls render function 54 | }); 55 | 56 | scoreOutAnimationController = new AnimationController(vsync: this, duration: duration); 57 | scoreOutPositionAnimation = new Tween(begin: 100.0, end: 150.0).animate( 58 | new CurvedAnimation(parent: scoreOutAnimationController, curve: Curves.easeOut) 59 | ); 60 | scoreOutPositionAnimation.addListener((){ 61 | setState(() {}); 62 | }); 63 | scoreOutAnimationController.addStatusListener((status) { 64 | if (status == AnimationStatus.completed) { 65 | _scoreWidgetStatus = ScoreWidgetStatus.HIDDEN; 66 | } 67 | }); 68 | 69 | scoreSizeAnimationController = new AnimationController(vsync: this, duration: new Duration(milliseconds: 150)); 70 | scoreSizeAnimationController.addStatusListener((status) { 71 | if(status == AnimationStatus.completed) { 72 | scoreSizeAnimationController.reverse(); 73 | } 74 | }); 75 | scoreSizeAnimationController.addListener((){ 76 | setState(() {}); 77 | }); 78 | 79 | sparklesAnimationController = new AnimationController(vsync: this, duration: duration); 80 | sparklesAnimation = new CurvedAnimation(parent: sparklesAnimationController, curve: Curves.easeIn); 81 | sparklesAnimation.addListener((){ 82 | setState(() { }); 83 | }); 84 | } 85 | 86 | dispose() { 87 | super.dispose(); 88 | scoreInAnimationController.dispose(); 89 | scoreOutAnimationController.dispose(); 90 | } 91 | 92 | void increment(Timer t) { 93 | scoreSizeAnimationController.forward(from: 0.0); 94 | sparklesAnimationController.forward(from: 0.0); 95 | setState(() { 96 | _counter++; 97 | _sparklesAngle = random.nextDouble() * (2*pi); 98 | }); 99 | } 100 | 101 | void onTapDown(TapDownDetails tap) { 102 | // User pressed the button. This can be a tap or a hold. 103 | if (scoreOutETA != null) { 104 | scoreOutETA.cancel(); // We do not want the score to vanish! 105 | } 106 | if(_scoreWidgetStatus == ScoreWidgetStatus.BECOMING_INVISIBLE) { 107 | // We tapped down while the widget was flying up. Need to cancel that animation. 108 | scoreOutAnimationController.stop(canceled: true); 109 | _scoreWidgetStatus = ScoreWidgetStatus.VISIBLE; 110 | } 111 | else if (_scoreWidgetStatus == ScoreWidgetStatus.HIDDEN ) { 112 | _scoreWidgetStatus = ScoreWidgetStatus.BECOMING_VISIBLE; 113 | scoreInAnimationController.forward(from: 0.0); 114 | } 115 | increment(null); // Take care of tap 116 | holdTimer = new Timer.periodic(duration, increment); // Takes care of hold 117 | } 118 | 119 | void onTapUp(TapUpDetails tap) { 120 | // User removed his finger from button. 121 | scoreOutETA = new Timer(oneSecond, () { 122 | scoreOutAnimationController.forward(from: 0.0); 123 | _scoreWidgetStatus = ScoreWidgetStatus.BECOMING_INVISIBLE; 124 | }); 125 | holdTimer.cancel(); 126 | } 127 | 128 | Widget getScoreButton() { 129 | var scorePosition = 0.0; 130 | var scoreOpacity = 0.0; 131 | var extraSize = 0.0; 132 | switch(_scoreWidgetStatus) { 133 | case ScoreWidgetStatus.HIDDEN: 134 | break; 135 | case ScoreWidgetStatus.BECOMING_VISIBLE : 136 | case ScoreWidgetStatus.VISIBLE: 137 | scorePosition = scoreInAnimationController.value * 100; 138 | scoreOpacity = scoreInAnimationController.value; 139 | extraSize = scoreSizeAnimationController.value * 3; 140 | break; 141 | case ScoreWidgetStatus.BECOMING_INVISIBLE: 142 | scorePosition = scoreOutPositionAnimation.value; 143 | scoreOpacity = 1.0 - scoreOutAnimationController.value; 144 | } 145 | 146 | var stackChildren = [ 147 | ]; 148 | 149 | var firstAngle = _sparklesAngle; 150 | var sparkleRadius = (sparklesAnimationController.value * 50) ; 151 | var sparklesOpacity = (1 - sparklesAnimation.value); 152 | 153 | for(int i = 0;i < 5; ++i) { 154 | var currentAngle = (firstAngle + ((2*pi)/5)*(i)); 155 | var sparklesWidget = 156 | new Positioned(child: new Transform.rotate( 157 | angle: currentAngle - pi/2, 158 | child: new Opacity(opacity: sparklesOpacity, 159 | child : new Image.asset("images/sparkles.png", width: 14.0, height: 14.0, )) 160 | ), 161 | left:(sparkleRadius*cos(currentAngle)) + 20, 162 | top: (sparkleRadius* sin(currentAngle)) + 20 , 163 | ); 164 | stackChildren.add(sparklesWidget); 165 | } 166 | 167 | stackChildren.add(new Opacity(opacity: scoreOpacity, child: new Container( 168 | height: 50.0 + extraSize, 169 | width: 50.0 + extraSize, 170 | decoration: new ShapeDecoration( 171 | shape: new CircleBorder( 172 | side: BorderSide.none 173 | ), 174 | color: Colors.pink, 175 | ), 176 | child: new Center(child: 177 | new Text("+" + _counter.toString(), 178 | style: new TextStyle(color: Colors.white, 179 | fontWeight: FontWeight.bold, 180 | fontSize: 15.0),)) 181 | ))); 182 | 183 | 184 | var widget = new Positioned( 185 | child: new Stack( 186 | alignment: FractionalOffset.center, 187 | overflow: Overflow.visible, 188 | children: stackChildren, 189 | ) 190 | , 191 | bottom: scorePosition 192 | ); 193 | return widget; 194 | } 195 | 196 | Widget getClapButton() { 197 | // Using custom gesture detector because we want to keep increasing the claps 198 | // when user holds the button. 199 | 200 | var extraSize = 0.0; 201 | if (_scoreWidgetStatus == ScoreWidgetStatus.VISIBLE || _scoreWidgetStatus == ScoreWidgetStatus.BECOMING_VISIBLE) { 202 | extraSize = scoreSizeAnimationController.value * 3; 203 | } 204 | return new GestureDetector( 205 | onTapUp: onTapUp, 206 | onTapDown: onTapDown, 207 | child: new Container( 208 | height: 60.0 + extraSize , 209 | width: 60.0 + extraSize, 210 | padding: new EdgeInsets.all(10.0), 211 | decoration: new BoxDecoration( 212 | border: new Border.all(color: Colors.pink, width: 1.0), 213 | borderRadius: new BorderRadius.circular(50.0), 214 | color: Colors.white, 215 | boxShadow: [ 216 | new BoxShadow(color: Colors.pink, blurRadius: 8.0) 217 | ] 218 | ), 219 | child: new ImageIcon( 220 | new AssetImage("images/clap.png"), color: Colors.pink, 221 | size: 40.0), 222 | ) 223 | ); 224 | } 225 | 226 | @override 227 | Widget build(BuildContext context) { 228 | return new Scaffold( 229 | appBar: new AppBar( 230 | title: new Text(widget.title), 231 | ), 232 | body: new Center( 233 | child: new Column( 234 | mainAxisAlignment: MainAxisAlignment.center, 235 | children: [ 236 | new Text( 237 | 'You have pushed the button this many times:', 238 | ), 239 | new Text( 240 | '$_counter', 241 | style: Theme 242 | .of(context) 243 | .textTheme 244 | .display1, 245 | ), 246 | ], 247 | ), 248 | ), 249 | floatingActionButton: new Padding( 250 | padding: new EdgeInsets.only(right: 20.0), 251 | child: new Stack( 252 | alignment: FractionalOffset.center, 253 | overflow: Overflow.visible, 254 | children: [ 255 | getScoreButton(), 256 | getClapButton(), 257 | ], 258 | ) 259 | ), 260 | ); 261 | } 262 | } -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://www.dartlang.org/tools/pub/glossary#lockfile 3 | packages: 4 | analyzer: 5 | dependency: transitive 6 | description: 7 | name: analyzer 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "0.31.1" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.4.2" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.0.6" 25 | barback: 26 | dependency: transitive 27 | description: 28 | name: barback 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "0.15.2+15" 32 | boolean_selector: 33 | dependency: transitive 34 | description: 35 | name: boolean_selector 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.0.3" 39 | charcode: 40 | dependency: transitive 41 | description: 42 | name: charcode 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.1.1" 46 | cli_util: 47 | dependency: transitive 48 | description: 49 | name: cli_util 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "0.1.2+1" 53 | collection: 54 | dependency: transitive 55 | description: 56 | name: collection 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.14.6" 60 | convert: 61 | dependency: transitive 62 | description: 63 | name: convert 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "2.0.1" 67 | crypto: 68 | dependency: transitive 69 | description: 70 | name: crypto 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "2.0.2+1" 74 | csslib: 75 | dependency: transitive 76 | description: 77 | name: csslib 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "0.14.1" 81 | cupertino_icons: 82 | dependency: "direct main" 83 | description: 84 | name: cupertino_icons 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "0.1.2" 88 | flutter: 89 | dependency: "direct main" 90 | description: flutter 91 | source: sdk 92 | version: "0.0.0" 93 | flutter_test: 94 | dependency: "direct dev" 95 | description: flutter 96 | source: sdk 97 | version: "0.0.0" 98 | front_end: 99 | dependency: transitive 100 | description: 101 | name: front_end 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "0.1.0-alpha.9" 105 | glob: 106 | dependency: transitive 107 | description: 108 | name: glob 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "1.1.5" 112 | html: 113 | dependency: transitive 114 | description: 115 | name: html 116 | url: "https://pub.dartlang.org" 117 | source: hosted 118 | version: "0.13.3" 119 | http: 120 | dependency: transitive 121 | description: 122 | name: http 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "0.11.3+16" 126 | http_multi_server: 127 | dependency: transitive 128 | description: 129 | name: http_multi_server 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "2.0.4" 133 | http_parser: 134 | dependency: transitive 135 | description: 136 | name: http_parser 137 | url: "https://pub.dartlang.org" 138 | source: hosted 139 | version: "3.1.1" 140 | io: 141 | dependency: transitive 142 | description: 143 | name: io 144 | url: "https://pub.dartlang.org" 145 | source: hosted 146 | version: "0.3.2+1" 147 | isolate: 148 | dependency: transitive 149 | description: 150 | name: isolate 151 | url: "https://pub.dartlang.org" 152 | source: hosted 153 | version: "1.1.0" 154 | js: 155 | dependency: transitive 156 | description: 157 | name: js 158 | url: "https://pub.dartlang.org" 159 | source: hosted 160 | version: "0.6.1" 161 | kernel: 162 | dependency: transitive 163 | description: 164 | name: kernel 165 | url: "https://pub.dartlang.org" 166 | source: hosted 167 | version: "0.3.0-alpha.9" 168 | logging: 169 | dependency: transitive 170 | description: 171 | name: logging 172 | url: "https://pub.dartlang.org" 173 | source: hosted 174 | version: "0.11.3+1" 175 | matcher: 176 | dependency: transitive 177 | description: 178 | name: matcher 179 | url: "https://pub.dartlang.org" 180 | source: hosted 181 | version: "0.12.1+4" 182 | meta: 183 | dependency: transitive 184 | description: 185 | name: meta 186 | url: "https://pub.dartlang.org" 187 | source: hosted 188 | version: "1.1.2" 189 | mime: 190 | dependency: transitive 191 | description: 192 | name: mime 193 | url: "https://pub.dartlang.org" 194 | source: hosted 195 | version: "0.9.6" 196 | multi_server_socket: 197 | dependency: transitive 198 | description: 199 | name: multi_server_socket 200 | url: "https://pub.dartlang.org" 201 | source: hosted 202 | version: "1.0.1" 203 | node_preamble: 204 | dependency: transitive 205 | description: 206 | name: node_preamble 207 | url: "https://pub.dartlang.org" 208 | source: hosted 209 | version: "1.4.0" 210 | package_config: 211 | dependency: transitive 212 | description: 213 | name: package_config 214 | url: "https://pub.dartlang.org" 215 | source: hosted 216 | version: "1.0.3" 217 | package_resolver: 218 | dependency: transitive 219 | description: 220 | name: package_resolver 221 | url: "https://pub.dartlang.org" 222 | source: hosted 223 | version: "1.0.2" 224 | path: 225 | dependency: transitive 226 | description: 227 | name: path 228 | url: "https://pub.dartlang.org" 229 | source: hosted 230 | version: "1.5.1" 231 | plugin: 232 | dependency: transitive 233 | description: 234 | name: plugin 235 | url: "https://pub.dartlang.org" 236 | source: hosted 237 | version: "0.2.0+2" 238 | pool: 239 | dependency: transitive 240 | description: 241 | name: pool 242 | url: "https://pub.dartlang.org" 243 | source: hosted 244 | version: "1.3.4" 245 | pub_semver: 246 | dependency: transitive 247 | description: 248 | name: pub_semver 249 | url: "https://pub.dartlang.org" 250 | source: hosted 251 | version: "1.3.6" 252 | quiver: 253 | dependency: transitive 254 | description: 255 | name: quiver 256 | url: "https://pub.dartlang.org" 257 | source: hosted 258 | version: "0.29.0+1" 259 | shelf: 260 | dependency: transitive 261 | description: 262 | name: shelf 263 | url: "https://pub.dartlang.org" 264 | source: hosted 265 | version: "0.7.2" 266 | shelf_packages_handler: 267 | dependency: transitive 268 | description: 269 | name: shelf_packages_handler 270 | url: "https://pub.dartlang.org" 271 | source: hosted 272 | version: "1.0.3" 273 | shelf_static: 274 | dependency: transitive 275 | description: 276 | name: shelf_static 277 | url: "https://pub.dartlang.org" 278 | source: hosted 279 | version: "0.2.7" 280 | shelf_web_socket: 281 | dependency: transitive 282 | description: 283 | name: shelf_web_socket 284 | url: "https://pub.dartlang.org" 285 | source: hosted 286 | version: "0.2.2" 287 | sky_engine: 288 | dependency: transitive 289 | description: flutter 290 | source: sdk 291 | version: "0.0.99" 292 | source_map_stack_trace: 293 | dependency: transitive 294 | description: 295 | name: source_map_stack_trace 296 | url: "https://pub.dartlang.org" 297 | source: hosted 298 | version: "1.1.4" 299 | source_maps: 300 | dependency: transitive 301 | description: 302 | name: source_maps 303 | url: "https://pub.dartlang.org" 304 | source: hosted 305 | version: "0.10.4" 306 | source_span: 307 | dependency: transitive 308 | description: 309 | name: source_span 310 | url: "https://pub.dartlang.org" 311 | source: hosted 312 | version: "1.4.0" 313 | stack_trace: 314 | dependency: transitive 315 | description: 316 | name: stack_trace 317 | url: "https://pub.dartlang.org" 318 | source: hosted 319 | version: "1.9.2" 320 | stream_channel: 321 | dependency: transitive 322 | description: 323 | name: stream_channel 324 | url: "https://pub.dartlang.org" 325 | source: hosted 326 | version: "1.6.4" 327 | string_scanner: 328 | dependency: transitive 329 | description: 330 | name: string_scanner 331 | url: "https://pub.dartlang.org" 332 | source: hosted 333 | version: "1.0.2" 334 | term_glyph: 335 | dependency: transitive 336 | description: 337 | name: term_glyph 338 | url: "https://pub.dartlang.org" 339 | source: hosted 340 | version: "1.0.0" 341 | test: 342 | dependency: transitive 343 | description: 344 | name: test 345 | url: "https://pub.dartlang.org" 346 | source: hosted 347 | version: "0.12.34" 348 | typed_data: 349 | dependency: transitive 350 | description: 351 | name: typed_data 352 | url: "https://pub.dartlang.org" 353 | source: hosted 354 | version: "1.1.5" 355 | utf: 356 | dependency: transitive 357 | description: 358 | name: utf 359 | url: "https://pub.dartlang.org" 360 | source: hosted 361 | version: "0.9.0+4" 362 | vector_math: 363 | dependency: transitive 364 | description: 365 | name: vector_math 366 | url: "https://pub.dartlang.org" 367 | source: hosted 368 | version: "2.0.6" 369 | watcher: 370 | dependency: transitive 371 | description: 372 | name: watcher 373 | url: "https://pub.dartlang.org" 374 | source: hosted 375 | version: "0.9.7+7" 376 | web_socket_channel: 377 | dependency: transitive 378 | description: 379 | name: web_socket_channel 380 | url: "https://pub.dartlang.org" 381 | source: hosted 382 | version: "1.0.7" 383 | yaml: 384 | dependency: transitive 385 | description: 386 | name: yaml 387 | url: "https://pub.dartlang.org" 388 | source: hosted 389 | version: "2.1.13" 390 | sdks: 391 | dart: ">=2.0.0-dev.28.0 <=2.0.0-edge.3c4dccbd46f152be9e1b6ca95c57357e8e48057c" 392 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: medium_clap 2 | description: A new Flutter application. 3 | 4 | dependencies: 5 | flutter: 6 | sdk: flutter 7 | 8 | 9 | 10 | # The following adds the Cupertino Icons font to your application. 11 | # Use with the CupertinoIcons class for iOS style icons. 12 | cupertino_icons: ^0.1.0 13 | 14 | dev_dependencies: 15 | flutter_test: 16 | sdk: flutter 17 | 18 | 19 | # For information on the generic Dart part of this file, see the 20 | # following page: https://www.dartlang.org/tools/pub/pubspec 21 | 22 | # The following section is specific to Flutter. 23 | flutter: 24 | 25 | # The following line ensures that the Material Icons font is 26 | # included with your application, so that you can use the icons in 27 | # the material Icons class. 28 | uses-material-design: true 29 | 30 | # To add assets to your application, add an assets section, like this: 31 | assets: 32 | - images/clap.png 33 | - images/sparkles.png 34 | 35 | # An image asset can refer to one or more resolution-specific "variants", see 36 | # https://flutter.io/assets-and-images/#resolution-aware. 37 | 38 | # For details regarding adding assets from package dependencies, see 39 | # https://flutter.io/assets-and-images/#from-packages 40 | 41 | # To add custom fonts to your application, add a fonts section here, 42 | # in this "flutter" section. Each entry in this list should have a 43 | # "family" key with the font family name, and a "fonts" key with a 44 | # list giving the asset and other descriptors for the font. For 45 | # example: 46 | # fonts: 47 | # - family: Schyler 48 | # fonts: 49 | # - asset: fonts/Schyler-Regular.ttf 50 | # - asset: fonts/Schyler-Italic.ttf 51 | # style: italic 52 | # - family: Trajan Pro 53 | # fonts: 54 | # - asset: fonts/TrajanPro.ttf 55 | # - asset: fonts/TrajanPro_Bold.ttf 56 | # weight: 700 57 | # 58 | # For details regarding fonts from package dependencies, 59 | # see https://flutter.io/custom-fonts/#from-packages 60 | -------------------------------------------------------------------------------- /MediumClapAnimation/medium_clap/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter 3 | // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to 4 | // find child widgets in the widget tree, read text, and verify that the values of widget properties 5 | // are correct. 6 | 7 | import 'package:flutter/material.dart'; 8 | import 'package:flutter_test/flutter_test.dart'; 9 | 10 | import 'package:medium_clap/main.dart'; 11 | 12 | void main() { 13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 14 | // Build our app and trigger a frame. 15 | await tester.pumpWidget(new MyApp()); 16 | 17 | // Verify that our counter starts at 0. 18 | expect(find.text('0'), findsOneWidget); 19 | expect(find.text('1'), findsNothing); 20 | 21 | // Tap the '+' icon and trigger a frame. 22 | await tester.tap(find.byIcon(Icons.add)); 23 | await tester.pump(); 24 | 25 | // Verify that our counter has incremented. 26 | expect(find.text('0'), findsNothing); 27 | expect(find.text('1'), findsOneWidget); 28 | }); 29 | } 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FlutterUI 2 | 3 | Just some small, teeny, tiny collection of UI made using flutter. <3 4 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.lock 4 | *.log 5 | *.pyc 6 | *.swp 7 | .DS_Store 8 | .atom/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # Visual Studio Code related 20 | .vscode/ 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | .dart_tool/ 25 | .flutter-plugins 26 | .packages 27 | .pub-cache/ 28 | .pub/ 29 | build/ 30 | 31 | # Android related 32 | **/android/**/gradle-wrapper.jar 33 | **/android/.gradle 34 | **/android/captures/ 35 | **/android/gradlew 36 | **/android/gradlew.bat 37 | **/android/local.properties 38 | **/android/**/GeneratedPluginRegistrant.java 39 | 40 | # iOS/XCode related 41 | **/ios/**/*.mode1v3 42 | **/ios/**/*.mode2v3 43 | **/ios/**/*.moved-aside 44 | **/ios/**/*.pbxuser 45 | **/ios/**/*.perspectivev3 46 | **/ios/**/*sync/ 47 | **/ios/**/.sconsign.dblite 48 | **/ios/**/.tags* 49 | **/ios/**/.vagrant/ 50 | **/ios/**/DerivedData/ 51 | **/ios/**/Icon? 52 | **/ios/**/Pods/ 53 | **/ios/**/.symlinks/ 54 | **/ios/**/profile 55 | **/ios/**/xcuserdata 56 | **/ios/.generated/ 57 | **/ios/Flutter/App.framework 58 | **/ios/Flutter/Flutter.framework 59 | **/ios/Flutter/Generated.xcconfig 60 | **/ios/Flutter/app.flx 61 | **/ios/Flutter/app.zip 62 | **/ios/Flutter/flutter_assets/ 63 | **/ios/ServiceDefinitions.json 64 | **/ios/Runner/GeneratedPluginRegistrant.* 65 | 66 | # Exceptions to above rules. 67 | !**/ios/**/default.mode1v3 68 | !**/ios/**/default.mode2v3 69 | !**/ios/**/default.pbxuser 70 | !**/ios/**/default.perspectivev3 71 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 72 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/.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: 5391447fae6209bb21a89e6a5a6583cac1af9b4b 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/README.md: -------------------------------------------------------------------------------- 1 | # Youtube Bottom Sheet 2 | 3 | Implementaion of **Youtube** sliding down video player using flutter's **Staggered Animations**. 4 | 5 | ![Image](https://media.giphy.com/media/9P5cmY0ZmweQzFjAzr/giphy.gif) 6 | 7 | ## Getting Started 8 | 9 | This project is a starting point for a Flutter application. 10 | 11 | A few resources to get you started if this is your first Flutter project: 12 | 13 | - [Lab: Write your first Flutter app](https://flutter.io/docs/get-started/codelab) 14 | - [Cookbook: Useful Flutter samples](https://flutter.io/docs/cookbook) 15 | 16 | For help getting started with Flutter, view our 17 | [online documentation](https://flutter.io/docs), which offers tutorials, 18 | samples, guidance on mobile development, and a full API reference. 19 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 27 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | compileOptions { 35 | sourceCompatibility JavaVersion.VERSION_1_8 36 | targetCompatibility JavaVersion.VERSION_1_8 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "com.example.youtubebottomsheet" 42 | minSdkVersion 16 43 | targetSdkVersion 27 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 47 | } 48 | 49 | buildTypes { 50 | release { 51 | // TODO: Add your own signing config for the release build. 52 | // Signing with the debug keys for now, so `flutter run --release` works. 53 | signingConfig signingConfigs.debug 54 | } 55 | } 56 | } 57 | 58 | flutter { 59 | source '../..' 60 | } 61 | 62 | dependencies { 63 | testImplementation 'junit:junit:4.12' 64 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 65 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 66 | } 67 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 15 | 19 | 26 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/android/app/src/main/java/com/example/youtubebottomsheet/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.youtubebottomsheet; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/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 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/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 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/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 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik1607/FlutterUI/8490d9527630f9f4e0754fb491e0322ff08ace9f/youtube_bottom_sheet/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /youtube_bottom_sheet/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. -------------------------------------------------------------------------------- /youtube_bottom_sheet/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 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/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 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | youtube_bottom_sheet 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/lib/MainPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MainPage extends StatefulWidget { 4 | final AnimationController videoMinimizeAnimationController; 5 | MainPage({this.videoMinimizeAnimationController}); 6 | 7 | @override 8 | State createState() { 9 | return MainPageState(); 10 | } 11 | } 12 | 13 | class MainPageState extends State { 14 | int _bottomNavigationIndex = 0; 15 | Tween bottomNavigationBarTween; 16 | 17 | @override 18 | void initState() { 19 | super.initState(); 20 | if (widget.videoMinimizeAnimationController != null) { 21 | widget.videoMinimizeAnimationController.addListener(() { 22 | setState(() {}); 23 | }); 24 | bottomNavigationBarTween = Tween(begin: 56.0, end: 0.0); 25 | } 26 | } 27 | 28 | Widget _bottomNavBar() { 29 | return BottomNavigationBar( 30 | onTap: (idx) { 31 | setState(() { 32 | _bottomNavigationIndex = idx; 33 | }); 34 | }, 35 | currentIndex: _bottomNavigationIndex, 36 | type: BottomNavigationBarType.fixed, 37 | items: [ 38 | BottomNavigationBarItem(icon: Icon(Icons.home), title: Text('Home')), 39 | BottomNavigationBarItem( 40 | icon: Icon(Icons.whatshot), title: Text('Trending')), 41 | BottomNavigationBarItem( 42 | icon: Icon(Icons.subscriptions), title: Text('Subscriptions')), 43 | BottomNavigationBarItem( 44 | icon: Icon(Icons.folder), title: Text('Library')) 45 | ], 46 | ); 47 | } 48 | 49 | @override 50 | Widget build(BuildContext context) { 51 | final bottomHeight = bottomNavigationBarTween != null 52 | ? bottomNavigationBarTween 53 | .evaluate(widget.videoMinimizeAnimationController) 54 | : 0.0; 55 | return Scaffold( 56 | bottomNavigationBar: Transform.translate( 57 | offset: Offset(0.0, bottomHeight), child: _bottomNavBar()), 58 | body: CustomScrollView( 59 | slivers: [ 60 | SliverAppBar( 61 | title: Text("YouTube"), 62 | forceElevated: true, 63 | floating: true, 64 | actions: [ 65 | IconButton( 66 | icon: Icon(Icons.videocam), 67 | onPressed: () {}, 68 | ), 69 | IconButton( 70 | icon: Icon(Icons.search), 71 | onPressed: () {}, 72 | ), 73 | IconButton( 74 | icon: Icon(Icons.account_circle), 75 | onPressed: () {}, 76 | ), 77 | ], 78 | ), 79 | SliverList( 80 | delegate: SliverChildListDelegate([ 81 | Container( 82 | color: Colors.orange, 83 | child: SizedBox( 84 | height: 150, 85 | ), 86 | ), 87 | Container( 88 | color: Colors.green, 89 | child: SizedBox( 90 | height: 150, 91 | ), 92 | ), 93 | Container( 94 | color: Colors.blue, 95 | child: SizedBox( 96 | height: 150, 97 | ), 98 | ), 99 | Container( 100 | color: Colors.amber, 101 | child: SizedBox( 102 | height: 150, 103 | ), 104 | ), 105 | Container( 106 | color: Colors.purple, 107 | child: SizedBox( 108 | height: 150, 109 | ), 110 | ), 111 | ])) 112 | ], 113 | )); 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/lib/VideoPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:video_player/video_player.dart'; 3 | 4 | class VideoPage extends StatefulWidget { 5 | final AnimationController videoMinimizeAnimationController; 6 | VideoPage({this.videoMinimizeAnimationController}); 7 | 8 | @override 9 | State createState() { 10 | return VideoPageState(); 11 | } 12 | } 13 | 14 | class VideoPageState extends State with TickerProviderStateMixin { 15 | VideoPlayerController _videoPlayerController; 16 | AnimationController _animationController; 17 | Animation _totalHeightAnimation; 18 | Animation _videoHeightAnimation; 19 | Animation _videoWidthAnimation; 20 | Animation _closeButtonWidthAnimation; 21 | Animation _pauseButtonWidthAnimation; 22 | Animation _videoTitleWidthAnimation; 23 | Animation _paddingAnimation; 24 | bool _isPlaying = false; 25 | double _amountDragged; 26 | 27 | @override 28 | void initState() { 29 | super.initState(); 30 | _videoPlayerController = VideoPlayerController.network( 31 | 'https://www.sample-videos.com/video123/mp4/720/big_buck_bunny_720p_30mb.mp4', 32 | ) 33 | ..addListener(() { 34 | final bool isPlaying = _videoPlayerController.value.isPlaying; 35 | if (isPlaying != _isPlaying) { 36 | setState(() { 37 | _isPlaying = isPlaying; 38 | }); 39 | } 40 | }) 41 | ..initialize().then((_) { 42 | // Ensure the first frame is shown after the video is initialized, even before the play button has been pressed. 43 | setState(() {}); 44 | }); 45 | _amountDragged = 0; 46 | _animationController = widget.videoMinimizeAnimationController ?? 47 | AnimationController( 48 | vsync: this, duration: const Duration(milliseconds: 700)); 49 | _animationController.addStatusListener((status) { 50 | print(status); 51 | switch (status) { 52 | case AnimationStatus.completed: 53 | if (_animationController.value == 1) { 54 | _amountDragged = MediaQuery.of(context).size.height; 55 | } 56 | break; 57 | case AnimationStatus.dismissed: 58 | if (_animationController.value == 0) { 59 | _amountDragged = 0; 60 | } 61 | break; 62 | default: 63 | break; 64 | } 65 | }); 66 | } 67 | 68 | @override 69 | void didChangeDependencies() { 70 | super.didChangeDependencies(); 71 | double maxHeight = MediaQuery.of(context).size.height; 72 | double minHeight = 50.0; 73 | _totalHeightAnimation = Tween(begin: maxHeight, end: minHeight).animate( 74 | CurvedAnimation( 75 | parent: _animationController, 76 | curve: Interval(0.0, 1.0, curve: Curves.fastOutSlowIn))); 77 | 78 | double initialVideoWidth = MediaQuery.of(context).size.width; 79 | double initialVideoHeight = initialVideoWidth * 9.0 / 16.0; 80 | _videoHeightAnimation = Tween(begin: initialVideoHeight, end: minHeight) 81 | .animate(CurvedAnimation( 82 | parent: _animationController, 83 | curve: Interval(0.0, 1.0, curve: Curves.fastOutSlowIn))); 84 | 85 | double finalVideoWidth = 150.0; 86 | _videoWidthAnimation = Tween(begin: initialVideoWidth, end: finalVideoWidth) 87 | .animate(CurvedAnimation( 88 | parent: _animationController, 89 | curve: Interval(0.65, 1.0, curve: Curves.easeIn))); 90 | 91 | _videoTitleWidthAnimation = Tween(begin: 0.0, end: 100.0).animate( 92 | CurvedAnimation( 93 | parent: _animationController, curve: Interval(0.9, 1.0))); 94 | 95 | _closeButtonWidthAnimation = Tween(begin: 0.0, end: 50.0).animate( 96 | CurvedAnimation( 97 | parent: _animationController, curve: Interval(0.7, 0.8))); 98 | 99 | _pauseButtonWidthAnimation = Tween(begin: 0.0, end: 50.0).animate( 100 | CurvedAnimation( 101 | parent: _animationController, curve: Interval(0.8, 0.9))); 102 | 103 | _paddingAnimation = 104 | new Tween(begin: 0.0, end: 8.0).animate(_animationController); 105 | } 106 | 107 | Widget _fullScreenPage(BuildContext context, Widget child) { 108 | return Padding( 109 | padding: EdgeInsets.all(_paddingAnimation.value), 110 | child: Align( 111 | alignment: Alignment.bottomCenter, 112 | child: Card( 113 | elevation: 10.0, 114 | margin: EdgeInsets.all(0.0), 115 | child: SizedBox( 116 | height: _totalHeightAnimation.value, 117 | child: Scaffold( 118 | body: Column( 119 | children: [ 120 | GestureDetector( 121 | onVerticalDragUpdate: (drag) { 122 | print(_amountDragged); 123 | double _maxHeight = MediaQuery.of(context).size.height; 124 | _amountDragged += drag.delta.dy; 125 | if (_amountDragged > _maxHeight) 126 | _amountDragged = _maxHeight; 127 | else if (_amountDragged < 0) _amountDragged = 0; 128 | double animationValue = _amountDragged / _maxHeight; 129 | _animationController.value = animationValue; 130 | }, 131 | onVerticalDragEnd: (drag) { 132 | double flingDy = drag.velocity.pixelsPerSecond.dy; 133 | if (flingDy > 0) { 134 | _animationController.forward(); 135 | } else if (flingDy < 0) { 136 | _animationController.reverse(); 137 | } else { 138 | double _maxHeight = MediaQuery.of(context).size.height; 139 | if (_amountDragged > _maxHeight / 2) _animationController.forward(); 140 | else _animationController.reverse(); 141 | } 142 | }, 143 | child: Container( 144 | color: Colors.black54, 145 | child: Row( 146 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 147 | children: [ 148 | SizedBox( 149 | height: _videoHeightAnimation.value, 150 | width: _videoWidthAnimation.value - 151 | 2 * _paddingAnimation.value, 152 | child: VideoPlayer(_videoPlayerController)), 153 | ClipRect( 154 | child: SizedBox( 155 | width: _videoTitleWidthAnimation.value, 156 | height: _videoHeightAnimation.value, 157 | child: Center( 158 | child: Text( 159 | "Sample Video Title", 160 | overflow: TextOverflow.ellipsis, 161 | textAlign: TextAlign.start, 162 | maxLines: 1, 163 | style: TextStyle( 164 | color: Colors.white, 165 | ), 166 | ), 167 | ), 168 | ), 169 | ), 170 | ClipRect( 171 | child: SizedBox( 172 | width: _pauseButtonWidthAnimation.value, 173 | height: _videoHeightAnimation.value, 174 | child: IconButton( 175 | icon: Icon( 176 | Icons.play_arrow, 177 | color: Colors.grey, 178 | ), 179 | onPressed: () {}, 180 | ), 181 | ), 182 | ), 183 | ClipRect( 184 | child: SizedBox( 185 | width: _closeButtonWidthAnimation.value, 186 | height: _videoHeightAnimation.value, 187 | child: IconButton( 188 | icon: Icon(Icons.close, color: Colors.grey), 189 | onPressed: () {}, 190 | ), 191 | ), 192 | ) 193 | ], 194 | ), 195 | ), 196 | ), 197 | Expanded( 198 | child: Opacity( 199 | opacity: 1 - _animationController.value, child: child), 200 | ) 201 | ], 202 | ), 203 | ), 204 | ), 205 | ), 206 | ), 207 | ); 208 | } 209 | 210 | @override 211 | Widget build(BuildContext context) { 212 | final playerWidth = MediaQuery.of(context).size.width; 213 | final playerHeight = playerWidth * 9.0 / 16.0; 214 | return AnimatedBuilder( 215 | animation: _animationController, 216 | builder: _fullScreenPage, 217 | child: SingleChildScrollView( 218 | scrollDirection: Axis.vertical, 219 | child: Column( 220 | children: [ 221 | Container( 222 | width: playerWidth, height: playerHeight, color: Colors.green), 223 | Container( 224 | width: playerWidth, height: playerHeight, color: Colors.blue), 225 | Container( 226 | width: playerWidth, height: playerHeight, color: Colors.amber), 227 | Container( 228 | width: playerWidth, height: playerHeight, color: Colors.red) 229 | ], 230 | ), 231 | ), 232 | ); 233 | } 234 | } 235 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:youtube_bottom_sheet/MainPage.dart'; 3 | import 'package:youtube_bottom_sheet/VideoPage.dart'; 4 | 5 | void main() => runApp(MyApp()); 6 | 7 | class MyApp extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | return MaterialApp( 11 | title: 'Flutter Demo', 12 | theme: ThemeData( 13 | primarySwatch: Colors.red, 14 | ), 15 | home: Youtube()); 16 | } 17 | } 18 | 19 | class Youtube extends StatefulWidget { 20 | @override 21 | State createState() { 22 | return YoutubeState(); 23 | } 24 | } 25 | 26 | class YoutubeState extends State with TickerProviderStateMixin { 27 | AnimationController _videoMinimizeAnimationController; 28 | Tween paddingTween; 29 | 30 | @override 31 | void initState() { 32 | super.initState(); 33 | _videoMinimizeAnimationController = AnimationController( 34 | vsync: this, duration: const Duration(milliseconds: 700)); 35 | paddingTween = Tween(begin: 0, end: 56.0); 36 | } 37 | 38 | @override 39 | Widget build(BuildContext context) { 40 | return Stack( 41 | children: [ 42 | MainPage( 43 | videoMinimizeAnimationController: _videoMinimizeAnimationController, 44 | ), 45 | AnimatedBuilder( 46 | animation: _videoMinimizeAnimationController, 47 | builder: (BuildContext context, Widget child) { 48 | return Padding( 49 | padding: EdgeInsets.only( 50 | bottom: paddingTween 51 | .evaluate(_videoMinimizeAnimationController)), 52 | child: child); 53 | }, 54 | child: VideoPage( 55 | videoMinimizeAnimationController: 56 | this._videoMinimizeAnimationController, 57 | ), 58 | ) 59 | ], 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: youtube_bottom_sheet 2 | description: A new Flutter application. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # Read more about versioning at semver.org. 10 | version: 1.0.0+1 11 | 12 | environment: 13 | sdk: ">=2.0.0-dev.68.0 <3.0.0" 14 | 15 | dependencies: 16 | flutter: 17 | sdk: flutter 18 | video_player: ^0.8.0 19 | 20 | # The following adds the Cupertino Icons font to your application. 21 | # Use with the CupertinoIcons class for iOS style icons. 22 | cupertino_icons: ^0.1.2 23 | 24 | dev_dependencies: 25 | flutter_test: 26 | sdk: flutter 27 | 28 | 29 | # For information on the generic Dart part of this file, see the 30 | # following page: https://www.dartlang.org/tools/pub/pubspec 31 | 32 | # The following section is specific to Flutter. 33 | flutter: 34 | 35 | # The following line ensures that the Material Icons font is 36 | # included with your application, so that you can use the icons in 37 | # the material Icons class. 38 | uses-material-design: true 39 | 40 | # To add assets to your application, add an assets section, like this: 41 | # assets: 42 | # - images/a_dot_burr.jpeg 43 | # - images/a_dot_ham.jpeg 44 | 45 | # An image asset can refer to one or more resolution-specific "variants", see 46 | # https://flutter.io/assets-and-images/#resolution-aware. 47 | 48 | # For details regarding adding assets from package dependencies, see 49 | # https://flutter.io/assets-and-images/#from-packages 50 | 51 | # To add custom fonts to your application, add a fonts section here, 52 | # in this "flutter" section. Each entry in this list should have a 53 | # "family" key with the font family name, and a "fonts" key with a 54 | # list giving the asset and other descriptors for the font. For 55 | # example: 56 | # fonts: 57 | # - family: Schyler 58 | # fonts: 59 | # - asset: fonts/Schyler-Regular.ttf 60 | # - asset: fonts/Schyler-Italic.ttf 61 | # style: italic 62 | # - family: Trajan Pro 63 | # fonts: 64 | # - asset: fonts/TrajanPro.ttf 65 | # - asset: fonts/TrajanPro_Bold.ttf 66 | # weight: 700 67 | # 68 | # For details regarding fonts from package dependencies, 69 | # see https://flutter.io/custom-fonts/#from-packages 70 | -------------------------------------------------------------------------------- /youtube_bottom_sheet/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:youtube_bottom_sheet/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(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 | --------------------------------------------------------------------------------