├── .gitignore ├── LICENSE ├── README.md ├── android ├── android.iml ├── app │ ├── app.iml │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ ├── com │ │ │ └── example │ │ │ │ └── fluttermovie │ │ │ │ └── MainActivity.java │ │ └── io │ │ │ └── flutter │ │ │ └── plugins │ │ │ └── GeneratedPluginRegistrant.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 ├── flutter_movie_android.iml ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── key.properties ├── local.properties └── settings.gradle ├── flutter_movie.iml ├── ios ├── Flutter │ ├── App.framework │ │ ├── App │ │ └── Info.plist │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ ├── Flutter.framework │ │ ├── Headers │ │ │ ├── Flutter.h │ │ │ ├── FlutterAppDelegate.h │ │ │ ├── FlutterBinaryMessenger.h │ │ │ ├── FlutterCallbackCache.h │ │ │ ├── FlutterChannels.h │ │ │ ├── FlutterCodecs.h │ │ │ ├── FlutterDartProject.h │ │ │ ├── FlutterEngine.h │ │ │ ├── FlutterHeadlessDartRunner.h │ │ │ ├── FlutterMacros.h │ │ │ ├── FlutterPlatformViews.h │ │ │ ├── FlutterPlugin.h │ │ │ ├── FlutterPluginAppLifeCycleDelegate.h │ │ │ ├── FlutterTexture.h │ │ │ └── FlutterViewController.h │ │ ├── Info.plist │ │ ├── Modules │ │ │ └── module.modulemap │ │ └── icudtl.dat │ ├── Generated.xcconfig │ ├── Release.xcconfig │ └── flutter_assets │ │ ├── AssetManifest.json │ │ ├── FontManifest.json │ │ ├── LICENSE │ │ ├── fonts │ │ └── MaterialIcons-Regular.ttf │ │ ├── isolate_snapshot_data │ │ ├── kernel_blob.bin │ │ ├── packages │ │ └── cupertino_icons │ │ │ └── assets │ │ │ └── CupertinoIcons.ttf │ │ └── vm_snapshot_data ├── Podfile ├── Podfile.lock ├── Pods │ ├── Local Podspecs │ │ ├── Flutter.podspec.json │ │ └── shared_preferences.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ ├── project.pbxproj │ │ └── xcuserdata │ │ │ └── maochaolong041.xcuserdatad │ │ │ └── xcschemes │ │ │ ├── Pods-Runner.xcscheme │ │ │ ├── shared_preferences.xcscheme │ │ │ └── xcschememanagement.plist │ └── Target Support Files │ │ ├── Pods-Runner │ │ ├── Pods-Runner-acknowledgements.markdown │ │ ├── Pods-Runner-acknowledgements.plist │ │ ├── Pods-Runner-dummy.m │ │ ├── Pods-Runner-frameworks.sh │ │ ├── Pods-Runner-resources.sh │ │ ├── Pods-Runner.debug.xcconfig │ │ ├── Pods-Runner.profile.xcconfig │ │ └── Pods-Runner.release.xcconfig │ │ └── shared_preferences │ │ ├── shared_preferences-dummy.m │ │ ├── shared_preferences-prefix.pch │ │ └── shared_preferences.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings │ └── xcuserdata │ │ └── maochaolong041.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── 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 │ ├── GeneratedPluginRegistrant.h │ ├── GeneratedPluginRegistrant.m │ ├── Info.plist │ └── main.m └── ServiceDefinitions.json ├── lib ├── api │ └── douban_api.dart ├── blocs │ ├── bloc_provider.dart │ ├── favorite_bloc.dart │ ├── favorite_list_bloc.dart │ ├── home_bloc.dart │ ├── movie_details_bloc.dart │ ├── search_list_bloc.dart │ ├── tab_bloc.dart │ └── works_list_bloc.dart ├── main.dart ├── models │ ├── list_result.dart │ ├── movie.dart │ ├── movie_card.dart │ ├── ranking_list_type.dart │ ├── ranking_result.dart │ ├── video.dart │ └── works_result.dart ├── pages │ ├── favorite_list.dart │ ├── home.dart │ ├── movie_details.dart │ ├── search_list.dart │ └── works_list.dart ├── routes │ ├── router.dart │ └── routes.dart └── widgets │ ├── member_item.dart │ ├── movie_item.dart │ ├── navigation_bar.dart │ ├── search_bar.dart │ ├── sliver_persistent_header_delegate.dart │ └── tab_bar.dart ├── pubspec.lock ├── pubspec.yaml └── test └── widget_test.dart /.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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 jjj2mdd 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # flutter_movie 2 | 3 | [Flutter响应式编程 - RxDart](https://www.jianshu.com/p/00060710a890)示例代码 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.io/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.io/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.io/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /android/android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/app.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /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 | def keystoreProperties = new Properties() 28 | def keystorePropertiesFile = rootProject.file('key.properties') 29 | if (keystorePropertiesFile.exists()) { 30 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 31 | } 32 | 33 | android { 34 | compileSdkVersion 27 35 | 36 | lintOptions { 37 | disable 'InvalidPackage' 38 | } 39 | 40 | defaultConfig { 41 | applicationId "com.mcl.fluttermovie" 42 | minSdkVersion 16 43 | targetSdkVersion 27 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 47 | } 48 | 49 | signingConfigs { 50 | release { 51 | keyAlias keystoreProperties['keyAlias'] 52 | keyPassword keystoreProperties['keyPassword'] 53 | storeFile file(keystoreProperties['storeFile']) 54 | storePassword keystoreProperties['storePassword'] 55 | } 56 | } 57 | 58 | buildTypes { 59 | release { 60 | signingConfig signingConfigs.release 61 | } 62 | } 63 | } 64 | 65 | flutter { 66 | source '../..' 67 | } 68 | 69 | dependencies { 70 | testImplementation 'junit:junit:4.12' 71 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 72 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 73 | } 74 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 15 | 19 | 26 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/example/fluttermovie/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.fluttermovie; 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 | -------------------------------------------------------------------------------- /android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java: -------------------------------------------------------------------------------- 1 | package io.flutter.plugins; 2 | 3 | import io.flutter.plugin.common.PluginRegistry; 4 | import io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin; 5 | 6 | /** 7 | * Generated file. Do not edit. 8 | */ 9 | public final class GeneratedPluginRegistrant { 10 | public static void registerWith(PluginRegistry registry) { 11 | if (alreadyRegisteredWith(registry)) { 12 | return; 13 | } 14 | SharedPreferencesPlugin.registerWith(registry.registrarFor("io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin")); 15 | } 16 | 17 | private static boolean alreadyRegisteredWith(PluginRegistry registry) { 18 | final String key = GeneratedPluginRegistrant.class.getCanonicalName(); 19 | if (registry.hasPlugin(key)) { 20 | return true; 21 | } 22 | registry.registrarFor(key); 23 | return false; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | maven { 5 | url 'http://maven.aliyun.com/nexus/content/groups/public/' 6 | } 7 | } 8 | 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:3.3.0' 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | maven { 18 | url 'http://maven.aliyun.com/nexus/content/groups/public/' 19 | } 20 | } 21 | } 22 | 23 | rootProject.buildDir = '../build' 24 | subprojects { 25 | project.buildDir = "${rootProject.buildDir}/${project.name}" 26 | } 27 | subprojects { 28 | project.evaluationDependsOn(':app') 29 | } 30 | 31 | task clean(type: Delete) { 32 | delete rootProject.buildDir 33 | } 34 | -------------------------------------------------------------------------------- /android/flutter_movie_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/key.properties: -------------------------------------------------------------------------------- 1 | storePassword=QQpa520. 2 | keyPassword=QQpa520. 3 | keyAlias=key 4 | storeFile=/Users/maochaolong041/key.jks 5 | -------------------------------------------------------------------------------- /android/local.properties: -------------------------------------------------------------------------------- 1 | sdk.dir=/Users/maochaolong041/Library/Android/sdk 2 | flutter.sdk=/Users/maochaolong041/local/flutter 3 | flutter.versionName=1.0.6 4 | flutter.versionCode=6 5 | flutter.buildMode=release -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /flutter_movie.iml: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /ios/Flutter/App.framework/App: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Flutter/App.framework/App -------------------------------------------------------------------------------- /ios/Flutter/App.framework/Info.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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Flutter.framework/Headers/Flutter.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef FLUTTER_FLUTTER_H_ 6 | #define FLUTTER_FLUTTER_H_ 7 | 8 | /** 9 | BREAKING CHANGES: 10 | 11 | October 5, 2018: 12 | - Removed FlutterNavigationController.h/.mm 13 | - Changed return signature of `FlutterDartHeadlessCodeRunner.run*` from void 14 | to bool 15 | - Removed HeadlessPlatformViewIOS 16 | - Marked FlutterDartHeadlessCodeRunner deprecated 17 | 18 | August 31, 2018: Marked -[FlutterDartProject 19 | initFromDefaultSourceForConfiguration] and FlutterStandardBigInteger as 20 | unavailable. 21 | 22 | July 26, 2018: Marked -[FlutterDartProject 23 | initFromDefaultSourceForConfiguration] deprecated. 24 | 25 | February 28, 2018: Removed "initWithFLXArchive" and 26 | "initWithFLXArchiveWithScriptSnapshot". 27 | 28 | January 15, 2018: Marked "initWithFLXArchive" and 29 | "initWithFLXArchiveWithScriptSnapshot" as unavailable following the 30 | deprecation from December 11, 2017. Scheduled to be removed on February 31 | 19, 2018. 32 | 33 | January 09, 2018: Deprecated "FlutterStandardBigInteger" and its use in 34 | "FlutterStandardMessageCodec" and "FlutterStandardMethodCodec". Scheduled to 35 | be marked as unavailable once the deprecation has been available on the 36 | flutter/flutter alpha branch for four weeks. "FlutterStandardBigInteger" was 37 | needed because the Dart 1.0 int type had no size limit. With Dart 2.0, the 38 | int type is a fixed-size, 64-bit signed integer. If you need to communicate 39 | larger integers, use NSString encoding instead. 40 | 41 | December 11, 2017: Deprecated "initWithFLXArchive" and 42 | "initWithFLXArchiveWithScriptSnapshot" and scheculed the same to be marked as 43 | unavailable on January 15, 2018. Instead, "initWithFlutterAssets" and 44 | "initWithFlutterAssetsWithScriptSnapshot" should be used. The reason for this 45 | change is that the FLX archive will be deprecated and replaced with a flutter 46 | assets directory containing the same files as the FLX did. 47 | 48 | November 29, 2017: Added a BREAKING CHANGES section. 49 | */ 50 | 51 | #include "FlutterAppDelegate.h" 52 | #include "FlutterBinaryMessenger.h" 53 | #include "FlutterCallbackCache.h" 54 | #include "FlutterChannels.h" 55 | #include "FlutterCodecs.h" 56 | #include "FlutterDartProject.h" 57 | #include "FlutterEngine.h" 58 | #include "FlutterHeadlessDartRunner.h" 59 | #include "FlutterMacros.h" 60 | #include "FlutterPlatformViews.h" 61 | #include "FlutterPlugin.h" 62 | #include "FlutterPluginAppLifeCycleDelegate.h" 63 | #include "FlutterTexture.h" 64 | #include "FlutterViewController.h" 65 | 66 | #endif // FLUTTER_FLUTTER_H_ 67 | -------------------------------------------------------------------------------- /ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef FLUTTER_FLUTTERAPPDELEGATE_H_ 6 | #define FLUTTER_FLUTTERAPPDELEGATE_H_ 7 | 8 | #import 9 | 10 | #include "FlutterMacros.h" 11 | #include "FlutterPlugin.h" 12 | 13 | /** 14 | * `UIApplicationDelegate` subclass for simple apps that want default behavior. 15 | * 16 | * This class implements the following behaviors: 17 | * * Status bar touches are forwarded to the key window's root view 18 | * `FlutterViewController`, in order to trigger scroll to top. 19 | * * Keeps the Flutter connection open in debug mode when the phone screen 20 | * locks. 21 | * 22 | * App delegates for Flutter applications are *not* required to inherit from 23 | * this class. Developers of custom app delegate classes should copy and paste 24 | * code as necessary from FlutterAppDelegate.mm. 25 | */ 26 | FLUTTER_EXPORT 27 | @interface FlutterAppDelegate 28 | : UIResponder 29 | 30 | @property(strong, nonatomic) UIWindow* window; 31 | 32 | @end 33 | 34 | #endif // FLUTTER_FLUTTERDARTPROJECT_H_ 35 | -------------------------------------------------------------------------------- /ios/Flutter/Flutter.framework/Headers/FlutterBinaryMessenger.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef FLUTTER_FLUTTERBINARYMESSENGER_H_ 6 | #define FLUTTER_FLUTTERBINARYMESSENGER_H_ 7 | 8 | #import 9 | 10 | #include "FlutterMacros.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | /** 14 | * A message reply callback. 15 | * 16 | * Used for submitting a binary reply back to a Flutter message sender. Also used 17 | * in for handling a binary message reply received from Flutter. 18 | * 19 | * @param reply The reply. 20 | */ 21 | typedef void (^FlutterBinaryReply)(NSData* _Nullable reply); 22 | 23 | /** 24 | * A strategy for handling incoming binary messages from Flutter and to send 25 | * asynchronous replies back to Flutter. 26 | * 27 | * @param message The message. 28 | * @param reply A callback for submitting an asynchronous reply to the sender. 29 | */ 30 | typedef void (^FlutterBinaryMessageHandler)(NSData* _Nullable message, FlutterBinaryReply reply); 31 | 32 | /** 33 | * A facility for communicating with the Flutter side using asynchronous message 34 | * passing with binary messages. 35 | * 36 | * Implementated by: 37 | * - `FlutterBasicMessageChannel`, which supports communication using structured 38 | * messages. 39 | * - `FlutterMethodChannel`, which supports communication using asynchronous 40 | * method calls. 41 | * - `FlutterEventChannel`, which supports commuication using event streams. 42 | */ 43 | FLUTTER_EXPORT 44 | @protocol FlutterBinaryMessenger 45 | /** 46 | * Sends a binary message to the Flutter side on the specified channel, expecting 47 | * no reply. 48 | * 49 | * @param channel The channel name. 50 | * @param message The message. 51 | */ 52 | - (void)sendOnChannel:(NSString*)channel message:(NSData* _Nullable)message; 53 | 54 | /** 55 | * Sends a binary message to the Flutter side on the specified channel, expecting 56 | * an asynchronous reply. 57 | * 58 | * @param channel The channel name. 59 | * @param message The message. 60 | * @param callback A callback for receiving a reply. 61 | */ 62 | - (void)sendOnChannel:(NSString*)channel 63 | message:(NSData* _Nullable)message 64 | binaryReply:(FlutterBinaryReply _Nullable)callback; 65 | 66 | /** 67 | * Registers a message handler for incoming binary messages from the Flutter side 68 | * on the specified channel. 69 | * 70 | * Replaces any existing handler. Use a `nil` handler for unregistering the 71 | * existing handler. 72 | * 73 | * @param channel The channel name. 74 | * @param handler The message handler. 75 | */ 76 | - (void)setMessageHandlerOnChannel:(NSString*)channel 77 | binaryMessageHandler:(FlutterBinaryMessageHandler _Nullable)handler; 78 | @end 79 | NS_ASSUME_NONNULL_END 80 | #endif // FLUTTER_FLUTTERBINARYMESSENGER_H_ 81 | -------------------------------------------------------------------------------- /ios/Flutter/Flutter.framework/Headers/FlutterCallbackCache.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef FLUTTER_FLUTTERCALLBACKCACHE_H_ 6 | #define FLUTTER_FLUTTERCALLBACKCACHE_H_ 7 | 8 | #import 9 | 10 | #include "FlutterMacros.h" 11 | 12 | /** 13 | * An object containing the result of `FlutterCallbackCache`'s `lookupCallbackInformation` 14 | * method. 15 | */ 16 | FLUTTER_EXPORT 17 | @interface FlutterCallbackInformation : NSObject 18 | /** 19 | * The name of the callback. 20 | */ 21 | @property(retain) NSString* callbackName; 22 | /** 23 | * The class name of the callback. 24 | */ 25 | @property(retain) NSString* callbackClassName; 26 | /** 27 | * The library path of the callback. 28 | */ 29 | @property(retain) NSString* callbackLibraryPath; 30 | @end 31 | 32 | /** 33 | * The cache containing callback information for spawning a 34 | * `FlutterHeadlessDartRunner`. 35 | */ 36 | FLUTTER_EXPORT 37 | @interface FlutterCallbackCache : NSObject 38 | /** 39 | * Returns the callback information for the given callback handle. 40 | * This callback information can be used when spawning a 41 | * `FlutterHeadlessDartRunner`. 42 | * 43 | * @param handle The handle for a callback, provided by the 44 | * Dart method `PluginUtilities.getCallbackHandle`. 45 | * @return A `FlutterCallbackInformation` object which contains the name of the 46 | * callback, the name of the class in which the callback is defined, and the 47 | * path of the library which contains the callback. If the provided handle is 48 | * invalid, nil is returned. 49 | */ 50 | + (FlutterCallbackInformation*)lookupCallbackInformation:(int64_t)handle; 51 | 52 | @end 53 | 54 | #endif // FLUTTER_FLUTTERCALLBACKCACHE_H_ 55 | -------------------------------------------------------------------------------- /ios/Flutter/Flutter.framework/Headers/FlutterDartProject.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef FLUTTER_FLUTTERDARTPROJECT_H_ 6 | #define FLUTTER_FLUTTERDARTPROJECT_H_ 7 | 8 | #import 9 | 10 | #include "FlutterMacros.h" 11 | 12 | /** 13 | * A set of Flutter and Dart assets used by a `FlutterEngine` to initialize execution. 14 | */ 15 | FLUTTER_EXPORT 16 | @interface FlutterDartProject : NSObject 17 | 18 | /** 19 | * Initializes with a specific 20 | */ 21 | - (instancetype)initWithPrecompiledDartBundle:(NSBundle*)bundle NS_DESIGNATED_INITIALIZER; 22 | 23 | /** 24 | * Initializes with a specific set of Flutter Assets, with a specified location of 25 | * main() and Dart packages. 26 | */ 27 | - (instancetype)initWithFlutterAssets:(NSURL*)flutterAssetsURL 28 | dartMain:(NSURL*)dartMainURL 29 | packages:(NSURL*)dartPackages NS_DESIGNATED_INITIALIZER; 30 | 31 | /** 32 | * Initializes from a specific set of Flutter Assets. 33 | */ 34 | - (instancetype)initWithFlutterAssetsWithScriptSnapshot:(NSURL*)flutterAssetsURL 35 | NS_DESIGNATED_INITIALIZER; 36 | 37 | /** 38 | * Unavailable - use `init` instead. 39 | */ 40 | - (instancetype)initFromDefaultSourceForConfiguration FLUTTER_UNAVAILABLE("Use -init instead."); 41 | 42 | /** 43 | * Returns the file name for the given asset. 44 | * The returned file name can be used to access the asset in the application's main bundle. 45 | * 46 | * @param asset The name of the asset. The name can be hierarchical. 47 | * @return the file name to be used for lookup in the main bundle. 48 | */ 49 | + (NSString*)lookupKeyForAsset:(NSString*)asset; 50 | 51 | /** 52 | * Returns the file name for the given asset which originates from the specified package. 53 | * The returned file name can be used to access the asset in the application's main bundle. 54 | * 55 | * @param asset The name of the asset. The name can be hierarchical. 56 | * @param package The name of the package from which the asset originates. 57 | * @return the file name to be used for lookup in the main bundle. 58 | */ 59 | + (NSString*)lookupKeyForAsset:(NSString*)asset fromPackage:(NSString*)package; 60 | 61 | /** 62 | * Returns the default identifier for the bundle where we expect to find the Flutter Dart 63 | * application. 64 | */ 65 | + (NSString*)defaultBundleIdentifier; 66 | 67 | @end 68 | 69 | #endif // FLUTTER_FLUTTERDARTPROJECT_H_ 70 | -------------------------------------------------------------------------------- /ios/Flutter/Flutter.framework/Headers/FlutterEngine.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef FLUTTER_FLUTTERENGINE_H_ 6 | #define FLUTTER_FLUTTERENGINE_H_ 7 | 8 | #import 9 | #import 10 | 11 | #include "FlutterBinaryMessenger.h" 12 | #include "FlutterDartProject.h" 13 | #include "FlutterMacros.h" 14 | #include "FlutterPlugin.h" 15 | #include "FlutterTexture.h" 16 | 17 | @class FlutterViewController; 18 | 19 | /** 20 | * The FlutterEngine class coordinates a single instance of execution for a 21 | * `FlutterDartProject`. It may have zero or one `FlutterViewController` at a 22 | * time, which can be specified via `-setViewController:`. 23 | * `FlutterViewController`'s `initWithEngine` initializer will automatically call 24 | * `-setViewController:` for itself. 25 | * 26 | * A FlutterEngine can be created independently of a `FlutterViewController` for 27 | * headless execution. It can also persist across the lifespan of multiple 28 | * `FlutterViewController` instances to maintain state and/or asynchronous tasks 29 | * (such as downloading a large file). 30 | * 31 | * Alternatively, you can simply create a new `FlutterViewController` with only a 32 | * `FlutterDartProject`. That `FlutterViewController` will internally manage its 33 | * own instance of a FlutterEngine, but will not guarantee survival of the engine 34 | * beyond the life of the ViewController. 35 | * 36 | * A newly initialized FlutterEngine will not actually run a Dart Isolate until 37 | * either `-runWithEntrypoint:` or `-runWithEntrypoint:libraryURI` is invoked. 38 | * One of these methods must be invoked before calling `-setViewController:`. 39 | */ 40 | FLUTTER_EXPORT 41 | @interface FlutterEngine 42 | : NSObject 43 | /** 44 | * Initialize this FlutterEngine with a `FlutterDartProject`. 45 | * 46 | * If the FlutterDartProject is not specified, the FlutterEngine will attempt to locate 47 | * the project in a default location (the flutter_assets folder in the iOS application 48 | * bundle). 49 | * 50 | * A newly initialized engine will not run the `FlutterDartProject` until either 51 | * `-runWithEntrypoint:` or `-runWithEntrypoint:libraryURI:` is called. 52 | * 53 | * @param labelPrefix The label prefix used to identify threads for this instance. Should 54 | * be unique across FlutterEngine instances, and is used in instrumentation to label 55 | * the threads used by this FlutterEngine. 56 | * @param projectOrNil The `FlutterDartProject` to run. 57 | */ 58 | - (instancetype)initWithName:(NSString*)labelPrefix 59 | project:(FlutterDartProject*)projectOrNil NS_DESIGNATED_INITIALIZER; 60 | 61 | /** 62 | * The default initializer is not available for this object. 63 | * Callers must use `-[FlutterEngine initWithName:project:]`. 64 | */ 65 | - (instancetype)init NS_UNAVAILABLE; 66 | 67 | /** 68 | * Runs a Dart program on an Isolate from the main Dart library (i.e. the library that 69 | * contains `main()`). 70 | * 71 | * The first call to this method will create a new Isolate. Subsequent calls will return 72 | * immediately. 73 | * 74 | * @param entrypoint The name of a top-level function from the same Dart 75 | * library that contains the app's main() function. If this is nil, it will 76 | * default to `main()`. If it is not the app's main() function, that function 77 | * must be decorated with `@pragma(vm:entry-point)` to ensure the method is not 78 | * tree-shaken by the Dart compiler. 79 | * @return YES if the call succeeds in creating and running a Flutter Engine instance; NO otherwise. 80 | */ 81 | - (BOOL)runWithEntrypoint:(NSString*)entrypoint; 82 | 83 | /** 84 | * Runs a Dart program on an Isolate using the specified entrypoint and Dart library, 85 | * which may not be the same as the library containing the Dart program's `main()` function. 86 | * 87 | * The first call to this method will create a new Isolate. Subsequent calls will return 88 | * immediately. 89 | * 90 | * @param entrypoint The name of a top-level function from a Dart library. If nil, this will 91 | * default to `main()`. If it is not the app's main() function, that function 92 | * must be decorated with `@pragma(vm:entry-point)` to ensure the method is not 93 | * tree-shaken by the Dart compiler. 94 | * @param uri The URI of the Dart library which contains the entrypoint method. IF nil, 95 | * this will default to the same library as the `main()` function in the Dart program. 96 | * @return YES if the call succeeds in creating and running a Flutter Engine instance; NO otherwise. 97 | */ 98 | - (BOOL)runWithEntrypoint:(NSString*)entrypoint libraryURI:(NSString*)uri; 99 | 100 | /** 101 | * Sets the `FlutterViewController` for this instance. The FlutterEngine must be 102 | * running (e.g. a successful call to `-runWithEntrypoint:` or `-runWithEntrypoint:libraryURI`) 103 | * before calling this method. Callers may pass nil to remove the viewController 104 | * and have the engine run headless in the current process. 105 | * 106 | * A FlutterEngine can only have one `FlutterViewController` at a time. If there is 107 | * already a `FlutterViewController` associated with this instance, this method will replace 108 | * the engine's current viewController with the newly specified one. 109 | * 110 | * Setting the viewController will signal the engine to start animations and drawing, and unsetting 111 | * it will signal the engine to stop animations and drawing. However, neither will impact the state 112 | * of the Dart program's execution. 113 | */ 114 | @property(nonatomic, weak) FlutterViewController* viewController; 115 | 116 | /** 117 | * The `FlutterMethodChannel` used for localization related platform messages, such as 118 | * setting the locale. 119 | */ 120 | @property(nonatomic, readonly) FlutterMethodChannel* localizationChannel; 121 | /** 122 | * The `FlutterMethodChannel` used for navigation related platform messages. 123 | * 124 | * @see [Navigation 125 | * Channel](https://docs.flutter.io/flutter/services/SystemChannels/navigation-constant.html) 126 | * @see [Navigator Widget](https://docs.flutter.io/flutter/widgets/Navigator-class.html) 127 | */ 128 | @property(nonatomic, readonly) FlutterMethodChannel* navigationChannel; 129 | 130 | /** 131 | * The `FlutterMethodChannel` used for core platform messages, such as 132 | * information about the screen orientation. 133 | */ 134 | @property(nonatomic, readonly) FlutterMethodChannel* platformChannel; 135 | 136 | /** 137 | * The `FlutterMethodChannel` used to communicate text input events to the 138 | * Dart Isolate. 139 | * 140 | * @see [Text Input 141 | * Channel](https://docs.flutter.io/flutter/services/SystemChannels/textInput-constant.html) 142 | */ 143 | @property(nonatomic, readonly) FlutterMethodChannel* textInputChannel; 144 | 145 | /** 146 | * The `FlutterBasicMessageChannel` used to communicate app lifecycle events 147 | * to the Dart Isolate. 148 | * 149 | * @see [Lifecycle 150 | * Channel](https://docs.flutter.io/flutter/services/SystemChannels/lifecycle-constant.html) 151 | */ 152 | @property(nonatomic, readonly) FlutterBasicMessageChannel* lifecycleChannel; 153 | 154 | /** 155 | * The `FlutterBasicMessageChannel` used for communicating system events, such as 156 | * memory pressure events. 157 | * 158 | * @see [System 159 | * Channel](https://docs.flutter.io/flutter/services/SystemChannels/system-constant.html) 160 | */ 161 | @property(nonatomic, readonly) FlutterBasicMessageChannel* systemChannel; 162 | 163 | /** 164 | * The `FlutterBasicMessageChannel` used for communicating user settings such as 165 | * clock format and text scale. 166 | */ 167 | @property(nonatomic, readonly) FlutterBasicMessageChannel* settingsChannel; 168 | 169 | @end 170 | 171 | #endif // FLUTTER_FLUTTERENGINE_H_ 172 | -------------------------------------------------------------------------------- /ios/Flutter/Flutter.framework/Headers/FlutterHeadlessDartRunner.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef FLUTTER_FLUTTERHEADLESSDARTRUNNER_H_ 6 | #define FLUTTER_FLUTTERHEADLESSDARTRUNNER_H_ 7 | 8 | #import 9 | 10 | #include "FlutterBinaryMessenger.h" 11 | #include "FlutterDartProject.h" 12 | #include "FlutterEngine.h" 13 | #include "FlutterMacros.h" 14 | 15 | /** 16 | * A callback for when FlutterHeadlessDartRunner has attempted to start a Dart 17 | * Isolate in the background. 18 | * 19 | * @param success YES if the Isolate was started and run successfully, NO 20 | * otherwise. 21 | */ 22 | typedef void (^FlutterHeadlessDartRunnerCallback)(BOOL success); 23 | 24 | /** 25 | * The FlutterHeadlessDartRunner runs Flutter Dart code with a null rasterizer, 26 | * and no native drawing surface. It is appropriate for use in running Dart 27 | * code e.g. in the background from a plugin. 28 | * 29 | * Most callers should prefer using `FlutterEngine` directly; this interface exists 30 | * for legacy support. 31 | */ 32 | FLUTTER_EXPORT 33 | FLUTTER_DEPRECATED("FlutterEngine should be used rather than FlutterHeadlessDartRunner") 34 | @interface FlutterHeadlessDartRunner : FlutterEngine 35 | 36 | /** 37 | * Iniitalize this FlutterHeadlessDartRunner with a `FlutterDartProject`. 38 | * 39 | * If the FlutterDartProject is not specified, the FlutterHeadlessDartRunner will attempt to locate 40 | * the project in a default location. 41 | * 42 | * A newly initialized engine will not run the `FlutterDartProject` until either 43 | * `-runWithEntrypoint:` or `-runWithEntrypoint:libraryURI` is called. 44 | * 45 | * @param labelPrefix The label prefix used to identify threads for this instance. Should 46 | * be unique across FlutterEngine instances 47 | * @param projectOrNil The `FlutterDartProject` to run. 48 | */ 49 | - (instancetype)initWithName:(NSString*)labelPrefix 50 | project:(FlutterDartProject*)projectOrNil NS_DESIGNATED_INITIALIZER; 51 | 52 | /** 53 | * Not recommended for use - will initialize with a default label ("io.flutter.headless") 54 | * and the default FlutterDartProject. 55 | */ 56 | - (instancetype)init; 57 | 58 | @end 59 | 60 | #endif // FLUTTER_FLUTTERHEADLESSDARTRUNNER_H_ 61 | -------------------------------------------------------------------------------- /ios/Flutter/Flutter.framework/Headers/FlutterMacros.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef FLUTTER_FLUTTERMACROS_H_ 6 | #define FLUTTER_FLUTTERMACROS_H_ 7 | 8 | #if defined(FLUTTER_FRAMEWORK) 9 | 10 | #define FLUTTER_EXPORT __attribute__((visibility("default"))) 11 | 12 | #else // defined(FLUTTER_SDK) 13 | 14 | #define FLUTTER_EXPORT 15 | 16 | #endif // defined(FLUTTER_SDK) 17 | 18 | #ifndef NS_ASSUME_NONNULL_BEGIN 19 | #define NS_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin") 20 | #define NS_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end") 21 | #endif // defined(NS_ASSUME_NONNULL_BEGIN) 22 | 23 | /** 24 | * Indicates that the API has been deprecated for the specified reason. Code 25 | * that uses the deprecated API will continue to work as before. However, the 26 | * API will soon become unavailable and users are encouraged to immediately take 27 | * the appropriate action mentioned in the deprecation message and the BREAKING 28 | * CHANGES section present in the Flutter.h umbrella header. 29 | */ 30 | #define FLUTTER_DEPRECATED(msg) __attribute__((__deprecated__(msg))) 31 | 32 | /** 33 | * Indicates that the previously deprecated API is now unavailable. Code that 34 | * uses the API will not work and the declaration of the API is only a stub 35 | * meant to display the given message detailing the actions for the user to take 36 | * immediately. 37 | */ 38 | #define FLUTTER_UNAVAILABLE(msg) __attribute__((__unavailable__(msg))) 39 | 40 | #endif // FLUTTER_FLUTTERMACROS_H_ 41 | -------------------------------------------------------------------------------- /ios/Flutter/Flutter.framework/Headers/FlutterPlatformViews.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef FLUTTER_FLUTTERPLATFORMVIEWS_H_ 6 | #define FLUTTER_FLUTTERPLATFORMVIEWS_H_ 7 | 8 | #import 9 | 10 | #import "FlutterCodecs.h" 11 | #import "FlutterMacros.h" 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | /** 16 | * Wraps a `UIView` for embedding in the Flutter hierarchy 17 | */ 18 | @protocol FlutterPlatformView 19 | /** 20 | * Returns a reference to the `UIView` that is wrapped by this `FlutterPlatformView`. 21 | */ 22 | - (UIView*)view; 23 | @end 24 | 25 | FLUTTER_EXPORT 26 | @protocol FlutterPlatformViewFactory 27 | /** 28 | * Create a `FlutterPlatformView`. 29 | * 30 | * Implemented by iOS code that expose a `UIView` for embedding in a Flutter app. 31 | * 32 | * The implementation of this method should create a new `UIView` and return it. 33 | * 34 | * @param frame The rectangle for the newly created `UIView` measued in points. 35 | * @param viewId A unique identifier for this `UIView`. 36 | * @param args Parameters for creating the `UIView` sent from the Dart side of the Flutter app. 37 | * If `createArgsCodec` is not implemented, or if no creation arguments were sent from the Dart 38 | * code, this will be null. Otherwise this will be the value sent from the Dart code as decoded by 39 | * `createArgsCodec`. 40 | */ 41 | - (NSObject*)createWithFrame:(CGRect)frame 42 | viewIdentifier:(int64_t)viewId 43 | arguments:(id _Nullable)args; 44 | 45 | /** 46 | * Returns the `FlutterMessageCodec` for decoding the args parameter of `createWithFrame`. 47 | * 48 | * Only needs to be implemented if `createWithFrame` needs an arguments parameter. 49 | */ 50 | @optional 51 | - (NSObject*)createArgsCodec; 52 | @end 53 | 54 | NS_ASSUME_NONNULL_END 55 | 56 | #endif // FLUTTER_FLUTTERPLATFORMVIEWS_H_ 57 | -------------------------------------------------------------------------------- /ios/Flutter/Flutter.framework/Headers/FlutterPluginAppLifeCycleDelegate.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef FLUTTER_FLUTTERPLUGINAPPLIFECYCLEDELEGATE_H_ 6 | #define FLUTTER_FLUTTERPLUGINAPPLIFECYCLEDELEGATE_H_ 7 | 8 | #include "FlutterPlugin.h" 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | /** 13 | * Propagates `UIAppDelegate` callbacks to registered plugins. 14 | */ 15 | FLUTTER_EXPORT 16 | @interface FlutterPluginAppLifeCycleDelegate : NSObject 17 | /** 18 | * Registers `delegate` to receive life cycle callbacks via this FlutterPluginAppLifecycleDelegate 19 | * as long as it is alive. 20 | * 21 | * `delegate` will only referenced weakly. 22 | */ 23 | - (void)addDelegate:(NSObject*)delegate; 24 | 25 | /** 26 | * Calls all plugins registered for `UIApplicationDelegate` callbacks. 27 | * 28 | * @return `NO` if any plugin vetoes application launch. 29 | */ 30 | - (BOOL)application:(UIApplication*)application 31 | didFinishLaunchingWithOptions:(NSDictionary*)launchOptions; 32 | 33 | /** 34 | * Calls all plugins registered for `UIApplicationDelegate` callbacks. 35 | * 36 | * @return `NO` if any plugin vetoes application launch. 37 | */ 38 | - (BOOL)application:(UIApplication*)application 39 | willFinishLaunchingWithOptions:(NSDictionary*)launchOptions; 40 | 41 | /** 42 | * Calls all plugins registered for `UIApplicationDelegate` callbacks. 43 | */ 44 | - (void)applicationDidBecomeActive:(UIApplication*)application; 45 | 46 | /** 47 | * Calls all plugins registered for `UIApplicationDelegate` callbacks. 48 | */ 49 | - (void)applicationWillResignActive:(UIApplication*)application; 50 | 51 | /** 52 | * Calls all plugins registered for `UIApplicationDelegate` callbacks. 53 | */ 54 | - (void)applicationDidEnterBackground:(UIApplication*)application; 55 | 56 | /** 57 | * Calls all plugins registered for `UIApplicationDelegate` callbacks. 58 | */ 59 | - (void)applicationWillEnterForeground:(UIApplication*)application; 60 | 61 | /** 62 | * Calls all plugins registered for `UIApplicationDelegate` callbacks. 63 | */ 64 | - (void)applicationWillTerminate:(UIApplication*)application; 65 | 66 | /** 67 | * Called if this plugin has been registered for `UIApplicationDelegate` callbacks. 68 | */ 69 | #pragma GCC diagnostic push 70 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 71 | - (void)application:(UIApplication*)application 72 | didRegisterUserNotificationSettings:(UIUserNotificationSettings*)notificationSettings; 73 | #pragma GCC diagnostic pop 74 | 75 | /** 76 | * Calls all plugins registered for `UIApplicationDelegate` callbacks. 77 | */ 78 | - (void)application:(UIApplication*)application 79 | didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken; 80 | 81 | /** 82 | * Calls all plugins registered for `UIApplicationDelegate` callbacks. 83 | */ 84 | - (void)application:(UIApplication*)application 85 | didReceiveRemoteNotification:(NSDictionary*)userInfo 86 | fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler; 87 | 88 | /** 89 | * Calls all plugins registered for `UIApplicationDelegate` callbacks. 90 | */ 91 | - (void)application:(UIApplication*)application 92 | didReceiveLocalNotification:(UILocalNotification*)notification; 93 | 94 | /** 95 | * Calls all plugins registered for `UNUserNotificationCenterDelegate` callbacks. 96 | */ 97 | - (void)userNotificationCenter:(UNUserNotificationCenter*)center 98 | willPresentNotification:(UNNotification*)notification 99 | withCompletionHandler: 100 | (void (^)(UNNotificationPresentationOptions options))completionHandler 101 | API_AVAILABLE(ios(10)); 102 | 103 | /** 104 | * Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until 105 | * some plugin handles the request. 106 | * 107 | * @return `YES` if any plugin handles the request. 108 | */ 109 | - (BOOL)application:(UIApplication*)application 110 | openURL:(NSURL*)url 111 | options:(NSDictionary*)options; 112 | 113 | /** 114 | * Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until 115 | * some plugin handles the request. 116 | * 117 | * @return `YES` if any plugin handles the request. 118 | */ 119 | - (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)url; 120 | 121 | /** 122 | * Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until 123 | * some plugin handles the request. 124 | * 125 | * @return `YES` if any plugin handles the request. 126 | */ 127 | - (BOOL)application:(UIApplication*)application 128 | openURL:(NSURL*)url 129 | sourceApplication:(NSString*)sourceApplication 130 | annotation:(id)annotation; 131 | 132 | /** 133 | * Calls all plugins registered for `UIApplicationDelegate` callbacks. 134 | */ 135 | - (void)application:(UIApplication*)application 136 | performActionForShortcutItem:(UIApplicationShortcutItem*)shortcutItem 137 | completionHandler:(void (^)(BOOL succeeded))completionHandler 138 | API_AVAILABLE(ios(9.0)); 139 | 140 | /** 141 | * Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until 142 | * some plugin handles the request. 143 | * 144 | * @return `YES` if any plugin handles the request. 145 | */ 146 | - (BOOL)application:(UIApplication*)application 147 | handleEventsForBackgroundURLSession:(nonnull NSString*)identifier 148 | completionHandler:(nonnull void (^)(void))completionHandler; 149 | 150 | /** 151 | * Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until 152 | * some plugin handles the request. 153 | * 154 | * @returns `YES` if any plugin handles the request. 155 | */ 156 | - (BOOL)application:(UIApplication*)application 157 | performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler; 158 | 159 | /** 160 | * Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until 161 | * some plugin handles the request. 162 | * 163 | * @return `YES` if any plugin handles the request. 164 | */ 165 | - (BOOL)application:(UIApplication*)application 166 | continueUserActivity:(NSUserActivity*)userActivity 167 | restorationHandler:(void (^)(NSArray*))restorationHandler; 168 | @end 169 | 170 | NS_ASSUME_NONNULL_END 171 | 172 | #endif // FLUTTER_FLUTTERPLUGINAPPLIFECYCLEDELEGATE_H_ 173 | -------------------------------------------------------------------------------- /ios/Flutter/Flutter.framework/Headers/FlutterTexture.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef FLUTTER_FLUTTERTEXTURE_H_ 6 | #define FLUTTER_FLUTTERTEXTURE_H_ 7 | 8 | #import 9 | #import 10 | 11 | #include "FlutterMacros.h" 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | FLUTTER_EXPORT 16 | @protocol FlutterTexture 17 | - (CVPixelBufferRef _Nullable)copyPixelBuffer; 18 | @end 19 | 20 | FLUTTER_EXPORT 21 | @protocol FlutterTextureRegistry 22 | - (int64_t)registerTexture:(NSObject*)texture; 23 | - (void)textureFrameAvailable:(int64_t)textureId; 24 | - (void)unregisterTexture:(int64_t)textureId; 25 | @end 26 | 27 | NS_ASSUME_NONNULL_END 28 | 29 | #endif // FLUTTER_FLUTTERTEXTURE_H_ 30 | -------------------------------------------------------------------------------- /ios/Flutter/Flutter.framework/Headers/FlutterViewController.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef FLUTTER_FLUTTERVIEWCONTROLLER_H_ 6 | #define FLUTTER_FLUTTERVIEWCONTROLLER_H_ 7 | 8 | #import 9 | #include 10 | 11 | #include "FlutterBinaryMessenger.h" 12 | #include "FlutterDartProject.h" 13 | #include "FlutterEngine.h" 14 | #include "FlutterMacros.h" 15 | #include "FlutterPlugin.h" 16 | #include "FlutterTexture.h" 17 | 18 | @class FlutterEngine; 19 | 20 | /** 21 | * A `UIViewController` implementation for Flutter views. 22 | * 23 | * Dart execution, channel communication, texture registration, and plugin registration 24 | * are all handled by `FlutterEngine`. Calls on this class to those members all proxy 25 | * through to the `FlutterEngine` attached FlutterViewController. 26 | * 27 | * A FlutterViewController can be initialized either with an already-running `FlutterEngine`, 28 | * or it can be initialized with a `FlutterDartProject` that will be used to spin up 29 | * a new `FlutterEngine`. Developers looking to present and hide FlutterViewControllers 30 | * in native iOS applications will usually want to maintain the `FlutterEngine` instance 31 | * so as not to lose Dart-related state and asynchronous tasks when navigating back and 32 | * forth between a FlutterViewController and other `UIViewController`s. 33 | */ 34 | FLUTTER_EXPORT 35 | @interface FlutterViewController 36 | : UIViewController 37 | 38 | /** 39 | * Initializes this FlutterViewController with the specified `FlutterEngine`. 40 | * 41 | * The initialized viewcontroller will attach itself to the engine as part of this process. 42 | * 43 | * @param engine The `FlutterEngine` instance to attach to. 44 | * @param nibNameOrNil The NIB name to initialize this UIViewController with. 45 | * @param nibBundleOrNil The NIB bundle. 46 | */ 47 | - (instancetype)initWithEngine:(FlutterEngine*)engine 48 | nibName:(NSString*)nibNameOrNil 49 | bundle:(NSBundle*)nibBundleOrNil NS_DESIGNATED_INITIALIZER; 50 | 51 | /** 52 | * Initializes a new FlutterViewController and `FlutterEngine` with the specified 53 | * `FlutterDartProject`. 54 | * 55 | * @param projectOrNil The `FlutterDartProject` to initialize the `FlutterEngine` with. 56 | * @param nibNameOrNil The NIB name to initialize this UIViewController with. 57 | * @param nibBundleOrNil The NIB bundle. 58 | */ 59 | - (instancetype)initWithProject:(FlutterDartProject*)projectOrNil 60 | nibName:(NSString*)nibNameOrNil 61 | bundle:(NSBundle*)nibBundleOrNil NS_DESIGNATED_INITIALIZER; 62 | 63 | - (void)handleStatusBarTouches:(UIEvent*)event; 64 | 65 | /** 66 | * Registers a callback that will be invoked when the Flutter view has been rendered. 67 | * The callback will be fired only once. 68 | * 69 | * Replaces an existing callback. Use a `nil` callback to unregister the existing one. 70 | */ 71 | - (void)setFlutterViewDidRenderCallback:(void (^)(void))callback; 72 | 73 | /** 74 | * Returns the file name for the given asset. 75 | * The returned file name can be used to access the asset in the application's 76 | * main bundle. 77 | * 78 | * @param asset The name of the asset. The name can be hierarchical. 79 | * @return The file name to be used for lookup in the main bundle. 80 | */ 81 | - (NSString*)lookupKeyForAsset:(NSString*)asset; 82 | 83 | /** 84 | * Returns the file name for the given asset which originates from the specified 85 | * package. 86 | * The returned file name can be used to access the asset in the application's 87 | * main bundle. 88 | * 89 | * @param asset The name of the asset. The name can be hierarchical. 90 | * @param package The name of the package from which the asset originates. 91 | * @return The file name to be used for lookup in the main bundle. 92 | */ 93 | - (NSString*)lookupKeyForAsset:(NSString*)asset fromPackage:(NSString*)package; 94 | 95 | /** 96 | * Sets the first route that the Flutter app shows. The default is "/". 97 | * This method will guarnatee that the initial route is delivered, even if the 98 | * Flutter window hasn't been created yet when called. It cannot be used to update 99 | * the current route being shown in a visible FlutterViewController (see pushRoute 100 | * and popRoute). 101 | * 102 | * @param route The name of the first route to show. 103 | */ 104 | - (void)setInitialRoute:(NSString*)route; 105 | 106 | /** 107 | * Instructs the Flutter Navigator (if any) to go back. 108 | */ 109 | - (void)popRoute; 110 | 111 | /** 112 | * Instructs the Flutter Navigator (if any) to push a route on to the navigation 113 | * stack. The setInitialRoute method should be prefered if this is called before the 114 | * FlutterViewController has come into view. 115 | * 116 | * @param route The name of the route to push to the navigation stack. 117 | */ 118 | - (void)pushRoute:(NSString*)route; 119 | 120 | /** 121 | * The `FlutterPluginRegistry` used by this FlutterViewController. 122 | */ 123 | - (id)pluginRegistry; 124 | 125 | /** 126 | * Specifies the view to use as a splash screen. Flutter's rendering is asynchronous, so the first 127 | * frame rendered by the Flutter application might not immediately appear when theFlutter view is 128 | * initially placed in the view hierarchy. The splash screen view will be used as 129 | * a replacement until the first frame is rendered. 130 | * 131 | * The view used should be appropriate for multiple sizes; an autoresizing mask to 132 | * have a flexible width and height will be applied automatically. 133 | */ 134 | @property(strong, nonatomic) UIView* splashScreenView; 135 | 136 | /** 137 | * Attempts to set the `splashScreenView` property from the `UILaunchStoryboardName` from the 138 | * main bundle's `Info.plist` file. This method will not change the value of `splashScreenView` 139 | * if it cannot find a default one from a storyboard or nib. 140 | * 141 | * @return `YES` if successful, `NO` otherwise. 142 | */ 143 | - (BOOL)loadDefaultSplashScreenView; 144 | 145 | /** 146 | * Controls whether the created view will be opaque or not. 147 | * 148 | * Default is `YES`. Note that setting this to `NO` may negatively impact performance 149 | * when using hardware acceleration, and toggling this will trigger a re-layout of the 150 | * view. 151 | */ 152 | @property(nonatomic, getter=isViewOpaque) BOOL viewOpaque; 153 | 154 | @end 155 | 156 | #endif // FLUTTER_FLUTTERVIEWCONTROLLER_H_ 157 | -------------------------------------------------------------------------------- /ios/Flutter/Flutter.framework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | Flutter 9 | CFBundleIdentifier 10 | io.flutter.flutter 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | Flutter 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Flutter.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module Flutter { 2 | umbrella header "Flutter.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /ios/Flutter/Flutter.framework/icudtl.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Flutter/Flutter.framework/icudtl.dat -------------------------------------------------------------------------------- /ios/Flutter/Generated.xcconfig: -------------------------------------------------------------------------------- 1 | // This is a generated file; do not edit or check into version control. 2 | FLUTTER_ROOT=/Users/maochaolong041/local/flutter 3 | FLUTTER_APPLICATION_PATH=/Users/maochaolong041/flutter_movie 4 | FLUTTER_TARGET=/Users/maochaolong041/flutter_movie/lib/main.dart 5 | FLUTTER_BUILD_DIR=build 6 | SYMROOT=${SOURCE_ROOT}/../build/ios 7 | FLUTTER_FRAMEWORK_DIR=/Users/maochaolong041/local/flutter/bin/cache/artifacts/engine/ios 8 | FLUTTER_BUILD_NAME=1.0.6 9 | FLUTTER_BUILD_NUMBER=6 10 | TRACK_WIDGET_CREATION=true 11 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/flutter_assets/AssetManifest.json: -------------------------------------------------------------------------------- 1 | {"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"]} -------------------------------------------------------------------------------- /ios/Flutter/flutter_assets/FontManifest.json: -------------------------------------------------------------------------------- 1 | [{"fonts":[{"asset":"fonts/MaterialIcons-Regular.ttf"}],"family":"MaterialIcons"},{"family":"packages/cupertino_icons/CupertinoIcons","fonts":[{"asset":"packages/cupertino_icons/assets/CupertinoIcons.ttf"}]}] -------------------------------------------------------------------------------- /ios/Flutter/flutter_assets/fonts/MaterialIcons-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Flutter/flutter_assets/fonts/MaterialIcons-Regular.ttf -------------------------------------------------------------------------------- /ios/Flutter/flutter_assets/isolate_snapshot_data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Flutter/flutter_assets/isolate_snapshot_data -------------------------------------------------------------------------------- /ios/Flutter/flutter_assets/kernel_blob.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Flutter/flutter_assets/kernel_blob.bin -------------------------------------------------------------------------------- /ios/Flutter/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Flutter/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf -------------------------------------------------------------------------------- /ios/Flutter/flutter_assets/vm_snapshot_data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Flutter/flutter_assets/vm_snapshot_data -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | pods_ary = [] 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) { |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | pods_ary.push({:name => podname, :path => podpath}); 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | } 32 | return pods_ary 33 | end 34 | 35 | target 'Runner' do 36 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 37 | # referring to absolute paths on developers' machines. 38 | system('rm -rf .symlinks') 39 | system('mkdir -p .symlinks/plugins') 40 | 41 | # Flutter Pods 42 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') 43 | if generated_xcode_build_settings.empty? 44 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." 45 | end 46 | generated_xcode_build_settings.map { |p| 47 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR' 48 | symlink = File.join('.symlinks', 'flutter') 49 | File.symlink(File.dirname(p[:path]), symlink) 50 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) 51 | end 52 | } 53 | 54 | # Plugin Pods 55 | plugin_pods = parse_KV_file('../.flutter-plugins') 56 | plugin_pods.map { |p| 57 | symlink = File.join('.symlinks', 'plugins', p[:name]) 58 | File.symlink(p[:path], symlink) 59 | pod p[:name], :path => File.join(symlink, 'ios') 60 | } 61 | end 62 | 63 | post_install do |installer| 64 | installer.pods_project.targets.each do |target| 65 | target.build_configurations.each do |config| 66 | config.build_settings['ENABLE_BITCODE'] = 'NO' 67 | end 68 | end 69 | end 70 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - shared_preferences (0.0.1): 4 | - Flutter 5 | 6 | DEPENDENCIES: 7 | - Flutter (from `.symlinks/flutter/ios`) 8 | - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) 9 | 10 | EXTERNAL SOURCES: 11 | Flutter: 12 | :path: ".symlinks/flutter/ios" 13 | shared_preferences: 14 | :path: ".symlinks/plugins/shared_preferences/ios" 15 | 16 | SPEC CHECKSUMS: 17 | Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296 18 | shared_preferences: 5a1d487c427ee18fcd3ea1f2a131569481834b53 19 | 20 | PODFILE CHECKSUM: aff02bfeed411c636180d6812254b2daeea14d09 21 | 22 | COCOAPODS: 1.5.3 23 | -------------------------------------------------------------------------------- /ios/Pods/Local Podspecs/Flutter.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Flutter", 3 | "version": "1.0.0", 4 | "summary": "High-performance, high-fidelity mobile apps.", 5 | "description": "Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS.", 6 | "homepage": "https://flutter.io", 7 | "license": { 8 | "type": "MIT" 9 | }, 10 | "authors": { 11 | "Flutter Dev Team": "flutter-dev@googlegroups.com" 12 | }, 13 | "source": { 14 | "git": "https://github.com/flutter/engine", 15 | "tag": "1.0.0" 16 | }, 17 | "platforms": { 18 | "ios": "7.0" 19 | }, 20 | "vendored_frameworks": "Flutter.framework" 21 | } 22 | -------------------------------------------------------------------------------- /ios/Pods/Local Podspecs/shared_preferences.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shared_preferences", 3 | "version": "0.0.1", 4 | "summary": "A Flutter plugin for reading and writing simple key-value pairs.", 5 | "description": "A Flutter plugin for reading and writing simple key-value pairs.", 6 | "homepage": "https://github.com/flutter/plugins/tree/master/packages/shared_preferences", 7 | "license": { 8 | "file": "../LICENSE" 9 | }, 10 | "authors": { 11 | "Flutter Team": "flutter-dev@googlegroups.com" 12 | }, 13 | "source": { 14 | "path": "." 15 | }, 16 | "source_files": "Classes/**/*", 17 | "public_header_files": "Classes/**/*.h", 18 | "dependencies": { 19 | "Flutter": [ 20 | 21 | ] 22 | }, 23 | "platforms": { 24 | "ios": "8.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ios/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - shared_preferences (0.0.1): 4 | - Flutter 5 | 6 | DEPENDENCIES: 7 | - Flutter (from `.symlinks/flutter/ios`) 8 | - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) 9 | 10 | EXTERNAL SOURCES: 11 | Flutter: 12 | :path: ".symlinks/flutter/ios" 13 | shared_preferences: 14 | :path: ".symlinks/plugins/shared_preferences/ios" 15 | 16 | SPEC CHECKSUMS: 17 | Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296 18 | shared_preferences: 5a1d487c427ee18fcd3ea1f2a131569481834b53 19 | 20 | PODFILE CHECKSUM: aff02bfeed411c636180d6812254b2daeea14d09 21 | 22 | COCOAPODS: 1.5.3 23 | -------------------------------------------------------------------------------- /ios/Pods/Pods.xcodeproj/xcuserdata/maochaolong041.xcuserdatad/xcschemes/Pods-Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /ios/Pods/Pods.xcodeproj/xcuserdata/maochaolong041.xcuserdatad/xcschemes/shared_preferences.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /ios/Pods/Pods.xcodeproj/xcuserdata/maochaolong041.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Pods-Runner.xcscheme 8 | 9 | isShown 10 | 11 | 12 | shared_preferences.xcscheme 13 | 14 | isShown 15 | 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## Flutter 5 | 6 | Copyright 2014 The Chromium Authors. All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions are 10 | met: 11 | 12 | * Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | * Redistributions in binary form must reproduce the above 15 | copyright notice, this list of conditions and the following 16 | disclaimer in the documentation and/or other materials provided 17 | with the distribution. 18 | * Neither the name of Google Inc. nor the names of its 19 | contributors may be used to endorse or promote products derived 20 | from this software without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | 35 | ## shared_preferences 36 | 37 | // Copyright 2017 The Chromium Authors. All rights reserved. 38 | // 39 | // Redistribution and use in source and binary forms, with or without 40 | // modification, are permitted provided that the following conditions are 41 | // met: 42 | // 43 | // * Redistributions of source code must retain the above copyright 44 | // notice, this list of conditions and the following disclaimer. 45 | // * Redistributions in binary form must reproduce the above 46 | // copyright notice, this list of conditions and the following disclaimer 47 | // in the documentation and/or other materials provided with the 48 | // distribution. 49 | // * Neither the name of Google Inc. nor the names of its 50 | // contributors may be used to endorse or promote products derived from 51 | // this software without specific prior written permission. 52 | // 53 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 54 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 55 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 56 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 57 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 58 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 59 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 60 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 61 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 62 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 63 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 64 | Generated by CocoaPods - https://cocoapods.org 65 | -------------------------------------------------------------------------------- /ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright 2014 The Chromium Authors. All rights reserved. 18 | 19 | Redistribution and use in source and binary forms, with or without 20 | modification, are permitted provided that the following conditions are 21 | met: 22 | 23 | * Redistributions of source code must retain the above copyright 24 | notice, this list of conditions and the following disclaimer. 25 | * Redistributions in binary form must reproduce the above 26 | copyright notice, this list of conditions and the following 27 | disclaimer in the documentation and/or other materials provided 28 | with the distribution. 29 | * Neither the name of Google Inc. nor the names of its 30 | contributors may be used to endorse or promote products derived 31 | from this software without specific prior written permission. 32 | 33 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 34 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 35 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 36 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 37 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 38 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 39 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 40 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 41 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 42 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 43 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 44 | 45 | License 46 | MIT 47 | Title 48 | Flutter 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | FooterText 54 | // Copyright 2017 The Chromium Authors. All rights reserved. 55 | // 56 | // Redistribution and use in source and binary forms, with or without 57 | // modification, are permitted provided that the following conditions are 58 | // met: 59 | // 60 | // * Redistributions of source code must retain the above copyright 61 | // notice, this list of conditions and the following disclaimer. 62 | // * Redistributions in binary form must reproduce the above 63 | // copyright notice, this list of conditions and the following disclaimer 64 | // in the documentation and/or other materials provided with the 65 | // distribution. 66 | // * Neither the name of Google Inc. nor the names of its 67 | // contributors may be used to endorse or promote products derived from 68 | // this software without specific prior written permission. 69 | // 70 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 71 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 72 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 73 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 74 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 75 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 76 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 77 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 78 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 79 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 80 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 81 | Title 82 | shared_preferences 83 | Type 84 | PSGroupSpecifier 85 | 86 | 87 | FooterText 88 | Generated by CocoaPods - https://cocoapods.org 89 | Title 90 | 91 | Type 92 | PSGroupSpecifier 93 | 94 | 95 | StringsTable 96 | Acknowledgements 97 | Title 98 | Acknowledgements 99 | 100 | 101 | -------------------------------------------------------------------------------- /ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Runner : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Runner 5 | @end 6 | -------------------------------------------------------------------------------- /ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | if ! [ -r "$binary" ]; then 51 | binary="${destination}/${basename}" 52 | fi 53 | 54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 56 | strip_invalid_archs "$binary" 57 | fi 58 | 59 | # Resign the code if required by the build settings to avoid unstable apps 60 | code_sign_if_enabled "${destination}/$(basename "$1")" 61 | 62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 64 | local swift_runtime_libs 65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 66 | for lib in $swift_runtime_libs; do 67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 69 | code_sign_if_enabled "${destination}/${lib}" 70 | done 71 | fi 72 | } 73 | 74 | # Copies and strips a vendored dSYM 75 | install_dsym() { 76 | local source="$1" 77 | if [ -r "$source" ]; then 78 | # Copy the dSYM into a the targets temp dir. 79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 81 | 82 | local basename 83 | basename="$(basename -s .framework.dSYM "$source")" 84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 85 | 86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 88 | strip_invalid_archs "$binary" 89 | fi 90 | 91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 92 | # Move the stripped file into its final destination. 93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 95 | else 96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 98 | fi 99 | fi 100 | } 101 | 102 | # Signs a framework with the provided identity 103 | code_sign_if_enabled() { 104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 105 | # Use the current code_sign_identitiy 106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 108 | 109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 110 | code_sign_cmd="$code_sign_cmd &" 111 | fi 112 | echo "$code_sign_cmd" 113 | eval "$code_sign_cmd" 114 | fi 115 | } 116 | 117 | # Strip invalid architectures 118 | strip_invalid_archs() { 119 | binary="$1" 120 | # Get architectures for current target binary 121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 122 | # Intersect them with the architectures we are building for 123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 124 | # If there are no archs supported by this binary then warn the user 125 | if [[ -z "$intersected_archs" ]]; then 126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 127 | STRIP_BINARY_RETVAL=0 128 | return 129 | fi 130 | stripped="" 131 | for arch in $binary_archs; do 132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 133 | # Strip non-valid architectures in-place 134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 135 | stripped="$stripped $arch" 136 | fi 137 | done 138 | if [[ "$stripped" ]]; then 139 | echo "Stripped $binary of architectures:$stripped" 140 | fi 141 | STRIP_BINARY_RETVAL=1 142 | } 143 | 144 | 145 | if [[ "$CONFIGURATION" == "Debug" ]]; then 146 | install_framework "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework" 147 | fi 148 | if [[ "$CONFIGURATION" == "Release" ]]; then 149 | install_framework "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework" 150 | fi 151 | if [[ "$CONFIGURATION" == "Profile" ]]; then 152 | install_framework "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework" 153 | fi 154 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 155 | wait 156 | fi 157 | -------------------------------------------------------------------------------- /ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 61 | ;; 62 | *.xib) 63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 115 | else 116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../.symlinks/flutter/ios" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Flutter" "${PODS_ROOT}/Headers/Public/shared_preferences" 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/shared_preferences" 6 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Flutter" -isystem "${PODS_ROOT}/Headers/Public/shared_preferences" 7 | OTHER_LDFLAGS = $(inherited) -ObjC -l"shared_preferences" -framework "Flutter" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../.symlinks/flutter/ios" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Flutter" "${PODS_ROOT}/Headers/Public/shared_preferences" 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/shared_preferences" 6 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Flutter" -isystem "${PODS_ROOT}/Headers/Public/shared_preferences" 7 | OTHER_LDFLAGS = $(inherited) -ObjC -l"shared_preferences" -framework "Flutter" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../.symlinks/flutter/ios" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Flutter" "${PODS_ROOT}/Headers/Public/shared_preferences" 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/shared_preferences" 6 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Flutter" -isystem "${PODS_ROOT}/Headers/Public/shared_preferences" 7 | OTHER_LDFLAGS = $(inherited) -ObjC -l"shared_preferences" -framework "Flutter" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /ios/Pods/Target Support Files/shared_preferences/shared_preferences-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_shared_preferences : NSObject 3 | @end 4 | @implementation PodsDummy_shared_preferences 5 | @end 6 | -------------------------------------------------------------------------------- /ios/Pods/Target Support Files/shared_preferences/shared_preferences-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /ios/Pods/Target Support Files/shared_preferences/shared_preferences.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/shared_preferences 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../.symlinks/flutter/ios" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/shared_preferences" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Flutter" "${PODS_ROOT}/Headers/Public/shared_preferences" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.symlinks/plugins/shared_preferences/ios 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcuserdata/maochaolong041.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner.xcworkspace/xcuserdata/maochaolong041.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mm2qq/flutter_movie/eaabe3d59b4a755ef1451f6ccf45d7e8b6d5d1fe/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/GeneratedPluginRegistrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | #ifndef GeneratedPluginRegistrant_h 6 | #define GeneratedPluginRegistrant_h 7 | 8 | #import 9 | 10 | @interface GeneratedPluginRegistrant : NSObject 11 | + (void)registerWithRegistry:(NSObject*)registry; 12 | @end 13 | 14 | #endif /* GeneratedPluginRegistrant_h */ 15 | -------------------------------------------------------------------------------- /ios/Runner/GeneratedPluginRegistrant.m: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | #import "GeneratedPluginRegistrant.h" 6 | #import 7 | 8 | @implementation GeneratedPluginRegistrant 9 | 10 | + (void)registerWithRegistry:(NSObject*)registry { 11 | [FLTSharedPreferencesPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTSharedPreferencesPlugin"]]; 12 | } 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | 巧巧的电影 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | flutter_movie 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/ServiceDefinitions.json: -------------------------------------------------------------------------------- 1 | {"services":[]} -------------------------------------------------------------------------------- /lib/api/douban_api.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | import 'dart:io'; 4 | 5 | import '../models/list_result.dart'; 6 | import '../models/movie.dart'; 7 | import '../models/ranking_list_type.dart'; 8 | import '../models/ranking_result.dart'; 9 | import '../models/works_result.dart'; 10 | 11 | class DoubanAPI { 12 | static const String baseUrl = 'api.douban.com'; 13 | 14 | static const String apiKey = '0b2bdeda43b5688921839c8ecb20399b'; 15 | 16 | final _httpClient = HttpClient(); 17 | 18 | /// 获取排行榜数据 19 | /// 20 | /// [type] 排行榜类型, 默认`RankingListType.inTheaters` 21 | /// [start] 起始索引, 默认`0` 22 | /// [count] 单页大小, 默认`20` 23 | Future rankingList( 24 | {RankingListType type: RankingListType.inTheaters, 25 | int start: 0, 26 | int count: 20}) async { 27 | final _typeString = _rankingListTypeString(type); 28 | 29 | final _uri = Uri.https( 30 | baseUrl, 31 | 'v2/movie/$_typeString', 32 | { 33 | 'apikey': apiKey, 34 | 'start': '$start', 35 | 'count': '$count', 36 | }, 37 | ); 38 | 39 | final _response = await _getRequest(_uri); 40 | 41 | final _list = 42 | (type == RankingListType.weekly || type == RankingListType.usBox) 43 | ? RankingResult.fromJSON(json.decode(_response)) 44 | : ListResult.fromJSON(json.decode(_response)); 45 | 46 | return _list; 47 | } 48 | 49 | /// 获取影片详情 50 | /// 51 | /// [id] 影片ID 52 | Future movie(String id) async { 53 | final _uri = Uri.https( 54 | baseUrl, 55 | 'v2/movie/subject/$id', 56 | { 57 | 'apikey': apiKey, 58 | }, 59 | ); 60 | 61 | final _response = await _getRequest(_uri); 62 | final _movie = Movie.fromJSON(json.decode(_response)); 63 | 64 | return _movie; 65 | } 66 | 67 | /// 获取影人作品 68 | /// 69 | /// [id] 影人ID 70 | /// [start] 起始索引, 默认`0` 71 | /// [count] 单页大小, 默认`20` 72 | Future worksList(String id, 73 | {int start: 0, int count: 20}) async { 74 | final _uri = Uri.https( 75 | baseUrl, 76 | 'v2/movie/celebrity/$id/works', 77 | { 78 | 'apikey': apiKey, 79 | 'start': '$start', 80 | 'count': '$count', 81 | }, 82 | ); 83 | 84 | final _response = await _getRequest(_uri); 85 | final _list = WorksResult.fromJSON(json.decode(_response)); 86 | 87 | return _list; 88 | } 89 | 90 | /// 获取搜索结果列表 91 | /// 92 | /// [query] 查询关键字 93 | /// [start] 起始索引, 默认`0` 94 | /// [count] 单页大小, 默认`20` 95 | Future searchList(String query, 96 | {int start: 0, int count: 20}) async { 97 | final _uri = Uri.https( 98 | baseUrl, 99 | 'v2/movie/search', 100 | { 101 | 'apikey': apiKey, 102 | 'q': '$query', 103 | 'start': '$start', 104 | 'count': '$count', 105 | }, 106 | ); 107 | 108 | final _response = await _getRequest(_uri); 109 | final _list = ListResult.fromJSON(json.decode(_response)); 110 | 111 | return _list; 112 | } 113 | 114 | String _rankingListTypeString(RankingListType type) { 115 | String _typeString; 116 | 117 | switch (type) { 118 | case RankingListType.inTheaters: 119 | _typeString = 'in_theaters'; 120 | break; 121 | case RankingListType.comingSoon: 122 | _typeString = 'coming_soon'; 123 | break; 124 | case RankingListType.top250: 125 | _typeString = 'top250'; 126 | break; 127 | case RankingListType.weekly: 128 | _typeString = 'weekly'; 129 | break; 130 | case RankingListType.usBox: 131 | _typeString = 'us_box'; 132 | break; 133 | case RankingListType.newMovies: 134 | _typeString = 'new_movies'; 135 | break; 136 | } 137 | 138 | return _typeString; 139 | } 140 | 141 | Future _getRequest(Uri uri) async { 142 | final _request = await _httpClient.getUrl(uri); 143 | final _response = await _request.close(); 144 | 145 | return _response.transform(utf8.decoder).join(); 146 | } 147 | } 148 | 149 | DoubanAPI api = DoubanAPI(); 150 | -------------------------------------------------------------------------------- /lib/blocs/bloc_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | 3 | Type _typeOf() => T; 4 | 5 | abstract class BlocBase { 6 | @protected 7 | void dispose(); 8 | } 9 | 10 | class BlocProvider extends StatefulWidget { 11 | BlocProvider({ 12 | Key key, 13 | @required this.child, 14 | @required this.blocs, 15 | }) : super( 16 | key: key, 17 | ); 18 | 19 | final Widget child; 20 | 21 | final List blocs; 22 | 23 | @override 24 | _BlocProviderState createState() => _BlocProviderState(); 25 | 26 | static List of(BuildContext context) { 27 | final _type = _typeOf<_BlocProviderInherited>(); 28 | _BlocProviderInherited _provider = 29 | context.ancestorInheritedElementForWidgetOfExactType(_type)?.widget; 30 | return _provider?.blocs; 31 | } 32 | } 33 | 34 | class _BlocProviderState extends State> { 35 | @override 36 | Widget build(BuildContext context) { 37 | return _BlocProviderInherited( 38 | blocs: widget.blocs, 39 | child: widget.child, 40 | ); 41 | } 42 | 43 | @override 44 | void dispose() { 45 | widget.blocs.map((bloc) { 46 | bloc.dispose(); 47 | }); 48 | super.dispose(); 49 | } 50 | } 51 | 52 | class _BlocProviderInherited extends InheritedWidget { 53 | _BlocProviderInherited({ 54 | Key key, 55 | @required Widget child, 56 | @required this.blocs, 57 | }) : super( 58 | key: key, 59 | child: child, 60 | ); 61 | 62 | final List blocs; 63 | 64 | @override 65 | bool updateShouldNotify(_BlocProviderInherited oldWidget) => false; 66 | } 67 | -------------------------------------------------------------------------------- /lib/blocs/favorite_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:rxdart/rxdart.dart'; 2 | import 'package:shared_preferences/shared_preferences.dart'; 3 | 4 | import 'bloc_provider.dart'; 5 | 6 | /// 收藏回调码 7 | enum FavoriteOperationCode { 8 | /// 收藏成功 9 | addSuccess, 10 | 11 | /// 收藏失败 12 | addFailure, 13 | 14 | /// 取消收藏成功 15 | removeSuccess, 16 | 17 | /// 取消收藏失败 18 | removeFailure, 19 | } 20 | 21 | class FavoriteBloc extends BlocBase { 22 | FavoriteBloc() { 23 | SharedPreferences.getInstance().then((preferences) { 24 | final _list = preferences.getStringList(favoriteListKey); 25 | 26 | _totalController.add(_list.length); 27 | _favoriteController.add(_list); 28 | }); 29 | } 30 | 31 | static const String favoriteListKey = 'kFavoriteListKey'; 32 | 33 | final _favoriteController = ReplaySubject>(maxSize: 1); 34 | 35 | final _totalController = ReplaySubject(maxSize: 1); 36 | 37 | get favoriteList => _favoriteController.stream; 38 | 39 | get total => _totalController.stream; 40 | 41 | Future> update(String info) async { 42 | if (info.isEmpty) { 43 | return { 44 | FavoriteOperationCode.addFailure: 45 | _operationCodeString(FavoriteOperationCode.addFailure), 46 | }; 47 | } 48 | 49 | final _preferences = await SharedPreferences.getInstance(); 50 | 51 | var _list = _preferences.getStringList(favoriteListKey); 52 | 53 | if (_list == null) { 54 | _list = []; 55 | } 56 | 57 | final contains = _list.contains(info); 58 | 59 | if (contains) { 60 | _list.remove(info); 61 | } else { 62 | _list.add(info); 63 | } 64 | 65 | final _success = await _preferences.setStringList(favoriteListKey, _list); 66 | 67 | if (_success) { 68 | _reload(); 69 | } 70 | 71 | return contains 72 | ? (_success 73 | ? { 74 | FavoriteOperationCode.removeSuccess: 75 | _operationCodeString(FavoriteOperationCode.removeSuccess), 76 | } 77 | : { 78 | FavoriteOperationCode.removeFailure: 79 | _operationCodeString(FavoriteOperationCode.removeFailure), 80 | }) 81 | : (_success 82 | ? { 83 | FavoriteOperationCode.addSuccess: 84 | _operationCodeString(FavoriteOperationCode.addSuccess), 85 | } 86 | : { 87 | FavoriteOperationCode.addFailure: 88 | _operationCodeString(FavoriteOperationCode.addFailure), 89 | }); 90 | } 91 | 92 | Future _reload() async { 93 | final _preferences = await SharedPreferences.getInstance(); 94 | final _list = _preferences.getStringList(favoriteListKey); 95 | 96 | _totalController.add(_list.length); 97 | _favoriteController.add(_list); 98 | } 99 | 100 | String _operationCodeString(FavoriteOperationCode code) { 101 | String _codeString; 102 | 103 | switch (code) { 104 | case FavoriteOperationCode.addSuccess: 105 | _codeString = '收藏成功'; 106 | break; 107 | case FavoriteOperationCode.addFailure: 108 | _codeString = '收藏失败'; 109 | break; 110 | case FavoriteOperationCode.removeSuccess: 111 | _codeString = '取消收藏成功'; 112 | break; 113 | case FavoriteOperationCode.removeFailure: 114 | _codeString = '取消收藏失败'; 115 | break; 116 | } 117 | 118 | return _codeString; 119 | } 120 | 121 | @override 122 | void dispose() { 123 | _favoriteController.close(); 124 | _totalController.close(); 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /lib/blocs/favorite_list_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:rxdart/rxdart.dart'; 2 | import 'package:shared_preferences/shared_preferences.dart'; 3 | 4 | import 'bloc_provider.dart'; 5 | 6 | /// 收藏回调码 7 | enum FavoriteOperationCode { 8 | /// 收藏成功 9 | addSuccess, 10 | 11 | /// 收藏失败 12 | addFailure, 13 | 14 | /// 取消收藏成功 15 | removeSuccess, 16 | 17 | /// 取消收藏失败 18 | removeFailure, 19 | } 20 | 21 | class FavoriteListBloc extends BlocBase { 22 | FavoriteListBloc() { 23 | SharedPreferences.getInstance().then((preferences) { 24 | final _list = preferences.getStringList(favoriteListKey); 25 | 26 | _totalController.add(_list.length); 27 | _favoriteController.add(_list); 28 | }); 29 | } 30 | 31 | static String favoriteListKey = 'kFavoriteListKey'; 32 | 33 | final _favoriteController = ReplaySubject>(maxSize: 1); 34 | 35 | get favoriteList => _favoriteController.stream; 36 | 37 | final _totalController = ReplaySubject(maxSize: 1); 38 | 39 | get total => _totalController.stream; 40 | 41 | Future add(String info) async { 42 | if (info.isEmpty) { 43 | return FavoriteOperationCode.addFailure; 44 | } 45 | 46 | final _preferences = await SharedPreferences.getInstance(); 47 | 48 | var _list = _preferences.getStringList(favoriteListKey); 49 | 50 | if (_list == null) { 51 | _list = []; 52 | } 53 | 54 | final contains = _list.contains(info); 55 | 56 | if (contains) { 57 | _list.remove(info); 58 | } else { 59 | _list.add(info); 60 | } 61 | 62 | final _success = await _preferences.setStringList(favoriteListKey, _list); 63 | 64 | if (_success) { 65 | _reload(); 66 | } 67 | 68 | return contains 69 | ? (_success 70 | ? FavoriteOperationCode.removeSuccess 71 | : FavoriteOperationCode.removeFailure) 72 | : (_success 73 | ? FavoriteOperationCode.addSuccess 74 | : FavoriteOperationCode.addFailure); 75 | } 76 | 77 | Future _reload() async { 78 | final _preferences = await SharedPreferences.getInstance(); 79 | final _list = _preferences.getStringList(favoriteListKey); 80 | 81 | _totalController.add(_list.length); 82 | _favoriteController.add(_list); 83 | } 84 | 85 | void dispose() { 86 | _favoriteController.close(); 87 | _totalController.close(); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /lib/blocs/home_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:rxdart/rxdart.dart'; 2 | 3 | import '../api/douban_api.dart'; 4 | import '../models/list_result.dart'; 5 | import '../models/movie.dart'; 6 | import '../models/ranking_list_type.dart'; 7 | import '../models/ranking_result.dart'; 8 | import 'bloc_provider.dart'; 9 | 10 | class HomeBloc implements BlocBase { 11 | HomeBloc( 12 | this.type, 13 | this.countPerPage, 14 | ) { 15 | _startController.stream 16 | .bufferTime(Duration(microseconds: 500)) 17 | .where((batch) => batch.isNotEmpty) 18 | .distinct() 19 | .listen(_handleStarts); 20 | } 21 | 22 | /// 排行榜类型 23 | final RankingListType type; 24 | 25 | /// 单页大小 26 | final int countPerPage; 27 | 28 | /// 已拉取列表 29 | final _fetchedList = []; 30 | 31 | /// 已拉取位置索引 32 | final _fetchedStarts = Set(); 33 | 34 | /// 总条数 35 | int total = 0; 36 | 37 | final _rankingController = PublishSubject>(); 38 | 39 | final _startController = PublishSubject(); 40 | 41 | get _rankingList => _rankingController.sink; 42 | 43 | get rankingList => _rankingController.stream; 44 | 45 | void add(int start) { 46 | if (start < total) { 47 | _startController.sink.add(start); 48 | } else { 49 | _startController.sink.add(0); 50 | } 51 | } 52 | 53 | void _handleStarts(List starts) { 54 | starts.forEach((int start) { 55 | if (_fetchedStarts.contains(start)) { 56 | _rankingList.add(_fetchedList); 57 | } else { 58 | _fetchedStarts.add(start); 59 | 60 | api.rankingList(type: type, start: start, count: countPerPage).then( 61 | (result) => result is RankingResult 62 | ? _handleRankingList(result, start) 63 | : _handleList(result, start)); 64 | } 65 | }); 66 | } 67 | 68 | void _handleRankingList(RankingResult result, int start) { 69 | if (result.rankings.length > 0) { 70 | total = result.rankings.length; 71 | result.rankings.forEach((movieRanking) { 72 | _fetchedList.add(movieRanking.subject); 73 | }); 74 | _rankingList.add(_fetchedList); 75 | } 76 | } 77 | 78 | void _handleList(ListResult result, int start) { 79 | if (result.movies.length > 0) { 80 | total = type == RankingListType.newMovies 81 | ? result.movies.length 82 | : result.total; 83 | _fetchedList.addAll(result.movies); 84 | _rankingList.add(_fetchedList); 85 | } 86 | } 87 | 88 | @override 89 | void dispose() { 90 | _rankingController.close(); 91 | _startController.close(); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /lib/blocs/movie_details_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:rxdart/rxdart.dart'; 2 | 3 | import '../api/douban_api.dart'; 4 | import '../models/movie.dart'; 5 | import 'bloc_provider.dart'; 6 | 7 | class MovieDetailsBloc extends BlocBase { 8 | MovieDetailsBloc( 9 | this.id, 10 | ) { 11 | api.movie(id).then((Movie details) { 12 | _detailsController.add(details); 13 | }); 14 | } 15 | 16 | final String id; 17 | 18 | final _detailsController = ReplaySubject(maxSize: 1); 19 | 20 | get details => _detailsController.stream; 21 | 22 | @override 23 | void dispose() { 24 | _detailsController.close(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/blocs/search_list_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:rxdart/rxdart.dart'; 2 | 3 | import '../api/douban_api.dart'; 4 | import '../models/list_result.dart'; 5 | import '../models/movie.dart'; 6 | import 'bloc_provider.dart'; 7 | 8 | class SearchListBloc implements BlocBase { 9 | SearchListBloc( 10 | this.query, 11 | this.countPerPage, 12 | ) { 13 | _startController.stream 14 | .bufferTime(Duration(microseconds: 500)) 15 | .where((batch) => batch.isNotEmpty) 16 | .distinct() 17 | .listen(_handleStarts); 18 | } 19 | 20 | /// 查询关键字 21 | final String query; 22 | 23 | /// 单页大小 24 | final int countPerPage; 25 | 26 | /// 已拉取列表 27 | final _fetchedList = []; 28 | 29 | /// 已拉取位置索引 30 | final _fetchedStarts = Set(); 31 | 32 | final _searchController = PublishSubject>(); 33 | 34 | final _startController = PublishSubject(); 35 | 36 | final _totalController = ReplaySubject(maxSize: 1); 37 | 38 | get _searchList => _searchController.sink; 39 | 40 | get searchList => _searchController.stream; 41 | 42 | get total => _totalController.stream; 43 | 44 | void add(int start) { 45 | _startController.sink.add(start); 46 | } 47 | 48 | void _handleStarts(List starts) { 49 | starts.forEach((int start) { 50 | if (!_fetchedStarts.contains(start)) { 51 | _fetchedStarts.add(start); 52 | 53 | api 54 | .searchList(query, start: start, count: countPerPage) 55 | .then((ListResult result) => _handleSearchList(result, start)); 56 | } 57 | }); 58 | } 59 | 60 | void _handleSearchList(ListResult result, int start) { 61 | if (result.movies.length > 0) { 62 | _totalController.add(result.total); 63 | _fetchedList.addAll(result.movies); 64 | _searchList.add(_fetchedList); 65 | } 66 | } 67 | 68 | @override 69 | void dispose() { 70 | _searchController.close(); 71 | _startController.close(); 72 | _totalController.close(); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /lib/blocs/tab_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:rxdart/rxdart.dart'; 2 | 3 | import 'bloc_provider.dart'; 4 | 5 | class TabBloc implements BlocBase { 6 | TabBloc( 7 | this.tabs, 8 | ) { 9 | _tabController.add(tabs); 10 | } 11 | 12 | final List tabs; 13 | 14 | final _tabController = ReplaySubject>(maxSize: 1); 15 | 16 | get tabList => _tabController.stream; 17 | 18 | @override 19 | void dispose() { 20 | _tabController.close(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/blocs/works_list_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:rxdart/rxdart.dart'; 2 | 3 | import '../api/douban_api.dart'; 4 | import '../models/movie.dart'; 5 | import '../models/works_result.dart'; 6 | import 'bloc_provider.dart'; 7 | 8 | class WorksListBloc implements BlocBase { 9 | WorksListBloc( 10 | this.id, 11 | this.countPerPage, 12 | ) { 13 | _startController.stream 14 | .bufferTime(Duration(microseconds: 500)) 15 | .where((batch) => batch.isNotEmpty) 16 | .distinct() 17 | .listen(_handleStarts); 18 | } 19 | 20 | /// 影人ID 21 | final String id; 22 | 23 | /// 单页大小 24 | final int countPerPage; 25 | 26 | /// 已拉取列表 27 | final _fetchedList = []; 28 | 29 | /// 已拉取位置索引 30 | final _fetchedStarts = Set(); 31 | 32 | final _worksController = PublishSubject>(); 33 | 34 | final _startController = PublishSubject(); 35 | 36 | final _totalController = ReplaySubject(maxSize: 1); 37 | 38 | get _worksList => _worksController.sink; 39 | 40 | get worksList => _worksController.stream; 41 | 42 | get total => _totalController.stream; 43 | 44 | void add(int start) { 45 | _startController.sink.add(start); 46 | } 47 | 48 | void _handleStarts(List starts) { 49 | starts.forEach((int start) { 50 | if (!_fetchedStarts.contains(start)) { 51 | _fetchedStarts.add(start); 52 | 53 | api 54 | .worksList(id, start: start, count: countPerPage) 55 | .then((WorksResult result) => _handleWorksList(result, start)); 56 | } 57 | }); 58 | } 59 | 60 | void _handleWorksList(WorksResult result, int start) { 61 | if (result.worksList.length > 0) { 62 | _totalController.add(result.total); 63 | result.worksList.forEach((works) { 64 | _fetchedList.add(works.movie); 65 | }); 66 | _worksList.add(_fetchedList); 67 | } 68 | } 69 | 70 | @override 71 | void dispose() { 72 | _worksController.close(); 73 | _startController.close(); 74 | _totalController.close(); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/cupertino.dart'; 4 | 5 | import 'blocs/bloc_provider.dart'; 6 | import 'blocs/favorite_bloc.dart'; 7 | import 'blocs/home_bloc.dart'; 8 | import 'blocs/tab_bloc.dart'; 9 | import 'models/ranking_list_type.dart'; 10 | import 'pages/home.dart'; 11 | import 'routes/routes.dart'; 12 | 13 | Future main() async { 14 | Routes.configRoutes(); 15 | 16 | return runApp( 17 | BlocProvider( 18 | child: MyApp(), 19 | blocs: [ 20 | FavoriteBloc(), 21 | ], 22 | ), 23 | ); 24 | } 25 | 26 | class MyApp extends StatelessWidget { 27 | @override 28 | Widget build(BuildContext context) { 29 | return CupertinoApp( 30 | home: BlocProvider( 31 | child: BlocProvider( 32 | child: HomePage(), 33 | blocs: [ 34 | HomeBloc(RankingListType.inTheaters, 20), 35 | HomeBloc(RankingListType.comingSoon, 20), 36 | HomeBloc(RankingListType.top250, 20), 37 | HomeBloc(RankingListType.weekly, 20), 38 | HomeBloc(RankingListType.usBox, 20), 39 | HomeBloc(RankingListType.newMovies, 20), 40 | ], 41 | ), 42 | blocs: [ 43 | TabBloc([ 44 | 'TOP250', 45 | '口碑榜', 46 | '北美榜', 47 | '新片榜', 48 | ]) 49 | ], 50 | ), 51 | ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /lib/models/list_result.dart: -------------------------------------------------------------------------------- 1 | import 'movie.dart'; 2 | 3 | class ListResult { 4 | final int count; 5 | final int start; 6 | final int total; 7 | final List movies; 8 | final String title; 9 | 10 | ListResult.fromJSON(Map json) 11 | : count = json['count'], 12 | start = json['start'], 13 | total = json['total'], 14 | movies = (json['subjects'] as List) 15 | .map((json) => Movie.fromJSON(json)) 16 | .toList(), 17 | title = json['title']; 18 | } 19 | -------------------------------------------------------------------------------- /lib/models/movie.dart: -------------------------------------------------------------------------------- 1 | import 'video.dart'; 2 | 3 | class MovieRating { 4 | final int max; 5 | final int min; 6 | final num average; 7 | final String stars; 8 | final Map details; 9 | 10 | MovieRating({ 11 | this.max, 12 | this.min, 13 | this.average, 14 | this.stars, 15 | this.details, 16 | }); 17 | 18 | MovieRating.fromJSON(Map json) 19 | : max = json['max'], 20 | min = json['min'], 21 | average = json['average'], 22 | stars = json['stars'], 23 | details = Map.from(json['details']); 24 | } 25 | 26 | class MovieMember { 27 | final String id; 28 | final String name; 29 | final String originName; 30 | final String alt; 31 | final Map avatars; 32 | 33 | MovieMember({ 34 | this.id, 35 | this.name, 36 | this.originName, 37 | this.alt, 38 | this.avatars, 39 | }); 40 | 41 | MovieMember.fromJSON(Map json) 42 | : id = json['id'], 43 | name = json['name'], 44 | originName = json['name_en'], 45 | alt = json['alt'], 46 | avatars = json['avatars']; 47 | } 48 | 49 | class Movie { 50 | final String id; 51 | final String title; 52 | final String originTitle; 53 | final String subType; 54 | final bool hasVideo; 55 | final MovieRating rating; 56 | final String summary; 57 | 58 | final List genres; 59 | final Map images; 60 | final List casts; 61 | final List