增加flutter-redux-remote-devtools
| New file |
| | |
| | | |
| | | # Created by https://www.gitignore.io/api/vim,code,dart |
| | | |
| | | ### Code ### |
| | | # Visual Studio Code - https://code.visualstudio.com/ |
| | | .settings/ |
| | | .vscode/ |
| | | tsconfig.json |
| | | jsconfig.json |
| | | |
| | | ### Dart ### |
| | | # See https://www.dartlang.org/guides/libraries/private-files |
| | | |
| | | # Files and directories created by pub |
| | | .dart_tool/ |
| | | .packages |
| | | build/ |
| | | # If you're building an application, you may want to check-in your pubspec.lock |
| | | pubspec.lock |
| | | |
| | | # Directory created by dartdoc |
| | | # If you don't generate documentation locally you can remove this line. |
| | | doc/api/ |
| | | |
| | | # Avoid committing generated Javascript files: |
| | | *.dart.js |
| | | *.info.json # Produced by the --dump-info flag. |
| | | *.js # When generated by dart2js. Don't specify *.js if your |
| | | # project includes source files written in JavaScript. |
| | | *.js_ |
| | | *.js.deps |
| | | *.js.map |
| | | |
| | | ### Vim ### |
| | | # Swap |
| | | [._]*.s[a-v][a-z] |
| | | [._]*.sw[a-p] |
| | | [._]s[a-rt-v][a-z] |
| | | [._]ss[a-gi-z] |
| | | [._]sw[a-p] |
| | | |
| | | # Session |
| | | Session.vim |
| | | |
| | | # Temporary |
| | | .netrwhist |
| | | *~ |
| | | # Auto-generated tag files |
| | | tags |
| | | # Persistent undo |
| | | [._]*.un~ |
| | | |
| | | |
| | | # End of https://www.gitignore.io/api/vim,code,dart |
| New file |
| | |
| | | language: dart |
| | | install: |
| | | - gem install coveralls-lcov |
| | | script: ./tool/travis.sh |
| | | after_success: |
| | | - coveralls-lcov var/lcov.info |
| | | env: |
| | | - DARTANALYZER_FLAGS=--fatal-warnings |
| New file |
| | |
| | | # Redux Remote Devtools |
| | | |
| | | ## 0.0.5 |
| | | |
| | | - Send current state to devtools on connect |
| | | |
| | | ## 0.0.4 |
| | | |
| | | - Update Documentation |
| | | |
| | | ## 0.0.3 |
| | | |
| | | - Specify minimum version of socketcluster_client |
| | | |
| | | ## 0.0.2 |
| | | |
| | | - Use socketcluster_client from pub. |
| | | |
| | | ## 0.0.1 - Initial Release |
| New file |
| | |
| | | MIT License |
| | | |
| | | Copyright (c) 2018 Michael Marner |
| | | |
| | | Permission is hereby granted, free of charge, to any person obtaining a copy |
| | | of this software and associated documentation files (the "Software"), to deal |
| | | in the Software without restriction, including without limitation the rights |
| | | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| | | copies of the Software, and to permit persons to whom the Software is |
| | | furnished to do so, subject to the following conditions: |
| | | |
| | | The above copyright notice and this permission notice shall be included in all |
| | | copies or substantial portions of the Software. |
| | | |
| | | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| | | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| | | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| | | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| | | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| | | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| | | SOFTWARE. |
| New file |
| | |
| | | # Redux Remote Devtools for Dart and Flutter |
| | | |
| | | [](https://travis-ci.com/MichaelMarner/dart-redux-remote-devtools) [](https://coveralls.io/github/MichaelMarner/dart-redux-remote-devtools?branch=master) |
| | | |
| | | Redux Remote Devtools support for Dart and Flutter. |
| | | |
| | |  |
| | | |
| | | ## Installation |
| | | |
| | | Add the library to pubspec.yaml: |
| | | |
| | | ```yaml |
| | | dependencies: |
| | | redux-remote-devtools: ^0.0.4 |
| | | ``` |
| | | |
| | | ## Middleware configuration |
| | | |
| | | Add the middleware to your Redux configuration: |
| | | |
| | | ```dart |
| | | var remoteDevtools = RemoteDevToolsMiddleware('192.168.1.52:8000'); |
| | | await remoteDevtools.connect(); |
| | | final store = new DevToolsStore<AppState>(searchReducer, |
| | | middleware: [ |
| | | remoteDevtools, |
| | | ]); |
| | | |
| | | remoteDevtools.store = store; |
| | | ``` |
| | | |
| | | ### What's going on here? |
| | | |
| | | 1. Create a new instance of the devtools middleware. Specify the host and port to connect to. |
| | | |
| | | 1. Wait for devtools to connect to the remotedev server |
| | | |
| | | 1. Initialise your store. To take advantage of time travel, you should use a [DevToolsStore](https://pub.dartlang.org/packages/redux_dev_tools). Pass in remoteDevTools with the rest of your middlware |
| | | |
| | | 1. The middleware needs a reference to the store you just created, so commands from devtools can be dispatched. So as a final step, set the reference. |
| | | |
| | | ## Using remotedev |
| | | |
| | | Use the Javascript [Remote Devtools](https://github.com/zalmoxisus/remotedev-server) package. Start the remotedev server on your machine |
| | | |
| | | ```bash |
| | | npm install -g remotedev-server |
| | | remotedev --port 8000 |
| | | ``` |
| | | |
| | | Run your application. It will connect to the remotedev server. You can now debug your redux application by opening up `http://localhost:8000` in a web browser. |
| | | |
| | | ## Encoding Actions and State |
| | | |
| | | In the Javascript world, Redux follows a convention that your redux state is a plain Javascript Object, and actions are also Javascript objects that have a `type` property. The JS Redux Devtools expect this. However, Redux.dart tries to take advantage of the strong typing available in Dart. To make Redux.dart work with the JS devtools, we need to convert actions and state instances to JSON before sending. |
| | | |
| | | Remember that the primary reason for using devtools is to allow the developer to reason about what the app is doing. Therefore, exact conversion is not strictly necessary - it's more important for what appears in devtools to be meaningful to the developer. |
| | | |
| | | ### Enconding Strategy for Actions |
| | | |
| | | We use the class name as the action `type` for class based actions. For enum typed actions, we use the value of the action. For example: |
| | | |
| | | ```dart |
| | | enum EnumActions { |
| | | Action1; |
| | | Action2; |
| | | } |
| | | |
| | | class ClassAction {} |
| | | ``` |
| | | |
| | | When converted, these actions will be `{"type": "Action1"}` or `{"type": "ClassAction"}`, etc. |
| | | |
| | | We also want to send the action properties over to devtools. To do this, we attempt to `jsonEncode` the entire Action, and attach this JSON data as a `payload` property. For example: |
| | | |
| | | ```dart |
| | | class ClassAction { |
| | | int someValue; |
| | | |
| | | toJson() { |
| | | return {'someValue': this.someValue}; |
| | | } |
| | | } |
| | | ``` |
| | | |
| | | Would appear in devtools as: |
| | | |
| | | ```js |
| | | { |
| | | "type": "ClassAction", |
| | | "payload": { |
| | | "someValue": 5 // or whatever someValue was set to |
| | | }, |
| | | } |
| | | ``` |
| | | |
| | | This of course means your Actions need to be json encodable. You can do what the example above does and write your own `toJson` method. However, a better approach is to use a generator like [json_serializable](https://pub.dartlang.org/packages/json_serializable) to do it for you. If your action is not json encodable, the payload property will be missing in devtools. |
| | | |
| | | ### Encoding strategy for State |
| | | |
| | | For state, we simply attempt to `jsonEncode` the entire thing. If your state cannot be converted, then state updates will not appear in devtools. |
| | | |
| | | ### Overriding these strategies |
| | | |
| | | The strategy described above should work for most cases. However, if you want to do something different, you can replace the `ActionEncoder` and `StateEncoder` with your own classes: |
| | | |
| | | ```dart |
| | | var remoteDevtools = RemoteDevToolsMiddleware('192.168.1.52:8000', actionEncoder: new MyCoolActionEncoder()); |
| | | ``` |
| | | |
| | | ## Making your actions and state json encodable |
| | | |
| | | You can either write your own `toJson` methods for each of your actions and your state class. However, this quickly becomes cumbersome and error prone. Instead, the recommended way is to make use of the `json_annotation` package to automatically generate toJson functions for you. |
| | | |
| | | # Example Apps |
| | | |
| | | This repo includes remote-devtools enabled versions of the flutter-redux example apps: |
| | | |
| | | - [flutter-redux Simple Counter App](https://github.com/MichaelMarner/dart-redux-remote-devtools/tree/master/example/counter). |
| | | |
| | | - Demonstrates how enum actions are sent to devtools. |
| | | - Shows how time travel works. |
| | | |
| | | * [flutter-redux Github Search App](https://github.com/MichaelMarner/dart-redux-remote-devtools/tree/master/example/githubsearch). |
| | | |
| | | - Demonstrates how class based actions and nested state objects are serialised and made browseable in devtools |
| | | |
| | | - Demonstrates the limits of time travel in apps that use epics |
| New file |
| | |
| | | .DS_Store |
| | | .atom/ |
| | | .idea |
| | | .packages |
| | | .pub/ |
| | | build/ |
| | | ios/.generated/ |
| | | packages |
| | | pubspec.lock |
| | | .flutter-plugins |
| New file |
| | |
| | | # counter |
| | | |
| | | Redux version of the Flutter counter app. |
| | | |
| | | This is a copy of the example program from [flutter_redux](https://github.com/brianegan/flutter_redux), with additional support for Remote Devtools. |
| | | |
| | | - Uses DevToolsStore to allow time travel |
| | | - Connects to remote devtools on startup |
| | | - Sends all actions and state updates |
| | | |
| | | ## Trying it out |
| | | |
| | | 1. Get [remotedev-server](https://github.com/zalmoxisus/remotedev-server) from npm: |
| | | |
| | | npm install -g remotedev-server |
| | | |
| | | 2. Start the server |
| | | |
| | | remotedev --port 8000 |
| | | |
| | | 3. Edit `main.dart` and put in your computer's IP address or host name |
| | | |
| | | 4. Open `http://localhost:8000` in a web browser. You should see the remote-devtools window |
| | | |
| | | 5. Run the flutter app |
| | | |
| | | flutter packages get |
| | | flutter run |
| | | |
| | | 6. Hit that button, increment the counter, see the actions fly through |
| | | |
| | | 7. Use the time travel slider to move back and forth through state changes! |
| New file |
| | |
| | | *.iml |
| | | .gradle |
| | | /local.properties |
| | | /.idea/workspace.xml |
| | | /.idea/libraries |
| | | .DS_Store |
| | | /build |
| | | /captures |
| | | GeneratedPluginRegistrant.java |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <projectDescription> |
| | | <name>android</name> |
| | | <comment>Project android created by Buildship.</comment> |
| | | <projects> |
| | | </projects> |
| | | <buildSpec> |
| | | <buildCommand> |
| | | <name>org.eclipse.buildship.core.gradleprojectbuilder</name> |
| | | <arguments> |
| | | </arguments> |
| | | </buildCommand> |
| | | </buildSpec> |
| | | <natures> |
| | | <nature>org.eclipse.buildship.core.gradleprojectnature</nature> |
| | | </natures> |
| | | </projectDescription> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <classpath> |
| | | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/> |
| | | <classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/> |
| | | <classpathentry kind="output" path="bin"/> |
| | | </classpath> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <projectDescription> |
| | | <name>app</name> |
| | | <comment>Project app created by Buildship.</comment> |
| | | <projects> |
| | | </projects> |
| | | <buildSpec> |
| | | <buildCommand> |
| | | <name>org.eclipse.jdt.core.javabuilder</name> |
| | | <arguments> |
| | | </arguments> |
| | | </buildCommand> |
| | | <buildCommand> |
| | | <name>org.eclipse.buildship.core.gradleprojectbuilder</name> |
| | | <arguments> |
| | | </arguments> |
| | | </buildCommand> |
| | | </buildSpec> |
| | | <natures> |
| | | <nature>org.eclipse.jdt.core.javanature</nature> |
| | | <nature>org.eclipse.buildship.core.gradleprojectnature</nature> |
| | | </natures> |
| | | </projectDescription> |
| New file |
| | |
| | | def localProperties = new Properties() |
| | | def localPropertiesFile = rootProject.file('local.properties') |
| | | if (localPropertiesFile.exists()) { |
| | | localPropertiesFile.withInputStream { stream -> |
| | | localProperties.load(stream) |
| | | } |
| | | } |
| | | |
| | | def flutterRoot = localProperties.getProperty('flutter.sdk') |
| | | if (flutterRoot == null) { |
| | | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") |
| | | } |
| | | |
| | | apply plugin: 'com.android.application' |
| | | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" |
| | | |
| | | android { |
| | | compileSdkVersion 25 |
| | | buildToolsVersion '25.0.3' |
| | | |
| | | lintOptions { |
| | | disable 'InvalidPackage' |
| | | } |
| | | |
| | | defaultConfig { |
| | | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). |
| | | applicationId "com.yourcompany.example" |
| | | minSdkVersion 16 |
| | | targetSdkVersion 25 |
| | | versionCode 1 |
| | | versionName "1.0" |
| | | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
| | | } |
| | | |
| | | buildTypes { |
| | | release { |
| | | // TODO: Add your own signing config for the release build. |
| | | // Signing with the debug keys for now, so `flutter run --release` works. |
| | | signingConfig signingConfigs.debug |
| | | } |
| | | } |
| | | } |
| | | |
| | | flutter { |
| | | source '../..' |
| | | } |
| | | |
| | | dependencies { |
| | | androidTestCompile 'com.android.support:support-annotations:25.4.0' |
| | | androidTestCompile 'com.android.support.test:runner:0.5' |
| | | androidTestCompile 'com.android.support.test:rules:0.5' |
| | | } |
| New file |
| | |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
| | | package="com.yourcompany.example"> |
| | | |
| | | <!-- The INTERNET permission is required for development. Specifically, |
| | | flutter needs it to communicate with the running application |
| | | to allow setting breakpoints, to provide hot reload, etc. |
| | | --> |
| | | <uses-permission android:name="android.permission.INTERNET"/> |
| | | |
| | | <!-- io.flutter.app.FlutterApplication is an android.app.Application that |
| | | calls FlutterMain.startInitialization(this); in its onCreate method. |
| | | In most cases you can leave this as-is, but you if you want to provide |
| | | additional functionality it is fine to subclass or reimplement |
| | | FlutterApplication and put your custom class here. --> |
| | | <application |
| | | android:name="io.flutter.app.FlutterApplication" |
| | | android:label="example" |
| | | android:icon="@mipmap/ic_launcher"> |
| | | <activity |
| | | android:name=".MainActivity" |
| | | android:launchMode="singleTop" |
| | | android:theme="@style/LaunchTheme" |
| | | android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection" |
| | | android:hardwareAccelerated="true" |
| | | android:windowSoftInputMode="adjustResize"> |
| | | <!-- This keeps the window background of the activity showing |
| | | until Flutter renders its first frame. It can be removed if |
| | | there is no splash screen (such as the default splash screen |
| | | defined in @style/LaunchTheme). --> |
| | | <meta-data |
| | | android:name="io.flutter.app.android.SplashScreenUntilFirstFrame" |
| | | android:value="true" /> |
| | | <intent-filter> |
| | | <action android:name="android.intent.action.MAIN"/> |
| | | <category android:name="android.intent.category.LAUNCHER"/> |
| | | </intent-filter> |
| | | </activity> |
| | | </application> |
| | | </manifest> |
| New file |
| | |
| | | package com.yourcompany.example; |
| | | |
| | | import android.os.Bundle; |
| | | |
| | | import io.flutter.app.FlutterActivity; |
| | | import io.flutter.plugins.GeneratedPluginRegistrant; |
| | | |
| | | public class MainActivity extends FlutterActivity { |
| | | @Override |
| | | protected void onCreate(Bundle savedInstanceState) { |
| | | super.onCreate(savedInstanceState); |
| | | GeneratedPluginRegistrant.registerWith(this); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <!-- Modify this file to customize your launch splash screen --> |
| | | <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <item android:drawable="@android:color/white" /> |
| | | |
| | | <!-- You can insert your own image assets here --> |
| | | <!-- <item> |
| | | <bitmap |
| | | android:gravity="center" |
| | | android:src="@mipmap/launch_image" /> |
| | | </item> --> |
| | | </layer-list> |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <resources> |
| | | <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> |
| | | <!-- Show a splash screen on the activity. Automatically removed when |
| | | Flutter draws its first frame --> |
| | | <item name="android:windowBackground">@drawable/launch_background</item> |
| | | </style> |
| | | </resources> |
| New file |
| | |
| | | buildscript { |
| | | repositories { |
| | | jcenter() |
| | | maven { |
| | | url "https://maven.google.com" |
| | | } |
| | | } |
| | | |
| | | dependencies { |
| | | classpath 'com.android.tools.build:gradle:2.3.3' |
| | | } |
| | | } |
| | | |
| | | allprojects { |
| | | repositories { |
| | | jcenter() |
| | | maven { |
| | | url "https://maven.google.com" |
| | | } |
| | | } |
| | | } |
| | | |
| | | rootProject.buildDir = '../build' |
| | | subprojects { |
| | | project.buildDir = "${rootProject.buildDir}/${project.name}" |
| | | project.evaluationDependsOn(':app') |
| | | } |
| | | |
| | | task clean(type: Delete) { |
| | | delete rootProject.buildDir |
| | | } |
| New file |
| | |
| | | org.gradle.jvmargs=-Xmx1536M |
| New file |
| | |
| | | #Fri Jun 23 08:50:38 CEST 2017 |
| | | distributionBase=GRADLE_USER_HOME |
| | | distributionPath=wrapper/dists |
| | | zipStoreBase=GRADLE_USER_HOME |
| | | zipStorePath=wrapper/dists |
| | | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip |
| New file |
| | |
| | | #!/usr/bin/env bash |
| | | |
| | | ############################################################################## |
| | | ## |
| | | ## Gradle start up script for UN*X |
| | | ## |
| | | ############################################################################## |
| | | |
| | | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. |
| | | DEFAULT_JVM_OPTS="" |
| | | |
| | | APP_NAME="Gradle" |
| | | APP_BASE_NAME=`basename "$0"` |
| | | |
| | | # Use the maximum available, or set MAX_FD != -1 to use that value. |
| | | MAX_FD="maximum" |
| | | |
| | | warn ( ) { |
| | | echo "$*" |
| | | } |
| | | |
| | | die ( ) { |
| | | echo |
| | | echo "$*" |
| | | echo |
| | | exit 1 |
| | | } |
| | | |
| | | # OS specific support (must be 'true' or 'false'). |
| | | cygwin=false |
| | | msys=false |
| | | darwin=false |
| | | case "`uname`" in |
| | | CYGWIN* ) |
| | | cygwin=true |
| | | ;; |
| | | Darwin* ) |
| | | darwin=true |
| | | ;; |
| | | MINGW* ) |
| | | msys=true |
| | | ;; |
| | | esac |
| | | |
| | | # Attempt to set APP_HOME |
| | | # Resolve links: $0 may be a link |
| | | PRG="$0" |
| | | # Need this for relative symlinks. |
| | | while [ -h "$PRG" ] ; do |
| | | ls=`ls -ld "$PRG"` |
| | | link=`expr "$ls" : '.*-> \(.*\)$'` |
| | | if expr "$link" : '/.*' > /dev/null; then |
| | | PRG="$link" |
| | | else |
| | | PRG=`dirname "$PRG"`"/$link" |
| | | fi |
| | | done |
| | | SAVED="`pwd`" |
| | | cd "`dirname \"$PRG\"`/" >/dev/null |
| | | APP_HOME="`pwd -P`" |
| | | cd "$SAVED" >/dev/null |
| | | |
| | | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar |
| | | |
| | | # Determine the Java command to use to start the JVM. |
| | | if [ -n "$JAVA_HOME" ] ; then |
| | | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then |
| | | # IBM's JDK on AIX uses strange locations for the executables |
| | | JAVACMD="$JAVA_HOME/jre/sh/java" |
| | | else |
| | | JAVACMD="$JAVA_HOME/bin/java" |
| | | fi |
| | | if [ ! -x "$JAVACMD" ] ; then |
| | | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME |
| | | |
| | | Please set the JAVA_HOME variable in your environment to match the |
| | | location of your Java installation." |
| | | fi |
| | | else |
| | | JAVACMD="java" |
| | | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. |
| | | |
| | | Please set the JAVA_HOME variable in your environment to match the |
| | | location of your Java installation." |
| | | fi |
| | | |
| | | # Increase the maximum file descriptors if we can. |
| | | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then |
| | | MAX_FD_LIMIT=`ulimit -H -n` |
| | | if [ $? -eq 0 ] ; then |
| | | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then |
| | | MAX_FD="$MAX_FD_LIMIT" |
| | | fi |
| | | ulimit -n $MAX_FD |
| | | if [ $? -ne 0 ] ; then |
| | | warn "Could not set maximum file descriptor limit: $MAX_FD" |
| | | fi |
| | | else |
| | | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" |
| | | fi |
| | | fi |
| | | |
| | | # For Darwin, add options to specify how the application appears in the dock |
| | | if $darwin; then |
| | | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" |
| | | fi |
| | | |
| | | # For Cygwin, switch paths to Windows format before running java |
| | | if $cygwin ; then |
| | | APP_HOME=`cygpath --path --mixed "$APP_HOME"` |
| | | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` |
| | | JAVACMD=`cygpath --unix "$JAVACMD"` |
| | | |
| | | # We build the pattern for arguments to be converted via cygpath |
| | | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` |
| | | SEP="" |
| | | for dir in $ROOTDIRSRAW ; do |
| | | ROOTDIRS="$ROOTDIRS$SEP$dir" |
| | | SEP="|" |
| | | done |
| | | OURCYGPATTERN="(^($ROOTDIRS))" |
| | | # Add a user-defined pattern to the cygpath arguments |
| | | if [ "$GRADLE_CYGPATTERN" != "" ] ; then |
| | | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" |
| | | fi |
| | | # Now convert the arguments - kludge to limit ourselves to /bin/sh |
| | | i=0 |
| | | for arg in "$@" ; do |
| | | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` |
| | | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option |
| | | |
| | | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition |
| | | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` |
| | | else |
| | | eval `echo args$i`="\"$arg\"" |
| | | fi |
| | | i=$((i+1)) |
| | | done |
| | | case $i in |
| | | (0) set -- ;; |
| | | (1) set -- "$args0" ;; |
| | | (2) set -- "$args0" "$args1" ;; |
| | | (3) set -- "$args0" "$args1" "$args2" ;; |
| | | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; |
| | | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; |
| | | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; |
| | | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; |
| | | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; |
| | | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; |
| | | esac |
| | | fi |
| | | |
| | | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules |
| | | function splitJvmOpts() { |
| | | JVM_OPTS=("$@") |
| | | } |
| | | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS |
| | | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" |
| | | |
| | | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" |
| New file |
| | |
| | | @if "%DEBUG%" == "" @echo off |
| | | @rem ########################################################################## |
| | | @rem |
| | | @rem Gradle startup script for Windows |
| | | @rem |
| | | @rem ########################################################################## |
| | | |
| | | @rem Set local scope for the variables with windows NT shell |
| | | if "%OS%"=="Windows_NT" setlocal |
| | | |
| | | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. |
| | | set DEFAULT_JVM_OPTS= |
| | | |
| | | set DIRNAME=%~dp0 |
| | | if "%DIRNAME%" == "" set DIRNAME=. |
| | | set APP_BASE_NAME=%~n0 |
| | | set APP_HOME=%DIRNAME% |
| | | |
| | | @rem Find java.exe |
| | | if defined JAVA_HOME goto findJavaFromJavaHome |
| | | |
| | | set JAVA_EXE=java.exe |
| | | %JAVA_EXE% -version >NUL 2>&1 |
| | | if "%ERRORLEVEL%" == "0" goto init |
| | | |
| | | echo. |
| | | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. |
| | | echo. |
| | | echo Please set the JAVA_HOME variable in your environment to match the |
| | | echo location of your Java installation. |
| | | |
| | | goto fail |
| | | |
| | | :findJavaFromJavaHome |
| | | set JAVA_HOME=%JAVA_HOME:"=% |
| | | set JAVA_EXE=%JAVA_HOME%/bin/java.exe |
| | | |
| | | if exist "%JAVA_EXE%" goto init |
| | | |
| | | echo. |
| | | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% |
| | | echo. |
| | | echo Please set the JAVA_HOME variable in your environment to match the |
| | | echo location of your Java installation. |
| | | |
| | | goto fail |
| | | |
| | | :init |
| | | @rem Get command-line arguments, handling Windowz variants |
| | | |
| | | if not "%OS%" == "Windows_NT" goto win9xME_args |
| | | if "%@eval[2+2]" == "4" goto 4NT_args |
| | | |
| | | :win9xME_args |
| | | @rem Slurp the command line arguments. |
| | | set CMD_LINE_ARGS= |
| | | set _SKIP=2 |
| | | |
| | | :win9xME_args_slurp |
| | | if "x%~1" == "x" goto execute |
| | | |
| | | set CMD_LINE_ARGS=%* |
| | | goto execute |
| | | |
| | | :4NT_args |
| | | @rem Get arguments from the 4NT Shell from JP Software |
| | | set CMD_LINE_ARGS=%$ |
| | | |
| | | :execute |
| | | @rem Setup the command line |
| | | |
| | | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar |
| | | |
| | | @rem Execute Gradle |
| | | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% |
| | | |
| | | :end |
| | | @rem End local scope for the variables with windows NT shell |
| | | if "%ERRORLEVEL%"=="0" goto mainEnd |
| | | |
| | | :fail |
| | | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of |
| | | rem the _cmd.exe /c_ return code! |
| | | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 |
| | | exit /b 1 |
| | | |
| | | :mainEnd |
| | | if "%OS%"=="Windows_NT" endlocal |
| | | |
| | | :omega |
| New file |
| | |
| | | include ':app' |
| | | |
| | | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() |
| | | |
| | | def plugins = new Properties() |
| | | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') |
| | | if (pluginsFile.exists()) { |
| | | pluginsFile.withInputStream { stream -> plugins.load(stream) } |
| | | } |
| | | |
| | | plugins.each { name, path -> |
| | | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() |
| | | include ":$name" |
| | | project(":$name").projectDir = pluginDirectory |
| | | } |
| New file |
| | |
| | | .idea/ |
| | | .vagrant/ |
| | | .sconsign.dblite |
| | | .svn/ |
| | | |
| | | .DS_Store |
| | | *.swp |
| | | profile |
| | | |
| | | DerivedData/ |
| | | build/ |
| | | GeneratedPluginRegistrant.h |
| | | GeneratedPluginRegistrant.m |
| | | |
| | | *.pbxuser |
| | | *.mode1v3 |
| | | *.mode2v3 |
| | | *.perspectivev3 |
| | | |
| | | !default.pbxuser |
| | | !default.mode1v3 |
| | | !default.mode2v3 |
| | | !default.perspectivev3 |
| | | |
| | | xcuserdata |
| | | |
| | | *.moved-aside |
| | | |
| | | *.pyc |
| | | *sync/ |
| | | Icon? |
| | | .tags* |
| | | |
| | | /Flutter/app.flx |
| | | /Flutter/app.zip |
| | | /Flutter/App.framework |
| | | /Flutter/Flutter.framework |
| | | /Flutter/Generated.xcconfig |
| | | /ServiceDefinitions.json |
| | | |
| | | Pods/ |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
| | | <plist version="1.0"> |
| | | <dict> |
| | | <key>CFBundleDevelopmentRegion</key> |
| | | <string>en</string> |
| | | <key>CFBundleExecutable</key> |
| | | <string>App</string> |
| | | <key>CFBundleIdentifier</key> |
| | | <string>io.flutter.flutter.app</string> |
| | | <key>CFBundleInfoDictionaryVersion</key> |
| | | <string>6.0</string> |
| | | <key>CFBundleName</key> |
| | | <string>App</string> |
| | | <key>CFBundlePackageType</key> |
| | | <string>FMWK</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>1.0</string> |
| | | <key>CFBundleSignature</key> |
| | | <string>????</string> |
| | | <key>CFBundleVersion</key> |
| | | <string>1.0</string> |
| | | <key>UIRequiredDeviceCapabilities</key> |
| | | <array> |
| | | <string>arm64</string> |
| | | </array> |
| | | <key>MinimumOSVersion</key> |
| | | <string>8.0</string> |
| | | </dict> |
| | | </plist> |
| New file |
| | |
| | | #include "Generated.xcconfig" |
| New file |
| | |
| | | #include "Generated.xcconfig" |
| New file |
| | |
| | | [{"fonts":[{"asset":"fonts/MaterialIcons-Regular.ttf"}],"family":"MaterialIcons"}] |
| New file |
| | |
| | | // !$*UTF8*$! |
| | | { |
| | | archiveVersion = 1; |
| | | classes = { |
| | | }; |
| | | objectVersion = 46; |
| | | objects = { |
| | | |
| | | /* Begin PBXBuildFile section */ |
| | | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; |
| | | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; |
| | | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; |
| | | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; |
| | | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; |
| | | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; |
| | | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; |
| | | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; |
| | | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; }; |
| | | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; |
| | | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; |
| | | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; |
| | | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; |
| | | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; |
| | | /* End PBXBuildFile section */ |
| | | |
| | | /* Begin PBXCopyFilesBuildPhase section */ |
| | | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { |
| | | isa = PBXCopyFilesBuildPhase; |
| | | buildActionMask = 2147483647; |
| | | dstPath = ""; |
| | | dstSubfolderSpec = 10; |
| | | files = ( |
| | | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, |
| | | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, |
| | | ); |
| | | name = "Embed Frameworks"; |
| | | runOnlyForDeploymentPostprocessing = 0; |
| | | }; |
| | | /* End PBXCopyFilesBuildPhase section */ |
| | | |
| | | /* Begin PBXFileReference section */ |
| | | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; }; |
| | | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; |
| | | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; |
| | | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; }; |
| | | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; }; |
| | | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; }; |
| | | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; |
| | | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; |
| | | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; }; |
| | | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; }; |
| | | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; }; |
| | | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; |
| | | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; |
| | | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; |
| | | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; |
| | | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; |
| | | /* End PBXFileReference section */ |
| | | |
| | | /* Begin PBXFrameworksBuildPhase section */ |
| | | 97C146EB1CF9000F007C117D /* Frameworks */ = { |
| | | isa = PBXFrameworksBuildPhase; |
| | | buildActionMask = 2147483647; |
| | | files = ( |
| | | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, |
| | | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, |
| | | ); |
| | | runOnlyForDeploymentPostprocessing = 0; |
| | | }; |
| | | /* End PBXFrameworksBuildPhase section */ |
| | | |
| | | /* Begin PBXGroup section */ |
| | | 9740EEB11CF90186004384FC /* Flutter */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 3B80C3931E831B6300D905FE /* App.framework */, |
| | | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, |
| | | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, |
| | | 9740EEBA1CF902C7004384FC /* Flutter.framework */, |
| | | 9740EEB21CF90195004384FC /* Debug.xcconfig */, |
| | | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, |
| | | 9740EEB31CF90195004384FC /* Generated.xcconfig */, |
| | | ); |
| | | name = Flutter; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 97C146E51CF9000F007C117D = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 9740EEB11CF90186004384FC /* Flutter */, |
| | | 97C146F01CF9000F007C117D /* Runner */, |
| | | 97C146EF1CF9000F007C117D /* Products */, |
| | | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, |
| | | ); |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 97C146EF1CF9000F007C117D /* Products */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 97C146EE1CF9000F007C117D /* Runner.app */, |
| | | ); |
| | | name = Products; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 97C146F01CF9000F007C117D /* Runner */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, |
| | | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, |
| | | 97C146FA1CF9000F007C117D /* Main.storyboard */, |
| | | 97C146FD1CF9000F007C117D /* Assets.xcassets */, |
| | | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, |
| | | 97C147021CF9000F007C117D /* Info.plist */, |
| | | 97C146F11CF9000F007C117D /* Supporting Files */, |
| | | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, |
| | | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, |
| | | ); |
| | | path = Runner; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 97C146F11CF9000F007C117D /* Supporting Files */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 97C146F21CF9000F007C117D /* main.m */, |
| | | ); |
| | | name = "Supporting Files"; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | /* End PBXGroup section */ |
| | | |
| | | /* Begin PBXNativeTarget section */ |
| | | 97C146ED1CF9000F007C117D /* Runner */ = { |
| | | isa = PBXNativeTarget; |
| | | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; |
| | | buildPhases = ( |
| | | 9740EEB61CF901F6004384FC /* Run Script */, |
| | | 97C146EA1CF9000F007C117D /* Sources */, |
| | | 97C146EB1CF9000F007C117D /* Frameworks */, |
| | | 97C146EC1CF9000F007C117D /* Resources */, |
| | | 9705A1C41CF9048500538489 /* Embed Frameworks */, |
| | | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, |
| | | ); |
| | | buildRules = ( |
| | | ); |
| | | dependencies = ( |
| | | ); |
| | | name = Runner; |
| | | productName = Runner; |
| | | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; |
| | | productType = "com.apple.product-type.application"; |
| | | }; |
| | | /* End PBXNativeTarget section */ |
| | | |
| | | /* Begin PBXProject section */ |
| | | 97C146E61CF9000F007C117D /* Project object */ = { |
| | | isa = PBXProject; |
| | | attributes = { |
| | | LastUpgradeCheck = 0830; |
| | | ORGANIZATIONNAME = "The Chromium Authors"; |
| | | TargetAttributes = { |
| | | 97C146ED1CF9000F007C117D = { |
| | | CreatedOnToolsVersion = 7.3.1; |
| | | }; |
| | | }; |
| | | }; |
| | | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; |
| | | compatibilityVersion = "Xcode 3.2"; |
| | | developmentRegion = English; |
| | | hasScannedForEncodings = 0; |
| | | knownRegions = ( |
| | | en, |
| | | Base, |
| | | ); |
| | | mainGroup = 97C146E51CF9000F007C117D; |
| | | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; |
| | | projectDirPath = ""; |
| | | projectRoot = ""; |
| | | targets = ( |
| | | 97C146ED1CF9000F007C117D /* Runner */, |
| | | ); |
| | | }; |
| | | /* End PBXProject section */ |
| | | |
| | | /* Begin PBXResourcesBuildPhase section */ |
| | | 97C146EC1CF9000F007C117D /* Resources */ = { |
| | | isa = PBXResourcesBuildPhase; |
| | | buildActionMask = 2147483647; |
| | | files = ( |
| | | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, |
| | | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */, |
| | | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, |
| | | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, |
| | | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, |
| | | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, |
| | | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, |
| | | ); |
| | | runOnlyForDeploymentPostprocessing = 0; |
| | | }; |
| | | /* End PBXResourcesBuildPhase section */ |
| | | |
| | | /* Begin PBXShellScriptBuildPhase section */ |
| | | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { |
| | | isa = PBXShellScriptBuildPhase; |
| | | buildActionMask = 2147483647; |
| | | files = ( |
| | | ); |
| | | inputPaths = ( |
| | | ); |
| | | name = "Thin Binary"; |
| | | outputPaths = ( |
| | | ); |
| | | runOnlyForDeploymentPostprocessing = 0; |
| | | shellPath = /bin/sh; |
| | | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; |
| | | }; |
| | | 9740EEB61CF901F6004384FC /* Run Script */ = { |
| | | isa = PBXShellScriptBuildPhase; |
| | | buildActionMask = 2147483647; |
| | | files = ( |
| | | ); |
| | | inputPaths = ( |
| | | ); |
| | | name = "Run Script"; |
| | | outputPaths = ( |
| | | ); |
| | | runOnlyForDeploymentPostprocessing = 0; |
| | | shellPath = /bin/sh; |
| | | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; |
| | | }; |
| | | /* End PBXShellScriptBuildPhase section */ |
| | | |
| | | /* Begin PBXSourcesBuildPhase section */ |
| | | 97C146EA1CF9000F007C117D /* Sources */ = { |
| | | isa = PBXSourcesBuildPhase; |
| | | buildActionMask = 2147483647; |
| | | files = ( |
| | | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, |
| | | 97C146F31CF9000F007C117D /* main.m in Sources */, |
| | | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, |
| | | ); |
| | | runOnlyForDeploymentPostprocessing = 0; |
| | | }; |
| | | /* End PBXSourcesBuildPhase section */ |
| | | |
| | | /* Begin PBXVariantGroup section */ |
| | | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { |
| | | isa = PBXVariantGroup; |
| | | children = ( |
| | | 97C146FB1CF9000F007C117D /* Base */, |
| | | ); |
| | | name = Main.storyboard; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { |
| | | isa = PBXVariantGroup; |
| | | children = ( |
| | | 97C147001CF9000F007C117D /* Base */, |
| | | ); |
| | | name = LaunchScreen.storyboard; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | /* End PBXVariantGroup section */ |
| | | |
| | | /* Begin XCBuildConfiguration section */ |
| | | 97C147031CF9000F007C117D /* Debug */ = { |
| | | isa = XCBuildConfiguration; |
| | | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | CLANG_ANALYZER_NONNULL = YES; |
| | | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
| | | CLANG_CXX_LIBRARY = "libc++"; |
| | | CLANG_ENABLE_MODULES = YES; |
| | | CLANG_ENABLE_OBJC_ARC = YES; |
| | | CLANG_WARN_BOOL_CONVERSION = YES; |
| | | CLANG_WARN_CONSTANT_CONVERSION = YES; |
| | | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; |
| | | CLANG_WARN_EMPTY_BODY = YES; |
| | | CLANG_WARN_ENUM_CONVERSION = YES; |
| | | CLANG_WARN_INFINITE_RECURSION = YES; |
| | | CLANG_WARN_INT_CONVERSION = YES; |
| | | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; |
| | | CLANG_WARN_SUSPICIOUS_MOVE = YES; |
| | | CLANG_WARN_UNREACHABLE_CODE = YES; |
| | | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; |
| | | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
| | | COPY_PHASE_STRIP = NO; |
| | | DEBUG_INFORMATION_FORMAT = dwarf; |
| | | ENABLE_STRICT_OBJC_MSGSEND = YES; |
| | | ENABLE_TESTABILITY = YES; |
| | | GCC_C_LANGUAGE_STANDARD = gnu99; |
| | | GCC_DYNAMIC_NO_PIC = NO; |
| | | GCC_NO_COMMON_BLOCKS = YES; |
| | | GCC_OPTIMIZATION_LEVEL = 0; |
| | | GCC_PREPROCESSOR_DEFINITIONS = ( |
| | | "DEBUG=1", |
| | | "$(inherited)", |
| | | ); |
| | | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; |
| | | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; |
| | | GCC_WARN_UNDECLARED_SELECTOR = YES; |
| | | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; |
| | | GCC_WARN_UNUSED_FUNCTION = YES; |
| | | GCC_WARN_UNUSED_VARIABLE = YES; |
| | | IPHONEOS_DEPLOYMENT_TARGET = 8.0; |
| | | MTL_ENABLE_DEBUG_INFO = YES; |
| | | ONLY_ACTIVE_ARCH = YES; |
| | | SDKROOT = iphoneos; |
| | | TARGETED_DEVICE_FAMILY = "1,2"; |
| | | }; |
| | | name = Debug; |
| | | }; |
| | | 97C147041CF9000F007C117D /* Release */ = { |
| | | isa = XCBuildConfiguration; |
| | | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | CLANG_ANALYZER_NONNULL = YES; |
| | | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
| | | CLANG_CXX_LIBRARY = "libc++"; |
| | | CLANG_ENABLE_MODULES = YES; |
| | | CLANG_ENABLE_OBJC_ARC = YES; |
| | | CLANG_WARN_BOOL_CONVERSION = YES; |
| | | CLANG_WARN_CONSTANT_CONVERSION = YES; |
| | | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; |
| | | CLANG_WARN_EMPTY_BODY = YES; |
| | | CLANG_WARN_ENUM_CONVERSION = YES; |
| | | CLANG_WARN_INFINITE_RECURSION = YES; |
| | | CLANG_WARN_INT_CONVERSION = YES; |
| | | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; |
| | | CLANG_WARN_SUSPICIOUS_MOVE = YES; |
| | | CLANG_WARN_UNREACHABLE_CODE = YES; |
| | | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; |
| | | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
| | | COPY_PHASE_STRIP = NO; |
| | | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; |
| | | ENABLE_NS_ASSERTIONS = NO; |
| | | ENABLE_STRICT_OBJC_MSGSEND = YES; |
| | | GCC_C_LANGUAGE_STANDARD = gnu99; |
| | | GCC_NO_COMMON_BLOCKS = YES; |
| | | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; |
| | | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; |
| | | GCC_WARN_UNDECLARED_SELECTOR = YES; |
| | | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; |
| | | GCC_WARN_UNUSED_FUNCTION = YES; |
| | | GCC_WARN_UNUSED_VARIABLE = YES; |
| | | IPHONEOS_DEPLOYMENT_TARGET = 8.0; |
| | | MTL_ENABLE_DEBUG_INFO = NO; |
| | | SDKROOT = iphoneos; |
| | | TARGETED_DEVICE_FAMILY = "1,2"; |
| | | VALIDATE_PRODUCT = YES; |
| | | }; |
| | | name = Release; |
| | | }; |
| | | 97C147061CF9000F007C117D /* Debug */ = { |
| | | isa = XCBuildConfiguration; |
| | | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; |
| | | buildSettings = { |
| | | ARCHS = arm64; |
| | | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| | | ENABLE_BITCODE = NO; |
| | | FRAMEWORK_SEARCH_PATHS = ( |
| | | "$(inherited)", |
| | | "$(PROJECT_DIR)/Flutter", |
| | | ); |
| | | INFOPLIST_FILE = Runner/Info.plist; |
| | | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; |
| | | LIBRARY_SEARCH_PATHS = ( |
| | | "$(inherited)", |
| | | "$(PROJECT_DIR)/Flutter", |
| | | ); |
| | | PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.example; |
| | | PRODUCT_NAME = "$(TARGET_NAME)"; |
| | | }; |
| | | name = Debug; |
| | | }; |
| | | 97C147071CF9000F007C117D /* Release */ = { |
| | | isa = XCBuildConfiguration; |
| | | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; |
| | | buildSettings = { |
| | | ARCHS = arm64; |
| | | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| | | ENABLE_BITCODE = NO; |
| | | FRAMEWORK_SEARCH_PATHS = ( |
| | | "$(inherited)", |
| | | "$(PROJECT_DIR)/Flutter", |
| | | ); |
| | | INFOPLIST_FILE = Runner/Info.plist; |
| | | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; |
| | | LIBRARY_SEARCH_PATHS = ( |
| | | "$(inherited)", |
| | | "$(PROJECT_DIR)/Flutter", |
| | | ); |
| | | PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.example; |
| | | PRODUCT_NAME = "$(TARGET_NAME)"; |
| | | }; |
| | | name = Release; |
| | | }; |
| | | /* End XCBuildConfiguration section */ |
| | | |
| | | /* Begin XCConfigurationList section */ |
| | | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { |
| | | isa = XCConfigurationList; |
| | | buildConfigurations = ( |
| | | 97C147031CF9000F007C117D /* Debug */, |
| | | 97C147041CF9000F007C117D /* Release */, |
| | | ); |
| | | defaultConfigurationIsVisible = 0; |
| | | defaultConfigurationName = Release; |
| | | }; |
| | | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { |
| | | isa = XCConfigurationList; |
| | | buildConfigurations = ( |
| | | 97C147061CF9000F007C117D /* Debug */, |
| | | 97C147071CF9000F007C117D /* Release */, |
| | | ); |
| | | defaultConfigurationIsVisible = 0; |
| | | defaultConfigurationName = Release; |
| | | }; |
| | | /* End XCConfigurationList section */ |
| | | }; |
| | | rootObject = 97C146E61CF9000F007C117D /* Project object */; |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <Workspace |
| | | version = "1.0"> |
| | | <FileRef |
| | | location = "group:Runner.xcodeproj"> |
| | | </FileRef> |
| | | </Workspace> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <Scheme |
| | | LastUpgradeVersion = "0830" |
| | | version = "1.3"> |
| | | <BuildAction |
| | | parallelizeBuildables = "YES" |
| | | buildImplicitDependencies = "YES"> |
| | | <BuildActionEntries> |
| | | <BuildActionEntry |
| | | buildForTesting = "YES" |
| | | buildForRunning = "YES" |
| | | buildForProfiling = "YES" |
| | | buildForArchiving = "YES" |
| | | buildForAnalyzing = "YES"> |
| | | <BuildableReference |
| | | BuildableIdentifier = "primary" |
| | | BlueprintIdentifier = "97C146ED1CF9000F007C117D" |
| | | BuildableName = "Runner.app" |
| | | BlueprintName = "Runner" |
| | | ReferencedContainer = "container:Runner.xcodeproj"> |
| | | </BuildableReference> |
| | | </BuildActionEntry> |
| | | </BuildActionEntries> |
| | | </BuildAction> |
| | | <TestAction |
| | | buildConfiguration = "Debug" |
| | | selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" |
| | | selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" |
| | | shouldUseLaunchSchemeArgsEnv = "YES"> |
| | | <Testables> |
| | | </Testables> |
| | | <MacroExpansion> |
| | | <BuildableReference |
| | | BuildableIdentifier = "primary" |
| | | BlueprintIdentifier = "97C146ED1CF9000F007C117D" |
| | | BuildableName = "Runner.app" |
| | | BlueprintName = "Runner" |
| | | ReferencedContainer = "container:Runner.xcodeproj"> |
| | | </BuildableReference> |
| | | </MacroExpansion> |
| | | <AdditionalOptions> |
| | | </AdditionalOptions> |
| | | </TestAction> |
| | | <LaunchAction |
| | | buildConfiguration = "Debug" |
| | | selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" |
| | | selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" |
| | | launchStyle = "0" |
| | | useCustomWorkingDirectory = "NO" |
| | | ignoresPersistentStateOnLaunch = "NO" |
| | | debugDocumentVersioning = "YES" |
| | | debugServiceExtension = "internal" |
| | | allowLocationSimulation = "YES"> |
| | | <BuildableProductRunnable |
| | | runnableDebuggingMode = "0"> |
| | | <BuildableReference |
| | | BuildableIdentifier = "primary" |
| | | BlueprintIdentifier = "97C146ED1CF9000F007C117D" |
| | | BuildableName = "Runner.app" |
| | | BlueprintName = "Runner" |
| | | ReferencedContainer = "container:Runner.xcodeproj"> |
| | | </BuildableReference> |
| | | </BuildableProductRunnable> |
| | | <AdditionalOptions> |
| | | </AdditionalOptions> |
| | | </LaunchAction> |
| | | <ProfileAction |
| | | buildConfiguration = "Release" |
| | | shouldUseLaunchSchemeArgsEnv = "YES" |
| | | savedToolIdentifier = "" |
| | | useCustomWorkingDirectory = "NO" |
| | | debugDocumentVersioning = "YES"> |
| | | <BuildableProductRunnable |
| | | runnableDebuggingMode = "0"> |
| | | <BuildableReference |
| | | BuildableIdentifier = "primary" |
| | | BlueprintIdentifier = "97C146ED1CF9000F007C117D" |
| | | BuildableName = "Runner.app" |
| | | BlueprintName = "Runner" |
| | | ReferencedContainer = "container:Runner.xcodeproj"> |
| | | </BuildableReference> |
| | | </BuildableProductRunnable> |
| | | </ProfileAction> |
| | | <AnalyzeAction |
| | | buildConfiguration = "Debug"> |
| | | </AnalyzeAction> |
| | | <ArchiveAction |
| | | buildConfiguration = "Release" |
| | | revealArchiveInOrganizer = "YES"> |
| | | </ArchiveAction> |
| | | </Scheme> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <Workspace |
| | | version = "1.0"> |
| | | <FileRef |
| | | location = "group:Runner.xcodeproj"> |
| | | </FileRef> |
| | | </Workspace> |
| New file |
| | |
| | | #import <UIKit/UIKit.h> |
| | | #import <Flutter/Flutter.h> |
| | | |
| | | @interface AppDelegate : FlutterAppDelegate |
| | | |
| | | @end |
| New file |
| | |
| | | #include "AppDelegate.h" |
| | | #include "GeneratedPluginRegistrant.h" |
| | | |
| | | @implementation AppDelegate |
| | | |
| | | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { |
| | | [GeneratedPluginRegistrant registerWithRegistry:self]; |
| | | // Override point for customization after application launch. |
| | | return [super application:application didFinishLaunchingWithOptions:launchOptions]; |
| | | } |
| | | |
| | | @end |
| New file |
| | |
| | | { |
| | | "images" : [ |
| | | { |
| | | "size" : "20x20", |
| | | "idiom" : "iphone", |
| | | "filename" : "Icon-App-20x20@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "size" : "20x20", |
| | | "idiom" : "iphone", |
| | | "filename" : "Icon-App-20x20@3x.png", |
| | | "scale" : "3x" |
| | | }, |
| | | { |
| | | "size" : "29x29", |
| | | "idiom" : "iphone", |
| | | "filename" : "Icon-App-29x29@1x.png", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "size" : "29x29", |
| | | "idiom" : "iphone", |
| | | "filename" : "Icon-App-29x29@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "size" : "29x29", |
| | | "idiom" : "iphone", |
| | | "filename" : "Icon-App-29x29@3x.png", |
| | | "scale" : "3x" |
| | | }, |
| | | { |
| | | "size" : "40x40", |
| | | "idiom" : "iphone", |
| | | "filename" : "Icon-App-40x40@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "size" : "40x40", |
| | | "idiom" : "iphone", |
| | | "filename" : "Icon-App-40x40@3x.png", |
| | | "scale" : "3x" |
| | | }, |
| | | { |
| | | "size" : "60x60", |
| | | "idiom" : "iphone", |
| | | "filename" : "Icon-App-60x60@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "size" : "60x60", |
| | | "idiom" : "iphone", |
| | | "filename" : "Icon-App-60x60@3x.png", |
| | | "scale" : "3x" |
| | | }, |
| | | { |
| | | "size" : "20x20", |
| | | "idiom" : "ipad", |
| | | "filename" : "Icon-App-20x20@1x.png", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "size" : "20x20", |
| | | "idiom" : "ipad", |
| | | "filename" : "Icon-App-20x20@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "size" : "29x29", |
| | | "idiom" : "ipad", |
| | | "filename" : "Icon-App-29x29@1x.png", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "size" : "29x29", |
| | | "idiom" : "ipad", |
| | | "filename" : "Icon-App-29x29@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "size" : "40x40", |
| | | "idiom" : "ipad", |
| | | "filename" : "Icon-App-40x40@1x.png", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "size" : "40x40", |
| | | "idiom" : "ipad", |
| | | "filename" : "Icon-App-40x40@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "size" : "76x76", |
| | | "idiom" : "ipad", |
| | | "filename" : "Icon-App-76x76@1x.png", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "size" : "76x76", |
| | | "idiom" : "ipad", |
| | | "filename" : "Icon-App-76x76@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "size" : "83.5x83.5", |
| | | "idiom" : "ipad", |
| | | "filename" : "Icon-App-83.5x83.5@2x.png", |
| | | "scale" : "2x" |
| | | } |
| | | ], |
| | | "info" : { |
| | | "version" : 1, |
| | | "author" : "xcode" |
| | | } |
| | | } |
| New file |
| | |
| | | { |
| | | "images" : [ |
| | | { |
| | | "idiom" : "universal", |
| | | "filename" : "LaunchImage.png", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "idiom" : "universal", |
| | | "filename" : "LaunchImage@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "idiom" : "universal", |
| | | "filename" : "LaunchImage@3x.png", |
| | | "scale" : "3x" |
| | | } |
| | | ], |
| | | "info" : { |
| | | "version" : 1, |
| | | "author" : "xcode" |
| | | } |
| | | } |
| New file |
| | |
| | | # Launch Screen Assets |
| | | |
| | | You can customize the launch screen with your own desired assets by replacing the image files in this directory. |
| | | |
| | | 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. |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> |
| | | <dependencies> |
| | | <deployment identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/> |
| | | </dependencies> |
| | | <scenes> |
| | | <!--View Controller--> |
| | | <scene sceneID="EHf-IW-A2E"> |
| | | <objects> |
| | | <viewController id="01J-lp-oVM" sceneMemberID="viewController"> |
| | | <layoutGuides> |
| | | <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/> |
| | | <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/> |
| | | </layoutGuides> |
| | | <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> |
| | | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
| | | <subviews> |
| | | <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"> |
| | | </imageView> |
| | | </subviews> |
| | | <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <constraints> |
| | | <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/> |
| | | <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/> |
| | | </constraints> |
| | | </view> |
| | | </viewController> |
| | | <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> |
| | | </objects> |
| | | <point key="canvasLocation" x="53" y="375"/> |
| | | </scene> |
| | | </scenes> |
| | | <resources> |
| | | <image name="LaunchImage" width="168" height="185"/> |
| | | </resources> |
| | | </document> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> |
| | | <dependencies> |
| | | <deployment identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> |
| | | </dependencies> |
| | | <scenes> |
| | | <!--Flutter View Controller--> |
| | | <scene sceneID="tne-QT-ifu"> |
| | | <objects> |
| | | <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController"> |
| | | <layoutGuides> |
| | | <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> |
| | | <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> |
| | | </layoutGuides> |
| | | <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> |
| | | <rect key="frame" x="0.0" y="0.0" width="600" height="600"/> |
| | | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
| | | <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> |
| | | </view> |
| | | </viewController> |
| | | <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> |
| | | </objects> |
| | | </scene> |
| | | </scenes> |
| | | </document> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
| | | <plist version="1.0"> |
| | | <dict> |
| | | <key>CFBundleDevelopmentRegion</key> |
| | | <string>en</string> |
| | | <key>CFBundleExecutable</key> |
| | | <string>$(EXECUTABLE_NAME)</string> |
| | | <key>CFBundleIdentifier</key> |
| | | <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> |
| | | <key>CFBundleInfoDictionaryVersion</key> |
| | | <string>6.0</string> |
| | | <key>CFBundleName</key> |
| | | <string>example</string> |
| | | <key>CFBundlePackageType</key> |
| | | <string>APPL</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>1.0</string> |
| | | <key>CFBundleSignature</key> |
| | | <string>????</string> |
| | | <key>CFBundleVersion</key> |
| | | <string>1</string> |
| | | <key>LSRequiresIPhoneOS</key> |
| | | <true/> |
| | | <key>UILaunchStoryboardName</key> |
| | | <string>LaunchScreen</string> |
| | | <key>UIMainStoryboardFile</key> |
| | | <string>Main</string> |
| | | <key>UIRequiredDeviceCapabilities</key> |
| | | <array> |
| | | <string>arm64</string> |
| | | </array> |
| | | <key>UISupportedInterfaceOrientations</key> |
| | | <array> |
| | | <string>UIInterfaceOrientationPortrait</string> |
| | | <string>UIInterfaceOrientationLandscapeLeft</string> |
| | | <string>UIInterfaceOrientationLandscapeRight</string> |
| | | </array> |
| | | <key>UISupportedInterfaceOrientations~ipad</key> |
| | | <array> |
| | | <string>UIInterfaceOrientationPortrait</string> |
| | | <string>UIInterfaceOrientationPortraitUpsideDown</string> |
| | | <string>UIInterfaceOrientationLandscapeLeft</string> |
| | | <string>UIInterfaceOrientationLandscapeRight</string> |
| | | </array> |
| | | <key>UIViewControllerBasedStatusBarAppearance</key> |
| | | <false/> |
| | | </dict> |
| | | </plist> |
| New file |
| | |
| | | #import <UIKit/UIKit.h> |
| | | #import <Flutter/Flutter.h> |
| | | #import "AppDelegate.h" |
| | | |
| | | int main(int argc, char * argv[]) { |
| | | @autoreleasepool { |
| | | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); |
| | | } |
| | | } |
| New file |
| | |
| | | import 'package:flutter/material.dart'; |
| | | import 'package:redux_dev_tools/redux_dev_tools.dart'; |
| | | import 'package:flutter_redux/flutter_redux.dart'; |
| | | import 'package:redux/redux.dart'; |
| | | import 'package:redux_remote_devtools/redux_remote_devtools.dart'; |
| | | |
| | | // One simple action: Increment |
| | | enum Actions { Increment } |
| | | |
| | | // The reducer, which takes the previous count and increments it in response |
| | | // to an Increment action. |
| | | int counterReducer(int state, dynamic action) { |
| | | if (action == Actions.Increment) { |
| | | return state + 1; |
| | | } |
| | | |
| | | return state; |
| | | } |
| | | |
| | | void main() async { |
| | | // Create your store as a final variable in a base Widget. This works better |
| | | // with Hot Reload than creating it directly in the `build` function. |
| | | |
| | | var remoteDevtools = RemoteDevToolsMiddleware('192.168.1.52:8000'); |
| | | await remoteDevtools.connect(); |
| | | final store = DevToolsStore<int>(counterReducer, |
| | | initialState: 0, middleware: [remoteDevtools]); |
| | | |
| | | remoteDevtools.store = store; |
| | | |
| | | runApp(new FlutterReduxApp( |
| | | title: 'Flutter Redux Demo', |
| | | store: store, |
| | | )); |
| | | } |
| | | |
| | | class FlutterReduxApp extends StatelessWidget { |
| | | final Store<int> store; |
| | | final String title; |
| | | |
| | | FlutterReduxApp({Key key, this.store, this.title}) : super(key: key); |
| | | |
| | | @override |
| | | Widget build(BuildContext context) { |
| | | // The StoreProvider should wrap your MaterialApp or WidgetsApp. This will |
| | | // ensure all routes have access to the store. |
| | | return new StoreProvider<int>( |
| | | // Pass the store to the StoreProvider. Any ancestor `StoreConnector` |
| | | // Widgets will find and use this value as the `Store`. |
| | | store: store, |
| | | child: new MaterialApp( |
| | | theme: new ThemeData.dark(), |
| | | title: title, |
| | | home: new Scaffold( |
| | | appBar: new AppBar( |
| | | title: new Text(title), |
| | | ), |
| | | body: new Center( |
| | | child: new Column( |
| | | mainAxisAlignment: MainAxisAlignment.center, |
| | | children: [ |
| | | new Text( |
| | | 'You have pushed the button this many times:', |
| | | ), |
| | | // Connect the Store to a Text Widget that renders the current |
| | | // count. |
| | | // |
| | | // We'll wrap the Text Widget in a `StoreConnector` Widget. The |
| | | // `StoreConnector` will find the `Store` from the nearest |
| | | // `StoreProvider` ancestor, convert it into a String of the |
| | | // latest count, and pass that String to the `builder` function |
| | | // as the `count`. |
| | | // |
| | | // Every time the button is tapped, an action is dispatched and |
| | | // run through the reducer. After the reducer updates the state, |
| | | // the Widget will be automatically rebuilt with the latest |
| | | // count. No need to manually manage subscriptions or Streams! |
| | | new StoreConnector<int, String>( |
| | | converter: (store) => store.state.toString(), |
| | | builder: (context, count) { |
| | | return new Text( |
| | | count, |
| | | style: Theme.of(context).textTheme.display1, |
| | | ); |
| | | }, |
| | | ) |
| | | ], |
| | | ), |
| | | ), |
| | | // Connect the Store to a FloatingActionButton. In this case, we'll |
| | | // use the Store to build a callback that with dispatch an Increment |
| | | // Action. |
| | | // |
| | | // Then, we'll pass this callback to the button's `onPressed` handler. |
| | | floatingActionButton: new StoreConnector<int, VoidCallback>( |
| | | converter: (store) { |
| | | // Return a `VoidCallback`, which is a fancy name for a function |
| | | // with no parameters. It only dispatches an Increment action. |
| | | return () => store.dispatch(Actions.Increment); |
| | | }, |
| | | builder: (context, callback) { |
| | | return new FloatingActionButton( |
| | | // Attach the `callback` to the `onPressed` attribute |
| | | onPressed: callback, |
| | | tooltip: 'asdasdasd', |
| | | child: new Icon(Icons.add), |
| | | ); |
| | | }, |
| | | ), |
| | | ), |
| | | ), |
| | | ); |
| | | } |
| | | } |
| New file |
| | |
| | | name: example |
| | | description: A new Flutter project. |
| | | |
| | | version: 1.0.0+1 |
| | | |
| | | environment: |
| | | sdk: '>=2.0.0-dev.68.0 <3.0.0' |
| | | |
| | | dependencies: |
| | | flutter: |
| | | sdk: flutter |
| | | flutter_redux: 0.5.0 |
| | | redux_dev_tools: ^0.4.0 |
| | | redux_remote_devtools: |
| | | path: ../../ |
| | | |
| | | # The following adds the Cupertino Icons font to your application. |
| | | # Use with the CupertinoIcons class for iOS style icons. |
| | | cupertino_icons: ^0.1.2 |
| | | |
| | | dev_dependencies: |
| | | flutter_test: |
| | | sdk: flutter |
| | | |
| | | # For information on the generic Dart part of this file, see the |
| | | # following page: https://www.dartlang.org/tools/pub/pubspec |
| | | |
| | | # The following section is specific to Flutter. |
| | | flutter: |
| | | # The following line ensures that the Material Icons font is |
| | | # included with your application, so that you can use the icons in |
| | | # the material Icons class. |
| | | uses-material-design: true |
| | | # To add assets to your application, add an assets section, like this: |
| | | # assets: |
| | | # - images/a_dot_burr.jpeg |
| | | # - images/a_dot_ham.jpeg |
| | | # An image asset can refer to one or more resolution-specific "variants", see |
| | | # https://flutter.io/assets-and-images/#resolution-aware. |
| | | # For details regarding adding assets from package dependencies, see |
| | | # https://flutter.io/assets-and-images/#from-packages |
| | | # To add custom fonts to your application, add a fonts section here, |
| | | # in this "flutter" section. Each entry in this list should have a |
| | | # "family" key with the font family name, and a "fonts" key with a |
| | | # list giving the asset and other descriptors for the font. For |
| | | # example: |
| | | # fonts: |
| | | # - family: Schyler |
| | | # fonts: |
| | | # - asset: fonts/Schyler-Regular.ttf |
| | | # - asset: fonts/Schyler-Italic.ttf |
| | | # style: italic |
| | | # - family: Trajan Pro |
| | | # fonts: |
| | | # - asset: fonts/TrajanPro.ttf |
| | | # - asset: fonts/TrajanPro_Bold.ttf |
| | | # weight: 700 |
| | | # |
| | | # For details regarding fonts from package dependencies, |
| | | # see https://flutter.io/custom-fonts/#from-packages |
| New file |
| | |
| | | .DS_Store |
| | | .dart_tool/ |
| | | |
| | | .packages |
| | | .pub/ |
| | | |
| | | build/ |
| | | |
| | | .flutter-plugins |
| New file |
| | |
| | | <component name="libraryTable"> |
| | | <library name="Dart SDK"> |
| | | <CLASSES> |
| | | <root url="file:///Users/michael/bin/flutter/bin/cache/dart-sdk/lib/async" /> |
| | | <root url="file:///Users/michael/bin/flutter/bin/cache/dart-sdk/lib/collection" /> |
| | | <root url="file:///Users/michael/bin/flutter/bin/cache/dart-sdk/lib/convert" /> |
| | | <root url="file:///Users/michael/bin/flutter/bin/cache/dart-sdk/lib/core" /> |
| | | <root url="file:///Users/michael/bin/flutter/bin/cache/dart-sdk/lib/developer" /> |
| | | <root url="file:///Users/michael/bin/flutter/bin/cache/dart-sdk/lib/html" /> |
| | | <root url="file:///Users/michael/bin/flutter/bin/cache/dart-sdk/lib/io" /> |
| | | <root url="file:///Users/michael/bin/flutter/bin/cache/dart-sdk/lib/isolate" /> |
| | | <root url="file:///Users/michael/bin/flutter/bin/cache/dart-sdk/lib/math" /> |
| | | <root url="file:///Users/michael/bin/flutter/bin/cache/dart-sdk/lib/mirrors" /> |
| | | <root url="file:///Users/michael/bin/flutter/bin/cache/dart-sdk/lib/typed_data" /> |
| | | </CLASSES> |
| | | <JAVADOC /> |
| | | <SOURCES /> |
| | | </library> |
| | | </component> |
| New file |
| | |
| | | <component name="libraryTable"> |
| | | <library name="Flutter for Android"> |
| | | <CLASSES> |
| | | <root url="jar:///Users/michael/bin/flutter/bin/cache/artifacts/engine/android-arm/flutter.jar!/" /> |
| | | </CLASSES> |
| | | <JAVADOC /> |
| | | <SOURCES /> |
| | | </library> |
| | | </component> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="ProjectModuleManager"> |
| | | <modules> |
| | | <module fileurl="file://$PROJECT_DIR$/githubsearch.iml" filepath="$PROJECT_DIR$/githubsearch.iml" /> |
| | | <module fileurl="file://$PROJECT_DIR$/githubsearch_android.iml" filepath="$PROJECT_DIR$/githubsearch_android.iml" /> |
| | | </modules> |
| | | </component> |
| | | </project> |
| New file |
| | |
| | | <component name="ProjectRunConfigurationManager"> |
| | | <configuration default="false" name="main.dart" type="FlutterRunConfigurationType" factoryName="Flutter"> |
| | | <option name="filePath" value="$PROJECT_DIR$/lib/main.dart" /> |
| | | <method /> |
| | | </configuration> |
| | | </component> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="FileEditorManager"> |
| | | <leaf> |
| | | <file leaf-file-name="main.dart" pinned="false" current-in-tab="true"> |
| | | <entry file="file://$PROJECT_DIR$/lib/main.dart"> |
| | | <provider selected="true" editor-type-id="text-editor"> |
| | | <state relative-caret-position="0"> |
| | | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
| | | </state> |
| | | </provider> |
| | | </entry> |
| | | </file> |
| | | </leaf> |
| | | </component> |
| | | <component name="ToolWindowManager"> |
| | | <editor active="true" /> |
| | | <layout> |
| | | <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> |
| | | </layout> |
| | | </component> |
| | | <component name="ProjectView"> |
| | | <navigator currentView="ProjectPane" proportions="" version="1"> |
| | | </navigator> |
| | | <panes> |
| | | <pane id="ProjectPane"> |
| | | <option name="show-excluded-files" value="false" /> |
| | | </pane> |
| | | </panes> |
| | | </component> |
| | | <component name="PropertiesComponent"> |
| | | <property name="last_opened_file_path" value="$PROJECT_DIR$" /> |
| | | <property name="dart.analysis.tool.window.force.activate" value="true" /> |
| | | <property name="show.migrate.to.gradle.popup" value="false" /> |
| | | </component> |
| | | </project> |
| New file |
| | |
| | | # This file tracks properties of this Flutter project. |
| | | # Used by Flutter tool to assess capabilities and perform upgrades etc. |
| | | # |
| | | # This file should be version controlled and should not be manually edited. |
| | | |
| | | version: |
| | | revision: 5ab9e70727d858def3a586db7fb98ee580352957 |
| | | channel: beta |
| New file |
| | |
| | | # githubsearch |
| | | |
| | | Redux demonstration app that lets you search Github repositories. |
| | | |
| | | This is a copy of the example program from [flutter_redux](https://github.com/brianegan/flutter_redux), with additional support for Remote Devtools. |
| | | |
| | | - Uses DevToolsStore to allow time travel |
| | | - Connects to remote devtools on startup |
| | | - Sends all actions and state updates serialized as JSON |
| | | |
| | | ## Trying it out |
| | | |
| | | 1. Get [remotedev-server](https://github.com/zalmoxisus/remotedev-server) from npm: |
| | | |
| | | npm install -g remotedev-server |
| | | |
| | | 2. Start the server |
| | | |
| | | remotedev --port 8000 |
| | | |
| | | 3. Edit `main.dart` and put in your computer's IP address or host name |
| | | |
| | | 4. Open `http://localhost:8000` in a web browser. You should see the remote-devtools window |
| | | |
| | | 5. Run the flutter app |
| | | |
| | | flutter packages get |
| | | flutter run |
| | | |
| | | 6. Search repos, see the actions fly through devtools |
| New file |
| | |
| | | *.iml |
| | | *.class |
| | | .gradle |
| | | /local.properties |
| | | /.idea/workspace.xml |
| | | /.idea/libraries |
| | | .DS_Store |
| | | /build |
| | | /captures |
| | | GeneratedPluginRegistrant.java |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <projectDescription> |
| | | <name>android</name> |
| | | <comment>Project android created by Buildship.</comment> |
| | | <projects> |
| | | </projects> |
| | | <buildSpec> |
| | | <buildCommand> |
| | | <name>org.eclipse.buildship.core.gradleprojectbuilder</name> |
| | | <arguments> |
| | | </arguments> |
| | | </buildCommand> |
| | | </buildSpec> |
| | | <natures> |
| | | <nature>org.eclipse.buildship.core.gradleprojectnature</nature> |
| | | </natures> |
| | | </projectDescription> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <classpath> |
| | | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/> |
| | | <classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/> |
| | | <classpathentry kind="output" path="bin/default"/> |
| | | </classpath> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <projectDescription> |
| | | <name>app</name> |
| | | <comment>Project app created by Buildship.</comment> |
| | | <projects> |
| | | </projects> |
| | | <buildSpec> |
| | | <buildCommand> |
| | | <name>org.eclipse.jdt.core.javabuilder</name> |
| | | <arguments> |
| | | </arguments> |
| | | </buildCommand> |
| | | <buildCommand> |
| | | <name>org.eclipse.buildship.core.gradleprojectbuilder</name> |
| | | <arguments> |
| | | </arguments> |
| | | </buildCommand> |
| | | </buildSpec> |
| | | <natures> |
| | | <nature>org.eclipse.jdt.core.javanature</nature> |
| | | <nature>org.eclipse.buildship.core.gradleprojectnature</nature> |
| | | </natures> |
| | | </projectDescription> |
| New file |
| | |
| | | def localProperties = new Properties() |
| | | def localPropertiesFile = rootProject.file('local.properties') |
| | | if (localPropertiesFile.exists()) { |
| | | localPropertiesFile.withReader('UTF-8') { reader -> |
| | | localProperties.load(reader) |
| | | } |
| | | } |
| | | |
| | | def flutterRoot = localProperties.getProperty('flutter.sdk') |
| | | if (flutterRoot == null) { |
| | | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") |
| | | } |
| | | |
| | | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') |
| | | if (flutterVersionCode == null) { |
| | | flutterVersionCode = '1' |
| | | } |
| | | |
| | | def flutterVersionName = localProperties.getProperty('flutter.versionName') |
| | | if (flutterVersionName == null) { |
| | | flutterVersionName = '1.0' |
| | | } |
| | | |
| | | apply plugin: 'com.android.application' |
| | | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" |
| | | |
| | | android { |
| | | compileSdkVersion 27 |
| | | |
| | | lintOptions { |
| | | disable 'InvalidPackage' |
| | | } |
| | | |
| | | defaultConfig { |
| | | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). |
| | | applicationId "com.example.githubsearch" |
| | | minSdkVersion 16 |
| | | targetSdkVersion 27 |
| | | versionCode flutterVersionCode.toInteger() |
| | | versionName flutterVersionName |
| | | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
| | | } |
| | | |
| | | buildTypes { |
| | | release { |
| | | // TODO: Add your own signing config for the release build. |
| | | // Signing with the debug keys for now, so `flutter run --release` works. |
| | | signingConfig signingConfigs.debug |
| | | } |
| | | } |
| | | } |
| | | |
| | | flutter { |
| | | source '../..' |
| | | } |
| | | |
| | | dependencies { |
| | | testImplementation 'junit:junit:4.12' |
| | | androidTestImplementation 'com.android.support.test:runner:1.0.2' |
| | | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' |
| | | } |
| New file |
| | |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
| | | package="com.example.githubsearch"> |
| | | |
| | | <!-- The INTERNET permission is required for development. Specifically, |
| | | flutter needs it to communicate with the running application |
| | | to allow setting breakpoints, to provide hot reload, etc. |
| | | --> |
| | | <uses-permission android:name="android.permission.INTERNET"/> |
| | | |
| | | <!-- io.flutter.app.FlutterApplication is an android.app.Application that |
| | | calls FlutterMain.startInitialization(this); in its onCreate method. |
| | | In most cases you can leave this as-is, but you if you want to provide |
| | | additional functionality it is fine to subclass or reimplement |
| | | FlutterApplication and put your custom class here. --> |
| | | <application |
| | | android:name="io.flutter.app.FlutterApplication" |
| | | android:label="githubsearch" |
| | | android:icon="@mipmap/ic_launcher"> |
| | | <activity |
| | | android:name=".MainActivity" |
| | | android:launchMode="singleTop" |
| | | android:theme="@style/LaunchTheme" |
| | | android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density" |
| | | android:hardwareAccelerated="true" |
| | | android:windowSoftInputMode="adjustResize"> |
| | | <!-- This keeps the window background of the activity showing |
| | | until Flutter renders its first frame. It can be removed if |
| | | there is no splash screen (such as the default splash screen |
| | | defined in @style/LaunchTheme). --> |
| | | <meta-data |
| | | android:name="io.flutter.app.android.SplashScreenUntilFirstFrame" |
| | | android:value="true" /> |
| | | <intent-filter> |
| | | <action android:name="android.intent.action.MAIN"/> |
| | | <category android:name="android.intent.category.LAUNCHER"/> |
| | | </intent-filter> |
| | | </activity> |
| | | </application> |
| | | </manifest> |
| New file |
| | |
| | | package com.example.githubsearch; |
| | | |
| | | import android.os.Bundle; |
| | | import io.flutter.app.FlutterActivity; |
| | | import io.flutter.plugins.GeneratedPluginRegistrant; |
| | | |
| | | public class MainActivity extends FlutterActivity { |
| | | @Override |
| | | protected void onCreate(Bundle savedInstanceState) { |
| | | super.onCreate(savedInstanceState); |
| | | GeneratedPluginRegistrant.registerWith(this); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <!-- Modify this file to customize your launch splash screen --> |
| | | <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <item android:drawable="@android:color/white" /> |
| | | |
| | | <!-- You can insert your own image assets here --> |
| | | <!-- <item> |
| | | <bitmap |
| | | android:gravity="center" |
| | | android:src="@mipmap/launch_image" /> |
| | | </item> --> |
| | | </layer-list> |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <resources> |
| | | <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> |
| | | <!-- Show a splash screen on the activity. Automatically removed when |
| | | Flutter draws its first frame --> |
| | | <item name="android:windowBackground">@drawable/launch_background</item> |
| | | </style> |
| | | </resources> |
| New file |
| | |
| | | buildscript { |
| | | repositories { |
| | | google() |
| | | jcenter() |
| | | } |
| | | |
| | | dependencies { |
| | | classpath 'com.android.tools.build:gradle:3.1.2' |
| | | } |
| | | } |
| | | |
| | | allprojects { |
| | | repositories { |
| | | google() |
| | | jcenter() |
| | | } |
| | | } |
| | | |
| | | rootProject.buildDir = '../build' |
| | | subprojects { |
| | | project.buildDir = "${rootProject.buildDir}/${project.name}" |
| | | } |
| | | subprojects { |
| | | project.evaluationDependsOn(':app') |
| | | } |
| | | |
| | | task clean(type: Delete) { |
| | | delete rootProject.buildDir |
| | | } |
| New file |
| | |
| | | org.gradle.jvmargs=-Xmx1536M |
| New file |
| | |
| | | #Fri Jun 23 08:50:38 CEST 2017 |
| | | distributionBase=GRADLE_USER_HOME |
| | | distributionPath=wrapper/dists |
| | | zipStoreBase=GRADLE_USER_HOME |
| | | zipStorePath=wrapper/dists |
| | | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip |
| New file |
| | |
| | | #!/usr/bin/env bash |
| | | |
| | | ############################################################################## |
| | | ## |
| | | ## Gradle start up script for UN*X |
| | | ## |
| | | ############################################################################## |
| | | |
| | | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. |
| | | DEFAULT_JVM_OPTS="" |
| | | |
| | | APP_NAME="Gradle" |
| | | APP_BASE_NAME=`basename "$0"` |
| | | |
| | | # Use the maximum available, or set MAX_FD != -1 to use that value. |
| | | MAX_FD="maximum" |
| | | |
| | | warn ( ) { |
| | | echo "$*" |
| | | } |
| | | |
| | | die ( ) { |
| | | echo |
| | | echo "$*" |
| | | echo |
| | | exit 1 |
| | | } |
| | | |
| | | # OS specific support (must be 'true' or 'false'). |
| | | cygwin=false |
| | | msys=false |
| | | darwin=false |
| | | case "`uname`" in |
| | | CYGWIN* ) |
| | | cygwin=true |
| | | ;; |
| | | Darwin* ) |
| | | darwin=true |
| | | ;; |
| | | MINGW* ) |
| | | msys=true |
| | | ;; |
| | | esac |
| | | |
| | | # Attempt to set APP_HOME |
| | | # Resolve links: $0 may be a link |
| | | PRG="$0" |
| | | # Need this for relative symlinks. |
| | | while [ -h "$PRG" ] ; do |
| | | ls=`ls -ld "$PRG"` |
| | | link=`expr "$ls" : '.*-> \(.*\)$'` |
| | | if expr "$link" : '/.*' > /dev/null; then |
| | | PRG="$link" |
| | | else |
| | | PRG=`dirname "$PRG"`"/$link" |
| | | fi |
| | | done |
| | | SAVED="`pwd`" |
| | | cd "`dirname \"$PRG\"`/" >/dev/null |
| | | APP_HOME="`pwd -P`" |
| | | cd "$SAVED" >/dev/null |
| | | |
| | | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar |
| | | |
| | | # Determine the Java command to use to start the JVM. |
| | | if [ -n "$JAVA_HOME" ] ; then |
| | | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then |
| | | # IBM's JDK on AIX uses strange locations for the executables |
| | | JAVACMD="$JAVA_HOME/jre/sh/java" |
| | | else |
| | | JAVACMD="$JAVA_HOME/bin/java" |
| | | fi |
| | | if [ ! -x "$JAVACMD" ] ; then |
| | | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME |
| | | |
| | | Please set the JAVA_HOME variable in your environment to match the |
| | | location of your Java installation." |
| | | fi |
| | | else |
| | | JAVACMD="java" |
| | | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. |
| | | |
| | | Please set the JAVA_HOME variable in your environment to match the |
| | | location of your Java installation." |
| | | fi |
| | | |
| | | # Increase the maximum file descriptors if we can. |
| | | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then |
| | | MAX_FD_LIMIT=`ulimit -H -n` |
| | | if [ $? -eq 0 ] ; then |
| | | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then |
| | | MAX_FD="$MAX_FD_LIMIT" |
| | | fi |
| | | ulimit -n $MAX_FD |
| | | if [ $? -ne 0 ] ; then |
| | | warn "Could not set maximum file descriptor limit: $MAX_FD" |
| | | fi |
| | | else |
| | | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" |
| | | fi |
| | | fi |
| | | |
| | | # For Darwin, add options to specify how the application appears in the dock |
| | | if $darwin; then |
| | | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" |
| | | fi |
| | | |
| | | # For Cygwin, switch paths to Windows format before running java |
| | | if $cygwin ; then |
| | | APP_HOME=`cygpath --path --mixed "$APP_HOME"` |
| | | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` |
| | | JAVACMD=`cygpath --unix "$JAVACMD"` |
| | | |
| | | # We build the pattern for arguments to be converted via cygpath |
| | | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` |
| | | SEP="" |
| | | for dir in $ROOTDIRSRAW ; do |
| | | ROOTDIRS="$ROOTDIRS$SEP$dir" |
| | | SEP="|" |
| | | done |
| | | OURCYGPATTERN="(^($ROOTDIRS))" |
| | | # Add a user-defined pattern to the cygpath arguments |
| | | if [ "$GRADLE_CYGPATTERN" != "" ] ; then |
| | | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" |
| | | fi |
| | | # Now convert the arguments - kludge to limit ourselves to /bin/sh |
| | | i=0 |
| | | for arg in "$@" ; do |
| | | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` |
| | | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option |
| | | |
| | | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition |
| | | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` |
| | | else |
| | | eval `echo args$i`="\"$arg\"" |
| | | fi |
| | | i=$((i+1)) |
| | | done |
| | | case $i in |
| | | (0) set -- ;; |
| | | (1) set -- "$args0" ;; |
| | | (2) set -- "$args0" "$args1" ;; |
| | | (3) set -- "$args0" "$args1" "$args2" ;; |
| | | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; |
| | | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; |
| | | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; |
| | | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; |
| | | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; |
| | | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; |
| | | esac |
| | | fi |
| | | |
| | | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules |
| | | function splitJvmOpts() { |
| | | JVM_OPTS=("$@") |
| | | } |
| | | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS |
| | | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" |
| | | |
| | | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" |
| New file |
| | |
| | | @if "%DEBUG%" == "" @echo off |
| | | @rem ########################################################################## |
| | | @rem |
| | | @rem Gradle startup script for Windows |
| | | @rem |
| | | @rem ########################################################################## |
| | | |
| | | @rem Set local scope for the variables with windows NT shell |
| | | if "%OS%"=="Windows_NT" setlocal |
| | | |
| | | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. |
| | | set DEFAULT_JVM_OPTS= |
| | | |
| | | set DIRNAME=%~dp0 |
| | | if "%DIRNAME%" == "" set DIRNAME=. |
| | | set APP_BASE_NAME=%~n0 |
| | | set APP_HOME=%DIRNAME% |
| | | |
| | | @rem Find java.exe |
| | | if defined JAVA_HOME goto findJavaFromJavaHome |
| | | |
| | | set JAVA_EXE=java.exe |
| | | %JAVA_EXE% -version >NUL 2>&1 |
| | | if "%ERRORLEVEL%" == "0" goto init |
| | | |
| | | echo. |
| | | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. |
| | | echo. |
| | | echo Please set the JAVA_HOME variable in your environment to match the |
| | | echo location of your Java installation. |
| | | |
| | | goto fail |
| | | |
| | | :findJavaFromJavaHome |
| | | set JAVA_HOME=%JAVA_HOME:"=% |
| | | set JAVA_EXE=%JAVA_HOME%/bin/java.exe |
| | | |
| | | if exist "%JAVA_EXE%" goto init |
| | | |
| | | echo. |
| | | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% |
| | | echo. |
| | | echo Please set the JAVA_HOME variable in your environment to match the |
| | | echo location of your Java installation. |
| | | |
| | | goto fail |
| | | |
| | | :init |
| | | @rem Get command-line arguments, handling Windowz variants |
| | | |
| | | if not "%OS%" == "Windows_NT" goto win9xME_args |
| | | if "%@eval[2+2]" == "4" goto 4NT_args |
| | | |
| | | :win9xME_args |
| | | @rem Slurp the command line arguments. |
| | | set CMD_LINE_ARGS= |
| | | set _SKIP=2 |
| | | |
| | | :win9xME_args_slurp |
| | | if "x%~1" == "x" goto execute |
| | | |
| | | set CMD_LINE_ARGS=%* |
| | | goto execute |
| | | |
| | | :4NT_args |
| | | @rem Get arguments from the 4NT Shell from JP Software |
| | | set CMD_LINE_ARGS=%$ |
| | | |
| | | :execute |
| | | @rem Setup the command line |
| | | |
| | | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar |
| | | |
| | | @rem Execute Gradle |
| | | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% |
| | | |
| | | :end |
| | | @rem End local scope for the variables with windows NT shell |
| | | if "%ERRORLEVEL%"=="0" goto mainEnd |
| | | |
| | | :fail |
| | | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of |
| | | rem the _cmd.exe /c_ return code! |
| | | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 |
| | | exit /b 1 |
| | | |
| | | :mainEnd |
| | | if "%OS%"=="Windows_NT" endlocal |
| | | |
| | | :omega |
| New file |
| | |
| | | include ':app' |
| | | |
| | | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() |
| | | |
| | | def plugins = new Properties() |
| | | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') |
| | | if (pluginsFile.exists()) { |
| | | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } |
| | | } |
| | | |
| | | plugins.each { name, path -> |
| | | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() |
| | | include ":$name" |
| | | project(":$name").projectDir = pluginDirectory |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <module type="JAVA_MODULE" version="4"> |
| | | <component name="NewModuleRootManager" inherit-compiler-output="true"> |
| | | <exclude-output /> |
| | | <content url="file://$MODULE_DIR$"> |
| | | <sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" /> |
| | | <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" /> |
| | | <excludeFolder url="file://$MODULE_DIR$/.dart_tool" /> |
| | | <excludeFolder url="file://$MODULE_DIR$/.idea" /> |
| | | <excludeFolder url="file://$MODULE_DIR$/.pub" /> |
| | | <excludeFolder url="file://$MODULE_DIR$/build" /> |
| | | </content> |
| | | <orderEntry type="sourceFolder" forTests="false" /> |
| | | <orderEntry type="library" name="Dart SDK" level="project" /> |
| | | <orderEntry type="library" name="Flutter Plugins" level="project" /> |
| | | <orderEntry type="library" name="Dart Packages" level="project" /> |
| | | </component> |
| | | </module> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <module type="JAVA_MODULE" version="4"> |
| | | <component name="FacetManager"> |
| | | <facet type="android" name="Android"> |
| | | <configuration> |
| | | <option name="ALLOW_USER_CONFIGURATION" value="false" /> |
| | | <option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/android/gen" /> |
| | | <option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/android/gen" /> |
| | | <option name="MANIFEST_FILE_RELATIVE_PATH" value="/android/AndroidManifest.xml" /> |
| | | <option name="RES_FOLDER_RELATIVE_PATH" value="/android/res" /> |
| | | <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/android/assets" /> |
| | | <option name="LIBS_FOLDER_RELATIVE_PATH" value="/android/libs" /> |
| | | <option name="PROGUARD_LOGS_FOLDER_RELATIVE_PATH" value="/android/proguard_logs" /> |
| | | </configuration> |
| | | </facet> |
| | | </component> |
| | | <component name="NewModuleRootManager" inherit-compiler-output="true"> |
| | | <exclude-output /> |
| | | <content url="file://$MODULE_DIR$/android"> |
| | | <sourceFolder url="file://$MODULE_DIR$/android/app/src/main/java" isTestSource="false" /> |
| | | <sourceFolder url="file://$MODULE_DIR$/android/gen" isTestSource="false" generated="true" /> |
| | | </content> |
| | | <orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" /> |
| | | <orderEntry type="sourceFolder" forTests="false" /> |
| | | <orderEntry type="library" name="Flutter for Android" level="project" /> |
| | | </component> |
| | | </module> |
| New file |
| | |
| | | .idea/ |
| | | .vagrant/ |
| | | .sconsign.dblite |
| | | .svn/ |
| | | |
| | | .DS_Store |
| | | *.swp |
| | | profile |
| | | |
| | | DerivedData/ |
| | | build/ |
| | | GeneratedPluginRegistrant.h |
| | | GeneratedPluginRegistrant.m |
| | | |
| | | .generated/ |
| | | |
| | | *.pbxuser |
| | | *.mode1v3 |
| | | *.mode2v3 |
| | | *.perspectivev3 |
| | | |
| | | !default.pbxuser |
| | | !default.mode1v3 |
| | | !default.mode2v3 |
| | | !default.perspectivev3 |
| | | |
| | | xcuserdata |
| | | |
| | | *.moved-aside |
| | | |
| | | *.pyc |
| | | *sync/ |
| | | Icon? |
| | | .tags* |
| | | |
| | | /Flutter/app.flx |
| | | /Flutter/app.zip |
| | | /Flutter/flutter_assets/ |
| | | /Flutter/App.framework |
| | | /Flutter/Flutter.framework |
| | | /Flutter/Generated.xcconfig |
| | | /ServiceDefinitions.json |
| | | |
| | | Pods/ |
| | | .symlinks/ |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
| | | <plist version="1.0"> |
| | | <dict> |
| | | <key>CFBundleDevelopmentRegion</key> |
| | | <string>en</string> |
| | | <key>CFBundleExecutable</key> |
| | | <string>App</string> |
| | | <key>CFBundleIdentifier</key> |
| | | <string>io.flutter.flutter.app</string> |
| | | <key>CFBundleInfoDictionaryVersion</key> |
| | | <string>6.0</string> |
| | | <key>CFBundleName</key> |
| | | <string>App</string> |
| | | <key>CFBundlePackageType</key> |
| | | <string>FMWK</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>1.0</string> |
| | | <key>CFBundleSignature</key> |
| | | <string>????</string> |
| | | <key>CFBundleVersion</key> |
| | | <string>1.0</string> |
| | | <key>MinimumOSVersion</key> |
| | | <string>8.0</string> |
| | | </dict> |
| | | </plist> |
| New file |
| | |
| | | #include "Generated.xcconfig" |
| New file |
| | |
| | | #include "Generated.xcconfig" |
| New file |
| | |
| | | // !$*UTF8*$! |
| | | { |
| | | archiveVersion = 1; |
| | | classes = { |
| | | }; |
| | | objectVersion = 46; |
| | | objects = { |
| | | |
| | | /* Begin PBXBuildFile section */ |
| | | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; |
| | | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; |
| | | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; |
| | | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; |
| | | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; |
| | | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; |
| | | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; |
| | | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; |
| | | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; |
| | | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; |
| | | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; |
| | | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; |
| | | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; |
| | | /* End PBXBuildFile section */ |
| | | |
| | | /* Begin PBXCopyFilesBuildPhase section */ |
| | | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { |
| | | isa = PBXCopyFilesBuildPhase; |
| | | buildActionMask = 2147483647; |
| | | dstPath = ""; |
| | | dstSubfolderSpec = 10; |
| | | files = ( |
| | | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, |
| | | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, |
| | | ); |
| | | name = "Embed Frameworks"; |
| | | runOnlyForDeploymentPostprocessing = 0; |
| | | }; |
| | | /* End PBXCopyFilesBuildPhase section */ |
| | | |
| | | /* Begin PBXFileReference section */ |
| | | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; }; |
| | | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; |
| | | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; }; |
| | | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; |
| | | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; }; |
| | | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; }; |
| | | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; |
| | | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; |
| | | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; }; |
| | | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; }; |
| | | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; }; |
| | | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; |
| | | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; |
| | | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; |
| | | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; |
| | | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; |
| | | /* End PBXFileReference section */ |
| | | |
| | | /* Begin PBXFrameworksBuildPhase section */ |
| | | 97C146EB1CF9000F007C117D /* Frameworks */ = { |
| | | isa = PBXFrameworksBuildPhase; |
| | | buildActionMask = 2147483647; |
| | | files = ( |
| | | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, |
| | | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, |
| | | ); |
| | | runOnlyForDeploymentPostprocessing = 0; |
| | | }; |
| | | /* End PBXFrameworksBuildPhase section */ |
| | | |
| | | /* Begin PBXGroup section */ |
| | | 9740EEB11CF90186004384FC /* Flutter */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, |
| | | 3B80C3931E831B6300D905FE /* App.framework */, |
| | | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, |
| | | 9740EEBA1CF902C7004384FC /* Flutter.framework */, |
| | | 9740EEB21CF90195004384FC /* Debug.xcconfig */, |
| | | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, |
| | | 9740EEB31CF90195004384FC /* Generated.xcconfig */, |
| | | ); |
| | | name = Flutter; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 97C146E51CF9000F007C117D = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 9740EEB11CF90186004384FC /* Flutter */, |
| | | 97C146F01CF9000F007C117D /* Runner */, |
| | | 97C146EF1CF9000F007C117D /* Products */, |
| | | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, |
| | | ); |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 97C146EF1CF9000F007C117D /* Products */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 97C146EE1CF9000F007C117D /* Runner.app */, |
| | | ); |
| | | name = Products; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 97C146F01CF9000F007C117D /* Runner */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, |
| | | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, |
| | | 97C146FA1CF9000F007C117D /* Main.storyboard */, |
| | | 97C146FD1CF9000F007C117D /* Assets.xcassets */, |
| | | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, |
| | | 97C147021CF9000F007C117D /* Info.plist */, |
| | | 97C146F11CF9000F007C117D /* Supporting Files */, |
| | | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, |
| | | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, |
| | | ); |
| | | path = Runner; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 97C146F11CF9000F007C117D /* Supporting Files */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 97C146F21CF9000F007C117D /* main.m */, |
| | | ); |
| | | name = "Supporting Files"; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | /* End PBXGroup section */ |
| | | |
| | | /* Begin PBXNativeTarget section */ |
| | | 97C146ED1CF9000F007C117D /* Runner */ = { |
| | | isa = PBXNativeTarget; |
| | | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; |
| | | buildPhases = ( |
| | | 9740EEB61CF901F6004384FC /* Run Script */, |
| | | 97C146EA1CF9000F007C117D /* Sources */, |
| | | 97C146EB1CF9000F007C117D /* Frameworks */, |
| | | 97C146EC1CF9000F007C117D /* Resources */, |
| | | 9705A1C41CF9048500538489 /* Embed Frameworks */, |
| | | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, |
| | | ); |
| | | buildRules = ( |
| | | ); |
| | | dependencies = ( |
| | | ); |
| | | name = Runner; |
| | | productName = Runner; |
| | | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; |
| | | productType = "com.apple.product-type.application"; |
| | | }; |
| | | /* End PBXNativeTarget section */ |
| | | |
| | | /* Begin PBXProject section */ |
| | | 97C146E61CF9000F007C117D /* Project object */ = { |
| | | isa = PBXProject; |
| | | attributes = { |
| | | LastUpgradeCheck = 0910; |
| | | ORGANIZATIONNAME = "The Chromium Authors"; |
| | | TargetAttributes = { |
| | | 97C146ED1CF9000F007C117D = { |
| | | CreatedOnToolsVersion = 7.3.1; |
| | | }; |
| | | }; |
| | | }; |
| | | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; |
| | | compatibilityVersion = "Xcode 3.2"; |
| | | developmentRegion = English; |
| | | hasScannedForEncodings = 0; |
| | | knownRegions = ( |
| | | en, |
| | | Base, |
| | | ); |
| | | mainGroup = 97C146E51CF9000F007C117D; |
| | | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; |
| | | projectDirPath = ""; |
| | | projectRoot = ""; |
| | | targets = ( |
| | | 97C146ED1CF9000F007C117D /* Runner */, |
| | | ); |
| | | }; |
| | | /* End PBXProject section */ |
| | | |
| | | /* Begin PBXResourcesBuildPhase section */ |
| | | 97C146EC1CF9000F007C117D /* Resources */ = { |
| | | isa = PBXResourcesBuildPhase; |
| | | buildActionMask = 2147483647; |
| | | files = ( |
| | | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, |
| | | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, |
| | | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, |
| | | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, |
| | | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, |
| | | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, |
| | | ); |
| | | runOnlyForDeploymentPostprocessing = 0; |
| | | }; |
| | | /* End PBXResourcesBuildPhase section */ |
| | | |
| | | /* Begin PBXShellScriptBuildPhase section */ |
| | | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { |
| | | isa = PBXShellScriptBuildPhase; |
| | | buildActionMask = 2147483647; |
| | | files = ( |
| | | ); |
| | | inputPaths = ( |
| | | ); |
| | | name = "Thin Binary"; |
| | | outputPaths = ( |
| | | ); |
| | | runOnlyForDeploymentPostprocessing = 0; |
| | | shellPath = /bin/sh; |
| | | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; |
| | | }; |
| | | 9740EEB61CF901F6004384FC /* Run Script */ = { |
| | | isa = PBXShellScriptBuildPhase; |
| | | buildActionMask = 2147483647; |
| | | files = ( |
| | | ); |
| | | inputPaths = ( |
| | | ); |
| | | name = "Run Script"; |
| | | outputPaths = ( |
| | | ); |
| | | runOnlyForDeploymentPostprocessing = 0; |
| | | shellPath = /bin/sh; |
| | | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; |
| | | }; |
| | | /* End PBXShellScriptBuildPhase section */ |
| | | |
| | | /* Begin PBXSourcesBuildPhase section */ |
| | | 97C146EA1CF9000F007C117D /* Sources */ = { |
| | | isa = PBXSourcesBuildPhase; |
| | | buildActionMask = 2147483647; |
| | | files = ( |
| | | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, |
| | | 97C146F31CF9000F007C117D /* main.m in Sources */, |
| | | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, |
| | | ); |
| | | runOnlyForDeploymentPostprocessing = 0; |
| | | }; |
| | | /* End PBXSourcesBuildPhase section */ |
| | | |
| | | /* Begin PBXVariantGroup section */ |
| | | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { |
| | | isa = PBXVariantGroup; |
| | | children = ( |
| | | 97C146FB1CF9000F007C117D /* Base */, |
| | | ); |
| | | name = Main.storyboard; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { |
| | | isa = PBXVariantGroup; |
| | | children = ( |
| | | 97C147001CF9000F007C117D /* Base */, |
| | | ); |
| | | name = LaunchScreen.storyboard; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | /* End PBXVariantGroup section */ |
| | | |
| | | /* Begin XCBuildConfiguration section */ |
| | | 97C147031CF9000F007C117D /* Debug */ = { |
| | | isa = XCBuildConfiguration; |
| | | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | CLANG_ANALYZER_NONNULL = YES; |
| | | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
| | | CLANG_CXX_LIBRARY = "libc++"; |
| | | CLANG_ENABLE_MODULES = YES; |
| | | CLANG_ENABLE_OBJC_ARC = YES; |
| | | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; |
| | | CLANG_WARN_BOOL_CONVERSION = YES; |
| | | CLANG_WARN_COMMA = YES; |
| | | CLANG_WARN_CONSTANT_CONVERSION = YES; |
| | | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; |
| | | CLANG_WARN_EMPTY_BODY = YES; |
| | | CLANG_WARN_ENUM_CONVERSION = YES; |
| | | CLANG_WARN_INFINITE_RECURSION = YES; |
| | | CLANG_WARN_INT_CONVERSION = YES; |
| | | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; |
| | | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; |
| | | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; |
| | | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; |
| | | CLANG_WARN_STRICT_PROTOTYPES = YES; |
| | | CLANG_WARN_SUSPICIOUS_MOVE = YES; |
| | | CLANG_WARN_UNREACHABLE_CODE = YES; |
| | | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; |
| | | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
| | | COPY_PHASE_STRIP = NO; |
| | | DEBUG_INFORMATION_FORMAT = dwarf; |
| | | ENABLE_STRICT_OBJC_MSGSEND = YES; |
| | | ENABLE_TESTABILITY = YES; |
| | | GCC_C_LANGUAGE_STANDARD = gnu99; |
| | | GCC_DYNAMIC_NO_PIC = NO; |
| | | GCC_NO_COMMON_BLOCKS = YES; |
| | | GCC_OPTIMIZATION_LEVEL = 0; |
| | | GCC_PREPROCESSOR_DEFINITIONS = ( |
| | | "DEBUG=1", |
| | | "$(inherited)", |
| | | ); |
| | | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; |
| | | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; |
| | | GCC_WARN_UNDECLARED_SELECTOR = YES; |
| | | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; |
| | | GCC_WARN_UNUSED_FUNCTION = YES; |
| | | GCC_WARN_UNUSED_VARIABLE = YES; |
| | | IPHONEOS_DEPLOYMENT_TARGET = 8.0; |
| | | MTL_ENABLE_DEBUG_INFO = YES; |
| | | ONLY_ACTIVE_ARCH = YES; |
| | | SDKROOT = iphoneos; |
| | | TARGETED_DEVICE_FAMILY = "1,2"; |
| | | }; |
| | | name = Debug; |
| | | }; |
| | | 97C147041CF9000F007C117D /* Release */ = { |
| | | isa = XCBuildConfiguration; |
| | | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | CLANG_ANALYZER_NONNULL = YES; |
| | | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
| | | CLANG_CXX_LIBRARY = "libc++"; |
| | | CLANG_ENABLE_MODULES = YES; |
| | | CLANG_ENABLE_OBJC_ARC = YES; |
| | | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; |
| | | CLANG_WARN_BOOL_CONVERSION = YES; |
| | | CLANG_WARN_COMMA = YES; |
| | | CLANG_WARN_CONSTANT_CONVERSION = YES; |
| | | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; |
| | | CLANG_WARN_EMPTY_BODY = YES; |
| | | CLANG_WARN_ENUM_CONVERSION = YES; |
| | | CLANG_WARN_INFINITE_RECURSION = YES; |
| | | CLANG_WARN_INT_CONVERSION = YES; |
| | | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; |
| | | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; |
| | | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; |
| | | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; |
| | | CLANG_WARN_STRICT_PROTOTYPES = YES; |
| | | CLANG_WARN_SUSPICIOUS_MOVE = YES; |
| | | CLANG_WARN_UNREACHABLE_CODE = YES; |
| | | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; |
| | | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
| | | COPY_PHASE_STRIP = NO; |
| | | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; |
| | | ENABLE_NS_ASSERTIONS = NO; |
| | | ENABLE_STRICT_OBJC_MSGSEND = YES; |
| | | GCC_C_LANGUAGE_STANDARD = gnu99; |
| | | GCC_NO_COMMON_BLOCKS = YES; |
| | | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; |
| | | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; |
| | | GCC_WARN_UNDECLARED_SELECTOR = YES; |
| | | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; |
| | | GCC_WARN_UNUSED_FUNCTION = YES; |
| | | GCC_WARN_UNUSED_VARIABLE = YES; |
| | | IPHONEOS_DEPLOYMENT_TARGET = 8.0; |
| | | MTL_ENABLE_DEBUG_INFO = NO; |
| | | SDKROOT = iphoneos; |
| | | TARGETED_DEVICE_FAMILY = "1,2"; |
| | | VALIDATE_PRODUCT = YES; |
| | | }; |
| | | name = Release; |
| | | }; |
| | | 97C147061CF9000F007C117D /* Debug */ = { |
| | | isa = XCBuildConfiguration; |
| | | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; |
| | | buildSettings = { |
| | | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| | | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; |
| | | ENABLE_BITCODE = NO; |
| | | FRAMEWORK_SEARCH_PATHS = ( |
| | | "$(inherited)", |
| | | "$(PROJECT_DIR)/Flutter", |
| | | ); |
| | | INFOPLIST_FILE = Runner/Info.plist; |
| | | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; |
| | | LIBRARY_SEARCH_PATHS = ( |
| | | "$(inherited)", |
| | | "$(PROJECT_DIR)/Flutter", |
| | | ); |
| | | PRODUCT_BUNDLE_IDENTIFIER = com.example.githubsearch; |
| | | PRODUCT_NAME = "$(TARGET_NAME)"; |
| | | VERSIONING_SYSTEM = "apple-generic"; |
| | | }; |
| | | name = Debug; |
| | | }; |
| | | 97C147071CF9000F007C117D /* Release */ = { |
| | | isa = XCBuildConfiguration; |
| | | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; |
| | | buildSettings = { |
| | | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| | | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; |
| | | ENABLE_BITCODE = NO; |
| | | FRAMEWORK_SEARCH_PATHS = ( |
| | | "$(inherited)", |
| | | "$(PROJECT_DIR)/Flutter", |
| | | ); |
| | | INFOPLIST_FILE = Runner/Info.plist; |
| | | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; |
| | | LIBRARY_SEARCH_PATHS = ( |
| | | "$(inherited)", |
| | | "$(PROJECT_DIR)/Flutter", |
| | | ); |
| | | PRODUCT_BUNDLE_IDENTIFIER = com.example.githubsearch; |
| | | PRODUCT_NAME = "$(TARGET_NAME)"; |
| | | VERSIONING_SYSTEM = "apple-generic"; |
| | | }; |
| | | name = Release; |
| | | }; |
| | | /* End XCBuildConfiguration section */ |
| | | |
| | | /* Begin XCConfigurationList section */ |
| | | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { |
| | | isa = XCConfigurationList; |
| | | buildConfigurations = ( |
| | | 97C147031CF9000F007C117D /* Debug */, |
| | | 97C147041CF9000F007C117D /* Release */, |
| | | ); |
| | | defaultConfigurationIsVisible = 0; |
| | | defaultConfigurationName = Release; |
| | | }; |
| | | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { |
| | | isa = XCConfigurationList; |
| | | buildConfigurations = ( |
| | | 97C147061CF9000F007C117D /* Debug */, |
| | | 97C147071CF9000F007C117D /* Release */, |
| | | ); |
| | | defaultConfigurationIsVisible = 0; |
| | | defaultConfigurationName = Release; |
| | | }; |
| | | /* End XCConfigurationList section */ |
| | | }; |
| | | rootObject = 97C146E61CF9000F007C117D /* Project object */; |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <Workspace |
| | | version = "1.0"> |
| | | <FileRef |
| | | location = "group:Runner.xcodeproj"> |
| | | </FileRef> |
| | | </Workspace> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <Scheme |
| | | LastUpgradeVersion = "0910" |
| | | version = "1.3"> |
| | | <BuildAction |
| | | parallelizeBuildables = "YES" |
| | | buildImplicitDependencies = "YES"> |
| | | <BuildActionEntries> |
| | | <BuildActionEntry |
| | | buildForTesting = "YES" |
| | | buildForRunning = "YES" |
| | | buildForProfiling = "YES" |
| | | buildForArchiving = "YES" |
| | | buildForAnalyzing = "YES"> |
| | | <BuildableReference |
| | | BuildableIdentifier = "primary" |
| | | BlueprintIdentifier = "97C146ED1CF9000F007C117D" |
| | | BuildableName = "Runner.app" |
| | | BlueprintName = "Runner" |
| | | ReferencedContainer = "container:Runner.xcodeproj"> |
| | | </BuildableReference> |
| | | </BuildActionEntry> |
| | | </BuildActionEntries> |
| | | </BuildAction> |
| | | <TestAction |
| | | buildConfiguration = "Debug" |
| | | selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" |
| | | selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" |
| | | language = "" |
| | | shouldUseLaunchSchemeArgsEnv = "YES"> |
| | | <Testables> |
| | | </Testables> |
| | | <MacroExpansion> |
| | | <BuildableReference |
| | | BuildableIdentifier = "primary" |
| | | BlueprintIdentifier = "97C146ED1CF9000F007C117D" |
| | | BuildableName = "Runner.app" |
| | | BlueprintName = "Runner" |
| | | ReferencedContainer = "container:Runner.xcodeproj"> |
| | | </BuildableReference> |
| | | </MacroExpansion> |
| | | <AdditionalOptions> |
| | | </AdditionalOptions> |
| | | </TestAction> |
| | | <LaunchAction |
| | | buildConfiguration = "Debug" |
| | | selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" |
| | | selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" |
| | | language = "" |
| | | launchStyle = "0" |
| | | useCustomWorkingDirectory = "NO" |
| | | ignoresPersistentStateOnLaunch = "NO" |
| | | debugDocumentVersioning = "YES" |
| | | debugServiceExtension = "internal" |
| | | allowLocationSimulation = "YES"> |
| | | <BuildableProductRunnable |
| | | runnableDebuggingMode = "0"> |
| | | <BuildableReference |
| | | BuildableIdentifier = "primary" |
| | | BlueprintIdentifier = "97C146ED1CF9000F007C117D" |
| | | BuildableName = "Runner.app" |
| | | BlueprintName = "Runner" |
| | | ReferencedContainer = "container:Runner.xcodeproj"> |
| | | </BuildableReference> |
| | | </BuildableProductRunnable> |
| | | <AdditionalOptions> |
| | | </AdditionalOptions> |
| | | </LaunchAction> |
| | | <ProfileAction |
| | | buildConfiguration = "Release" |
| | | shouldUseLaunchSchemeArgsEnv = "YES" |
| | | savedToolIdentifier = "" |
| | | useCustomWorkingDirectory = "NO" |
| | | debugDocumentVersioning = "YES"> |
| | | <BuildableProductRunnable |
| | | runnableDebuggingMode = "0"> |
| | | <BuildableReference |
| | | BuildableIdentifier = "primary" |
| | | BlueprintIdentifier = "97C146ED1CF9000F007C117D" |
| | | BuildableName = "Runner.app" |
| | | BlueprintName = "Runner" |
| | | ReferencedContainer = "container:Runner.xcodeproj"> |
| | | </BuildableReference> |
| | | </BuildableProductRunnable> |
| | | </ProfileAction> |
| | | <AnalyzeAction |
| | | buildConfiguration = "Debug"> |
| | | </AnalyzeAction> |
| | | <ArchiveAction |
| | | buildConfiguration = "Release" |
| | | revealArchiveInOrganizer = "YES"> |
| | | </ArchiveAction> |
| | | </Scheme> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <Workspace |
| | | version = "1.0"> |
| | | <FileRef |
| | | location = "group:Runner.xcodeproj"> |
| | | </FileRef> |
| | | </Workspace> |
| New file |
| | |
| | | #import <Flutter/Flutter.h> |
| | | #import <UIKit/UIKit.h> |
| | | |
| | | @interface AppDelegate : FlutterAppDelegate |
| | | |
| | | @end |
| New file |
| | |
| | | #include "AppDelegate.h" |
| | | #include "GeneratedPluginRegistrant.h" |
| | | |
| | | @implementation AppDelegate |
| | | |
| | | - (BOOL)application:(UIApplication *)application |
| | | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { |
| | | [GeneratedPluginRegistrant registerWithRegistry:self]; |
| | | // Override point for customization after application launch. |
| | | return [super application:application didFinishLaunchingWithOptions:launchOptions]; |
| | | } |
| | | |
| | | @end |
| New file |
| | |
| | | { |
| | | "images" : [ |
| | | { |
| | | "size" : "20x20", |
| | | "idiom" : "iphone", |
| | | "filename" : "Icon-App-20x20@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "size" : "20x20", |
| | | "idiom" : "iphone", |
| | | "filename" : "Icon-App-20x20@3x.png", |
| | | "scale" : "3x" |
| | | }, |
| | | { |
| | | "size" : "29x29", |
| | | "idiom" : "iphone", |
| | | "filename" : "Icon-App-29x29@1x.png", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "size" : "29x29", |
| | | "idiom" : "iphone", |
| | | "filename" : "Icon-App-29x29@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "size" : "29x29", |
| | | "idiom" : "iphone", |
| | | "filename" : "Icon-App-29x29@3x.png", |
| | | "scale" : "3x" |
| | | }, |
| | | { |
| | | "size" : "40x40", |
| | | "idiom" : "iphone", |
| | | "filename" : "Icon-App-40x40@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "size" : "40x40", |
| | | "idiom" : "iphone", |
| | | "filename" : "Icon-App-40x40@3x.png", |
| | | "scale" : "3x" |
| | | }, |
| | | { |
| | | "size" : "60x60", |
| | | "idiom" : "iphone", |
| | | "filename" : "Icon-App-60x60@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "size" : "60x60", |
| | | "idiom" : "iphone", |
| | | "filename" : "Icon-App-60x60@3x.png", |
| | | "scale" : "3x" |
| | | }, |
| | | { |
| | | "size" : "20x20", |
| | | "idiom" : "ipad", |
| | | "filename" : "Icon-App-20x20@1x.png", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "size" : "20x20", |
| | | "idiom" : "ipad", |
| | | "filename" : "Icon-App-20x20@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "size" : "29x29", |
| | | "idiom" : "ipad", |
| | | "filename" : "Icon-App-29x29@1x.png", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "size" : "29x29", |
| | | "idiom" : "ipad", |
| | | "filename" : "Icon-App-29x29@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "size" : "40x40", |
| | | "idiom" : "ipad", |
| | | "filename" : "Icon-App-40x40@1x.png", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "size" : "40x40", |
| | | "idiom" : "ipad", |
| | | "filename" : "Icon-App-40x40@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "size" : "76x76", |
| | | "idiom" : "ipad", |
| | | "filename" : "Icon-App-76x76@1x.png", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "size" : "76x76", |
| | | "idiom" : "ipad", |
| | | "filename" : "Icon-App-76x76@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "size" : "83.5x83.5", |
| | | "idiom" : "ipad", |
| | | "filename" : "Icon-App-83.5x83.5@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "size" : "1024x1024", |
| | | "idiom" : "ios-marketing", |
| | | "filename" : "Icon-App-1024x1024@1x.png", |
| | | "scale" : "1x" |
| | | } |
| | | ], |
| | | "info" : { |
| | | "version" : 1, |
| | | "author" : "xcode" |
| | | } |
| | | } |
| New file |
| | |
| | | { |
| | | "images" : [ |
| | | { |
| | | "idiom" : "universal", |
| | | "filename" : "LaunchImage.png", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "idiom" : "universal", |
| | | "filename" : "LaunchImage@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "idiom" : "universal", |
| | | "filename" : "LaunchImage@3x.png", |
| | | "scale" : "3x" |
| | | } |
| | | ], |
| | | "info" : { |
| | | "version" : 1, |
| | | "author" : "xcode" |
| | | } |
| | | } |
| New file |
| | |
| | | # Launch Screen Assets |
| | | |
| | | You can customize the launch screen with your own desired assets by replacing the image files in this directory. |
| | | |
| | | 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. |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> |
| | | <dependencies> |
| | | <deployment identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/> |
| | | </dependencies> |
| | | <scenes> |
| | | <!--View Controller--> |
| | | <scene sceneID="EHf-IW-A2E"> |
| | | <objects> |
| | | <viewController id="01J-lp-oVM" sceneMemberID="viewController"> |
| | | <layoutGuides> |
| | | <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/> |
| | | <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/> |
| | | </layoutGuides> |
| | | <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> |
| | | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
| | | <subviews> |
| | | <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"> |
| | | </imageView> |
| | | </subviews> |
| | | <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <constraints> |
| | | <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/> |
| | | <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/> |
| | | </constraints> |
| | | </view> |
| | | </viewController> |
| | | <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> |
| | | </objects> |
| | | <point key="canvasLocation" x="53" y="375"/> |
| | | </scene> |
| | | </scenes> |
| | | <resources> |
| | | <image name="LaunchImage" width="168" height="185"/> |
| | | </resources> |
| | | </document> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> |
| | | <dependencies> |
| | | <deployment identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> |
| | | </dependencies> |
| | | <scenes> |
| | | <!--Flutter View Controller--> |
| | | <scene sceneID="tne-QT-ifu"> |
| | | <objects> |
| | | <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController"> |
| | | <layoutGuides> |
| | | <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> |
| | | <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> |
| | | </layoutGuides> |
| | | <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> |
| | | <rect key="frame" x="0.0" y="0.0" width="600" height="600"/> |
| | | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
| | | <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> |
| | | </view> |
| | | </viewController> |
| | | <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> |
| | | </objects> |
| | | </scene> |
| | | </scenes> |
| | | </document> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
| | | <plist version="1.0"> |
| | | <dict> |
| | | <key>CFBundleDevelopmentRegion</key> |
| | | <string>en</string> |
| | | <key>CFBundleExecutable</key> |
| | | <string>$(EXECUTABLE_NAME)</string> |
| | | <key>CFBundleIdentifier</key> |
| | | <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> |
| | | <key>CFBundleInfoDictionaryVersion</key> |
| | | <string>6.0</string> |
| | | <key>CFBundleName</key> |
| | | <string>githubsearch</string> |
| | | <key>CFBundlePackageType</key> |
| | | <string>APPL</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>$(FLUTTER_BUILD_NAME)</string> |
| | | <key>CFBundleSignature</key> |
| | | <string>????</string> |
| | | <key>CFBundleVersion</key> |
| | | <string>$(FLUTTER_BUILD_NUMBER)</string> |
| | | <key>LSRequiresIPhoneOS</key> |
| | | <true/> |
| | | <key>UILaunchStoryboardName</key> |
| | | <string>LaunchScreen</string> |
| | | <key>UIMainStoryboardFile</key> |
| | | <string>Main</string> |
| | | <key>UISupportedInterfaceOrientations</key> |
| | | <array> |
| | | <string>UIInterfaceOrientationPortrait</string> |
| | | <string>UIInterfaceOrientationLandscapeLeft</string> |
| | | <string>UIInterfaceOrientationLandscapeRight</string> |
| | | </array> |
| | | <key>UISupportedInterfaceOrientations~ipad</key> |
| | | <array> |
| | | <string>UIInterfaceOrientationPortrait</string> |
| | | <string>UIInterfaceOrientationPortraitUpsideDown</string> |
| | | <string>UIInterfaceOrientationLandscapeLeft</string> |
| | | <string>UIInterfaceOrientationLandscapeRight</string> |
| | | </array> |
| | | <key>UIViewControllerBasedStatusBarAppearance</key> |
| | | <false/> |
| | | </dict> |
| | | </plist> |
| New file |
| | |
| | | #import <Flutter/Flutter.h> |
| | | #import <UIKit/UIKit.h> |
| | | #import "AppDelegate.h" |
| | | |
| | | int main(int argc, char* argv[]) { |
| | | @autoreleasepool { |
| | | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); |
| | | } |
| | | } |
| New file |
| | |
| | | import './github_search_api.dart'; |
| | | import 'package:json_annotation/json_annotation.dart'; |
| | | |
| | | part 'SearchResult.g.dart'; |
| | | |
| | | @JsonSerializable() |
| | | class SearchResult extends Object with _$SearchResultSerializerMixin { |
| | | final SearchResultKind kind; |
| | | final List<SearchResultItem> items; |
| | | |
| | | SearchResult(this.kind, this.items); |
| | | |
| | | factory SearchResult.noTerm() => |
| | | new SearchResult(SearchResultKind.noTerm, <SearchResultItem>[]); |
| | | |
| | | factory SearchResult.fromJson(dynamic json) { |
| | | final items = (json as List) |
| | | .cast<Map<String, Object>>() |
| | | .map((Map<String, Object> item) { |
| | | return new SearchResultItem.fromJson(item); |
| | | }).toList(); |
| | | |
| | | return new SearchResult( |
| | | items.isEmpty ? SearchResultKind.empty : SearchResultKind.populated, |
| | | items, |
| | | ); |
| | | } |
| | | |
| | | bool get isPopulated => kind == SearchResultKind.populated; |
| | | |
| | | bool get isEmpty => kind == SearchResultKind.empty; |
| | | |
| | | bool get isNoTerm => kind == SearchResultKind.noTerm; |
| | | } |
| New file |
| | |
| | | // GENERATED CODE - DO NOT MODIFY BY HAND |
| | | |
| | | part of 'SearchResult.dart'; |
| | | |
| | | // ************************************************************************** |
| | | // JsonSerializableGenerator |
| | | // ************************************************************************** |
| | | |
| | | SearchResult _$SearchResultFromJson(Map<String, dynamic> json) { |
| | | return new SearchResult( |
| | | $enumDecodeNullable( |
| | | 'SearchResultKind', SearchResultKind.values, json['kind'] as String), |
| | | (json['items'] as List) |
| | | ?.map((e) => e == null |
| | | ? null |
| | | : new SearchResultItem.fromJson(e as Map<String, Object>)) |
| | | ?.toList()); |
| | | } |
| | | |
| | | abstract class _$SearchResultSerializerMixin { |
| | | SearchResultKind get kind; |
| | | List<SearchResultItem> get items; |
| | | Map<String, dynamic> toJson() => <String, dynamic>{ |
| | | 'kind': kind?.toString()?.split('.')?.last, |
| | | 'items': items |
| | | }; |
| | | } |
| New file |
| | |
| | | import 'github_search_api.dart'; |
| | | import './SearchResult.dart'; |
| | | import 'package:json_annotation/json_annotation.dart'; |
| | | |
| | | part 'SearchState.g.dart'; |
| | | |
| | | @JsonSerializable() |
| | | class SearchState extends Object with _$SearchStateSerializerMixin { |
| | | final SearchResult result; |
| | | final bool hasError; |
| | | final bool isLoading; |
| | | |
| | | SearchState({ |
| | | this.result, |
| | | this.hasError = false, |
| | | this.isLoading = false, |
| | | }); |
| | | |
| | | factory SearchState.initial() => |
| | | new SearchState(result: SearchResult.noTerm()); |
| | | |
| | | factory SearchState.loading() => SearchState(isLoading: true); |
| | | |
| | | factory SearchState.error() => SearchState(hasError: true); |
| | | } |
| New file |
| | |
| | | // GENERATED CODE - DO NOT MODIFY BY HAND |
| | | |
| | | part of 'SearchState.dart'; |
| | | |
| | | // ************************************************************************** |
| | | // JsonSerializableGenerator |
| | | // ************************************************************************** |
| | | |
| | | SearchState _$SearchStateFromJson(Map<String, dynamic> json) { |
| | | return new SearchState( |
| | | result: json['result'] == null |
| | | ? null |
| | | : new SearchResult.fromJson(json['result']), |
| | | hasError: json['hasError'] as bool, |
| | | isLoading: json['isLoading'] as bool); |
| | | } |
| | | |
| | | abstract class _$SearchStateSerializerMixin { |
| | | SearchResult get result; |
| | | bool get hasError; |
| | | bool get isLoading; |
| | | Map<String, dynamic> toJson() => <String, dynamic>{ |
| | | 'result': result, |
| | | 'hasError': hasError, |
| | | 'isLoading': isLoading |
| | | }; |
| | | } |
| New file |
| | |
| | | import 'package:flutter/material.dart'; |
| | | |
| | | class EmptyResultWidget extends StatelessWidget { |
| | | final bool isEmpty; |
| | | |
| | | EmptyResultWidget(this.isEmpty); |
| | | |
| | | @override |
| | | Widget build(BuildContext context) { |
| | | return new AnimatedOpacity( |
| | | duration: new Duration(milliseconds: 300), |
| | | opacity: isEmpty ? 1.0 : 0.0, |
| | | child: new Container( |
| | | alignment: FractionalOffset.center, |
| | | child: new Column( |
| | | mainAxisAlignment: MainAxisAlignment.center, |
| | | children: <Widget>[ |
| | | new Icon( |
| | | Icons.warning, |
| | | color: Colors.yellow[200], |
| | | size: 80.0, |
| | | ), |
| | | new Container( |
| | | padding: new EdgeInsets.only(top: 16.0), |
| | | child: new Text( |
| | | "No results", |
| | | style: new TextStyle(color: Colors.yellow[100]), |
| | | ), |
| | | ) |
| | | ], |
| | | ), |
| | | ), |
| | | ); |
| | | } |
| | | } |
| New file |
| | |
| | | import 'dart:async'; |
| | | import 'dart:convert'; |
| | | import 'dart:io'; |
| | | import './SearchResult.dart'; |
| | | |
| | | class GithubApi { |
| | | final String baseUrl; |
| | | final Map<String, SearchResult> cache; |
| | | final HttpClient client; |
| | | |
| | | GithubApi({ |
| | | HttpClient client, |
| | | Map<String, SearchResult> cache, |
| | | this.baseUrl = "https://api.github.com/search/repositories?q=", |
| | | }) : this.client = client ?? new HttpClient(), |
| | | this.cache = cache ?? <String, SearchResult>{}; |
| | | |
| | | /// Search Github for repositories using the given term |
| | | Future<SearchResult> search(String term) async { |
| | | if (term.isEmpty) { |
| | | return new SearchResult.noTerm(); |
| | | } else if (cache.containsKey(term)) { |
| | | return cache[term]; |
| | | } else { |
| | | final result = await _fetchResults(term); |
| | | |
| | | cache[term] = result; |
| | | |
| | | return result; |
| | | } |
| | | } |
| | | |
| | | Future<SearchResult> _fetchResults(String term) async { |
| | | final request = await new HttpClient().getUrl(Uri.parse("$baseUrl$term")); |
| | | final response = await request.close(); |
| | | final results = json.decode(await response.transform(utf8.decoder).join()); |
| | | |
| | | return new SearchResult.fromJson(results['items']); |
| | | } |
| | | } |
| | | |
| | | enum SearchResultKind { noTerm, empty, populated } |
| | | |
| | | class SearchResultItem { |
| | | final String fullName; |
| | | final String url; |
| | | final String avatarUrl; |
| | | |
| | | toJson() { |
| | | return {'fullName': fullName, 'url': url, 'avatarUrl': avatarUrl}; |
| | | } |
| | | |
| | | SearchResultItem(this.fullName, this.url, this.avatarUrl); |
| | | |
| | | factory SearchResultItem.fromJson(Map<String, Object> json) { |
| | | return new SearchResultItem( |
| | | json['full_name'] as String, |
| | | json["html_url"] as String, |
| | | (json["owner"] as Map<String, Object>)["avatar_url"] as String, |
| | | ); |
| | | } |
| | | } |
| New file |
| | |
| | | import 'package:flutter/material.dart'; |
| | | import 'package:flutter_redux/flutter_redux.dart'; |
| | | import 'empty_result_widget.dart'; |
| | | import 'redux.dart'; |
| | | import 'search_error_widget.dart'; |
| | | import 'search_intro_widget.dart'; |
| | | import 'search_loading_widget.dart'; |
| | | import 'search_result_widget.dart'; |
| | | import './SearchState.dart'; |
| | | |
| | | class SearchScreen extends StatelessWidget { |
| | | SearchScreen({Key key}) : super(key: key); |
| | | |
| | | @override |
| | | Widget build(BuildContext context) { |
| | | return new StoreConnector<SearchState, SearchScreenViewModel>( |
| | | converter: (store) { |
| | | return SearchScreenViewModel( |
| | | state: store.state, |
| | | onTextChanged: (term) => store.dispatch(SearchAction(term)), |
| | | ); |
| | | }, |
| | | builder: (BuildContext context, SearchScreenViewModel vm) { |
| | | return new Scaffold( |
| | | body: new Stack( |
| | | children: <Widget>[ |
| | | new Flex(direction: Axis.vertical, children: <Widget>[ |
| | | new Container( |
| | | padding: new EdgeInsets.fromLTRB(16.0, 24.0, 16.0, 4.0), |
| | | child: new TextField( |
| | | decoration: new InputDecoration( |
| | | border: InputBorder.none, |
| | | hintText: 'Search Github...', |
| | | ), |
| | | style: new TextStyle( |
| | | fontSize: 36.0, |
| | | fontFamily: "Hind", |
| | | decoration: TextDecoration.none, |
| | | ), |
| | | onChanged: vm.onTextChanged, |
| | | ), |
| | | ), |
| | | new Expanded( |
| | | child: new Stack( |
| | | children: <Widget>[ |
| | | // Fade in an intro screen if no term has been entered |
| | | new SearchIntroWidget(vm.state.result?.isNoTerm ?? false), |
| | | |
| | | // Fade in an Empty Result screen if the search contained |
| | | // no items |
| | | new EmptyResultWidget(vm.state.result?.isEmpty ?? false), |
| | | |
| | | // Fade in a loading screen when results are being fetched |
| | | // from Github |
| | | new SearchLoadingWidget(vm.state.isLoading ?? false), |
| | | |
| | | // Fade in an error if something went wrong when fetching |
| | | // the results |
| | | new SearchErrorWidget(vm.state.hasError ?? false), |
| | | |
| | | // Fade in the Result if available |
| | | new SearchResultWidget(vm.state.result), |
| | | ], |
| | | ), |
| | | ) |
| | | ]) |
| | | ], |
| | | ), |
| | | ); |
| | | }, |
| | | ); |
| | | } |
| | | } |
| | | |
| | | class SearchScreenViewModel { |
| | | final SearchState state; |
| | | final void Function(String term) onTextChanged; |
| | | |
| | | SearchScreenViewModel({this.state, this.onTextChanged}); |
| | | } |
| New file |
| | |
| | | import 'package:flutter/material.dart'; |
| | | import 'package:flutter_redux/flutter_redux.dart'; |
| | | import 'github_search_api.dart'; |
| | | import 'github_search_widget.dart'; |
| | | import 'redux.dart'; |
| | | import 'package:redux/redux.dart'; |
| | | import 'package:redux_epics/redux_epics.dart'; |
| | | import 'package:redux_dev_tools/redux_dev_tools.dart'; |
| | | import 'package:redux_remote_devtools/redux_remote_devtools.dart'; |
| | | import './SearchState.dart'; |
| | | |
| | | const REMOTE_HOST = '192.168.1.52:8000'; |
| | | |
| | | void main() async { |
| | | var remoteDevtools = RemoteDevToolsMiddleware(REMOTE_HOST); |
| | | await remoteDevtools.connect(); |
| | | final store = new DevToolsStore<SearchState>(searchReducer, |
| | | initialState: SearchState.initial(), |
| | | middleware: [ |
| | | remoteDevtools, |
| | | EpicMiddleware<SearchState>(SearchEpic(GithubApi())), |
| | | ]); |
| | | |
| | | remoteDevtools.store = store; |
| | | |
| | | runApp(new RxDartGithubSearchApp( |
| | | store: store, |
| | | )); |
| | | } |
| | | |
| | | class RxDartGithubSearchApp extends StatelessWidget { |
| | | final Store<SearchState> store; |
| | | |
| | | RxDartGithubSearchApp({Key key, this.store}) : super(key: key); |
| | | |
| | | @override |
| | | Widget build(BuildContext context) { |
| | | return new StoreProvider<SearchState>( |
| | | store: store, |
| | | child: new MaterialApp( |
| | | title: 'RxDart Github Search', |
| | | theme: new ThemeData( |
| | | brightness: Brightness.dark, |
| | | primarySwatch: Colors.grey, |
| | | ), |
| | | home: new SearchScreen(), |
| | | ), |
| | | ); |
| | | } |
| | | } |
| New file |
| | |
| | | import 'dart:async'; |
| | | import 'github_search_api.dart'; |
| | | |
| | | import 'package:async/async.dart'; |
| | | import 'package:redux/redux.dart'; |
| | | import 'package:redux_epics/redux_epics.dart'; |
| | | import 'package:rxdart/rxdart.dart'; |
| | | |
| | | import './SearchState.dart'; |
| | | import './SearchResult.dart'; |
| | | |
| | | // The State represents the data the View requires. The View consumes a Stream |
| | | // of States. The view rebuilds every time the Stream emits a new State! |
| | | // |
| | | // The State Stream will emit new States depending on the situation: The |
| | | // initial state, loading states, the list of results, and any errors that |
| | | // happen. |
| | | // |
| | | // The State Stream responds to input from the View by accepting a |
| | | // Stream<String>. We call this Stream the onTextChanged "intent". |
| | | |
| | | /// Actions |
| | | class SearchAction { |
| | | final String term; |
| | | |
| | | SearchAction(this.term); |
| | | |
| | | toJson() { |
| | | return {'term': term}; |
| | | } |
| | | } |
| | | |
| | | class SearchLoadingAction {} |
| | | |
| | | class SearchErrorAction {} |
| | | |
| | | class SearchResultAction { |
| | | final SearchResult result; |
| | | |
| | | toJson() { |
| | | return {'result': result}; |
| | | } |
| | | |
| | | SearchResultAction(this.result); |
| | | } |
| | | |
| | | /// Reducer |
| | | final searchReducer = combineReducers<SearchState>([ |
| | | TypedReducer<SearchState, SearchLoadingAction>(_onLoad), |
| | | TypedReducer<SearchState, SearchErrorAction>(_onError), |
| | | TypedReducer<SearchState, SearchResultAction>(_onResult), |
| | | ]); |
| | | |
| | | SearchState _onLoad(SearchState state, SearchLoadingAction action) => |
| | | SearchState.loading(); |
| | | |
| | | SearchState _onError(SearchState state, SearchErrorAction action) => |
| | | SearchState.error(); |
| | | |
| | | SearchState _onResult(SearchState state, SearchResultAction action) => |
| | | SearchState(result: action.result, isLoading: false); |
| | | |
| | | /// The Search Middleware will listen for Search Actions and perform the search |
| | | /// after the user stop typing for 250ms. |
| | | /// |
| | | /// If a previous search was still loading, we will cancel the operation and |
| | | /// fetch a new set of results. This ensures only results for the latest search |
| | | /// term are shown. |
| | | class SearchMiddleware implements MiddlewareClass<SearchState> { |
| | | final GithubApi api; |
| | | |
| | | Timer _timer; |
| | | CancelableOperation<Store<SearchState>> _operation; |
| | | |
| | | SearchMiddleware(this.api); |
| | | |
| | | @override |
| | | void call(Store<SearchState> store, dynamic action, NextDispatcher next) { |
| | | if (action is SearchAction) { |
| | | // Stop our previous debounce timer and search. |
| | | _timer?.cancel(); |
| | | _operation?.cancel(); |
| | | |
| | | // Don't start searching until the user pauses for 250ms. This will stop |
| | | // us from over-fetching from our backend. |
| | | _timer = new Timer(new Duration(milliseconds: 250), () { |
| | | store.dispatch(SearchLoadingAction()); |
| | | |
| | | // Instead of a simple Future, we'll use a CancellableOperation from the |
| | | // `async` package. This will allow us to cancel the previous operation |
| | | // if a new Search term comes in. This will prevent us from |
| | | // accidentally showing stale results. |
| | | _operation = CancelableOperation.fromFuture(api |
| | | .search(action.term) |
| | | .then((result) => store..dispatch(SearchResultAction(result))) |
| | | .catchError((e, s) => store..dispatch(SearchErrorAction()))); |
| | | }); |
| | | } |
| | | |
| | | // Make sure to forward actions to the next middleware in the chain! |
| | | next(action); |
| | | } |
| | | } |
| | | |
| | | /// The Search Epic provides the same functionality as the Search Middleware, |
| | | /// but uses redux_epics and the RxDart package to perform the work. It will |
| | | /// listen for Search Actions and perform the search after the user stop typing |
| | | /// for 250ms. |
| | | /// |
| | | /// If a previous search was still loading, we will cancel the operation and |
| | | /// fetch a new set of results. This ensures only results for the latest search |
| | | /// term are shown. |
| | | class SearchEpic implements EpicClass<SearchState> { |
| | | final GithubApi api; |
| | | |
| | | SearchEpic(this.api); |
| | | |
| | | @override |
| | | Stream<dynamic> call(Stream<dynamic> actions, EpicStore<SearchState> store) { |
| | | return Observable(actions) |
| | | // Narrow down to SearchAction actions |
| | | .ofType(TypeToken<SearchAction>()) |
| | | // Don't start searching until the user pauses for 250ms |
| | | .debounce(new Duration(milliseconds: 250)) |
| | | // Cancel the previous search and start a new one with switchMap |
| | | .switchMap((action) => _search(action.term)); |
| | | } |
| | | |
| | | // Use the async* function to make our lives easier |
| | | Stream<dynamic> _search(String term) async* { |
| | | // Dispatch a SearchLoadingAction to show a loading spinner |
| | | yield SearchLoadingAction(); |
| | | |
| | | try { |
| | | // If the api call is successful, dispatch the results for display |
| | | yield SearchResultAction(await api.search(term)); |
| | | } catch (e) { |
| | | // If the search call fails, dispatch an error so we can show it |
| | | yield SearchErrorAction(); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | import 'package:flutter/material.dart'; |
| | | |
| | | class SearchErrorWidget extends StatelessWidget { |
| | | final bool hasError; |
| | | |
| | | SearchErrorWidget(this.hasError); |
| | | |
| | | @override |
| | | Widget build(BuildContext context) { |
| | | return new AnimatedOpacity( |
| | | duration: new Duration(milliseconds: 300), |
| | | opacity: hasError ? 1.0 : 0.0, |
| | | child: new Container( |
| | | alignment: FractionalOffset.center, |
| | | child: new Column( |
| | | mainAxisAlignment: MainAxisAlignment.center, |
| | | crossAxisAlignment: CrossAxisAlignment.center, |
| | | children: <Widget>[ |
| | | new Icon(Icons.error_outline, color: Colors.red[300], size: 80.0), |
| | | new Container( |
| | | padding: new EdgeInsets.only(top: 16.0), |
| | | child: new Text( |
| | | "Rate limit exceeded", |
| | | style: new TextStyle( |
| | | color: Colors.red[300], |
| | | ), |
| | | ), |
| | | ) |
| | | ], |
| | | ), |
| | | ), |
| | | ); |
| | | } |
| | | } |
| New file |
| | |
| | | import 'package:flutter/material.dart'; |
| | | |
| | | class SearchIntroWidget extends StatelessWidget { |
| | | final bool isVisible; |
| | | |
| | | SearchIntroWidget(this.isVisible); |
| | | |
| | | @override |
| | | Widget build(BuildContext context) { |
| | | return new AnimatedOpacity( |
| | | duration: new Duration(milliseconds: 300), |
| | | opacity: isVisible ? 1.0 : 0.0, |
| | | child: new Container( |
| | | alignment: FractionalOffset.center, |
| | | child: new Column( |
| | | mainAxisAlignment: MainAxisAlignment.center, |
| | | children: <Widget>[ |
| | | new Icon(Icons.info, color: Colors.green[200], size: 80.0), |
| | | new Container( |
| | | padding: new EdgeInsets.only(top: 16.0), |
| | | child: new Text( |
| | | "Enter a search term to begin", |
| | | style: new TextStyle( |
| | | color: Colors.green[100], |
| | | ), |
| | | ), |
| | | ) |
| | | ], |
| | | ), |
| | | ), |
| | | ); |
| | | } |
| | | } |
| New file |
| | |
| | | import 'package:flutter/material.dart'; |
| | | |
| | | class SearchLoadingWidget extends StatelessWidget { |
| | | final bool isLoading; |
| | | |
| | | SearchLoadingWidget(this.isLoading); |
| | | |
| | | @override |
| | | Widget build(BuildContext context) { |
| | | return new AnimatedOpacity( |
| | | duration: new Duration(milliseconds: 300), |
| | | opacity: isLoading ? 1.0 : 0.0, |
| | | child: new Container( |
| | | alignment: FractionalOffset.center, |
| | | child: new CircularProgressIndicator(), |
| | | ), |
| | | ); |
| | | } |
| | | } |
| New file |
| | |
| | | import 'package:flutter/material.dart'; |
| | | import 'github_search_api.dart'; |
| | | import './SearchResult.dart'; |
| | | |
| | | class SearchResultWidget extends StatelessWidget { |
| | | final SearchResult result; |
| | | |
| | | SearchResultWidget(this.result); |
| | | |
| | | @override |
| | | Widget build(BuildContext context) { |
| | | return new AnimatedOpacity( |
| | | duration: new Duration(milliseconds: 300), |
| | | opacity: result != null && result.isPopulated ? 1.0 : 0.0, |
| | | child: new ListView.builder( |
| | | itemCount: result?.items?.length ?? 0, |
| | | itemBuilder: (context, index) { |
| | | final item = result.items[index]; |
| | | return new InkWell( |
| | | onTap: () => showItem(context, item), |
| | | child: new Container( |
| | | alignment: FractionalOffset.center, |
| | | margin: new EdgeInsets.fromLTRB(16.0, 12.0, 16.0, 12.0), |
| | | child: new Row( |
| | | crossAxisAlignment: CrossAxisAlignment.start, |
| | | children: <Widget>[ |
| | | new Container( |
| | | margin: new EdgeInsets.only(right: 16.0), |
| | | child: new Hero( |
| | | tag: item.fullName, |
| | | child: new ClipOval( |
| | | child: new Image.network( |
| | | item.avatarUrl, |
| | | width: 56.0, |
| | | height: 56.0, |
| | | ), |
| | | ), |
| | | ), |
| | | ), |
| | | new Expanded( |
| | | child: new Column( |
| | | crossAxisAlignment: CrossAxisAlignment.start, |
| | | children: <Widget>[ |
| | | new Container( |
| | | margin: new EdgeInsets.only( |
| | | top: 6.0, |
| | | bottom: 4.0, |
| | | ), |
| | | child: new Text( |
| | | "${item.fullName}", |
| | | maxLines: 1, |
| | | overflow: TextOverflow.ellipsis, |
| | | style: new TextStyle( |
| | | fontFamily: "Montserrat", |
| | | fontSize: 16.0, |
| | | fontWeight: FontWeight.bold, |
| | | ), |
| | | ), |
| | | ), |
| | | new Container( |
| | | child: new Text( |
| | | "${item.url}", |
| | | style: new TextStyle( |
| | | fontFamily: "Hind", |
| | | ), |
| | | maxLines: 1, |
| | | overflow: TextOverflow.ellipsis, |
| | | ), |
| | | ) |
| | | ], |
| | | ), |
| | | ) |
| | | ], |
| | | ), |
| | | ), |
| | | ); |
| | | }, |
| | | ), |
| | | ); |
| | | } |
| | | |
| | | void showItem(BuildContext context, SearchResultItem item) { |
| | | Navigator.push( |
| | | context, |
| | | new MaterialPageRoute<Null>( |
| | | builder: (BuildContext context) { |
| | | return new Scaffold( |
| | | resizeToAvoidBottomPadding: false, |
| | | body: new GestureDetector( |
| | | key: new Key(item.avatarUrl), |
| | | onTap: () => Navigator.pop(context), |
| | | child: new SizedBox.expand( |
| | | child: new Hero( |
| | | tag: item.fullName, |
| | | child: new Image.network( |
| | | item.avatarUrl, |
| | | width: MediaQuery.of(context).size.width, |
| | | height: 300.0, |
| | | ), |
| | | ), |
| | | ), |
| | | ), |
| | | ); |
| | | }, |
| | | ), |
| | | ); |
| | | } |
| | | } |
| New file |
| | |
| | | name: githubsearch |
| | | description: A new Flutter project. |
| | | |
| | | # The following defines the version and build number for your application. |
| | | # A version number is three numbers separated by dots, like 1.2.43 |
| | | # followed by an optional build number separated by a +. |
| | | # Both the version and the builder number may be overridden in flutter |
| | | # build by specifying --build-name and --build-number, respectively. |
| | | # Read more about versioning at semver.org. |
| | | version: 1.0.0+1 |
| | | |
| | | environment: |
| | | sdk: '>=2.0.0-dev.68.0 <3.0.0' |
| | | |
| | | dependencies: |
| | | flutter: |
| | | sdk: flutter |
| | | flutter_redux: 0.5.0 |
| | | redux_dev_tools: ^0.4.0 |
| | | async: ^2.0.7 |
| | | redux_epics: 0.10.2 |
| | | rxdart: ^0.18.1 |
| | | json_annotation: ^0.2.3 |
| | | redux_remote_devtools: |
| | | path: ../../ |
| | | |
| | | # The following adds the Cupertino Icons font to your application. |
| | | # Use with the CupertinoIcons class for iOS style icons. |
| | | cupertino_icons: ^0.1.2 |
| | | |
| | | dev_dependencies: |
| | | flutter_test: |
| | | sdk: flutter |
| | | build_runner: ^0.9.0 |
| | | json_serializable: ^0.5.4 |
| | | |
| | | # For information on the generic Dart part of this file, see the |
| | | # following page: https://www.dartlang.org/tools/pub/pubspec |
| | | |
| | | # The following section is specific to Flutter. |
| | | flutter: |
| | | # The following line ensures that the Material Icons font is |
| | | # included with your application, so that you can use the icons in |
| | | # the material Icons class. |
| | | uses-material-design: true |
| | | # To add assets to your application, add an assets section, like this: |
| | | # assets: |
| | | # - images/a_dot_burr.jpeg |
| | | # - images/a_dot_ham.jpeg |
| | | # An image asset can refer to one or more resolution-specific "variants", see |
| | | # https://flutter.io/assets-and-images/#resolution-aware. |
| | | # For details regarding adding assets from package dependencies, see |
| | | # https://flutter.io/assets-and-images/#from-packages |
| | | # To add custom fonts to your application, add a fonts section here, |
| | | # in this "flutter" section. Each entry in this list should have a |
| | | # "family" key with the font family name, and a "fonts" key with a |
| | | # list giving the asset and other descriptors for the font. For |
| | | # example: |
| | | # fonts: |
| | | # - family: Schyler |
| | | # fonts: |
| | | # - asset: fonts/Schyler-Regular.ttf |
| | | # - asset: fonts/Schyler-Italic.ttf |
| | | # style: italic |
| | | # - family: Trajan Pro |
| | | # fonts: |
| | | # - asset: fonts/TrajanPro.ttf |
| | | # - asset: fonts/TrajanPro_Bold.ttf |
| | | # weight: 700 |
| | | # |
| | | # For details regarding fonts from package dependencies, |
| | | # see https://flutter.io/custom-fonts/#from-packages |
| New file |
| | |
| | | // This is a basic Flutter widget test. |
| | | // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter |
| | | // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to |
| | | // find child widgets in the widget tree, read text, and verify that the values of widget properties |
| | | // are correct. |
| | | |
| | | import 'package:flutter/material.dart'; |
| | | import 'package:flutter_test/flutter_test.dart'; |
| | | |
| | | import 'package:githubsearch/main.dart'; |
| | | |
| | | void main() { |
| | | testWidgets('Counter increments smoke test', (WidgetTester tester) async { |
| | | // Build our app and trigger a frame. |
| | | await tester.pumpWidget(new RxDartGithubSearchApp()); |
| | | |
| | | // Verify that our counter starts at 0. |
| | | expect(find.text('0'), findsOneWidget); |
| | | expect(find.text('1'), findsNothing); |
| | | |
| | | // Tap the '+' icon and trigger a frame. |
| | | await tester.tap(find.byIcon(Icons.add)); |
| | | await tester.pump(); |
| | | |
| | | // Verify that our counter has incremented. |
| | | expect(find.text('0'), findsNothing); |
| | | expect(find.text('1'), findsOneWidget); |
| | | }); |
| | | } |
| New file |
| | |
| | | library redux_remote_devtools; |
| | | |
| | | import 'package:redux/redux.dart'; |
| | | import 'package:socketcluster_client/socketcluster_client.dart'; |
| | | import 'package:redux_dev_tools/redux_dev_tools.dart'; |
| | | import 'dart:convert'; |
| | | import 'dart:async'; |
| | | |
| | | part './src/action_encoder.dart'; |
| | | part './src/socketcluster_wrapper.dart'; |
| | | part './src/state_encoder.dart'; |
| | | part './src/remote_devtools_middleware.dart'; |
| New file |
| | |
| | | part of redux_remote_devtools; |
| | | |
| | | /// Interface for custom action encoding logic |
| | | abstract class ActionEncoder { |
| | | const ActionEncoder(); |
| | | |
| | | // Converts an action into a string suitable for sending to devtools |
| | | String encode(dynamic action); |
| | | } |
| | | |
| | | /// An action encoder that converts an action to stringified JSON |
| | | class JsonActionEncoder extends ActionEncoder { |
| | | const JsonActionEncoder() : super(); |
| | | |
| | | /// Encodes an action as stringified JSON |
| | | /// |
| | | /// Uses the form: |
| | | /// |
| | | /// { |
| | | /// "type": "TYPE" |
| | | /// "payload": jsonEncode(action) |
| | | /// } |
| | | /// |
| | | /// Action type is set to be the class name for class based |
| | | /// actions, or an enum value for enum actions |
| | | String encode(dynamic action) { |
| | | try { |
| | | return jsonEncode({'type': getActionType(action), 'payload': action}); |
| | | } on Error { |
| | | return jsonEncode({'type': getActionType(action)}); |
| | | } |
| | | } |
| | | |
| | | /// Gets a type name for the action, based on the class name or value |
| | | String getActionType(dynamic action) { |
| | | if (action.toString().contains('Instance of')) { |
| | | return action.runtimeType.toString(); |
| | | } |
| | | return action.toString(); |
| | | } |
| | | } |
| New file |
| | |
| | | part of redux_remote_devtools; |
| | | |
| | | class RemoteDevToolsMiddleware extends MiddlewareClass { |
| | | /** |
| | | * The remote-devtools server to connect to. Should include |
| | | * protocol and port if necessary. For example: |
| | | * |
| | | * example.lan:8000 |
| | | * |
| | | */ |
| | | String _host; |
| | | SocketClusterWrapper socket; |
| | | Store store; |
| | | String _channel; |
| | | bool _started = false; |
| | | |
| | | ActionEncoder actionEncoder; |
| | | StateEncoder stateEncoder; |
| | | |
| | | RemoteDevToolsMiddleware(this._host, |
| | | {this.actionEncoder = const JsonActionEncoder(), |
| | | this.stateEncoder = const JsonStateEncoder(), |
| | | this.socket}) { |
| | | if (socket == null) { |
| | | this.socket = |
| | | new SocketClusterWrapper('ws://${this._host}/socketcluster/'); |
| | | } |
| | | } |
| | | |
| | | connect() async { |
| | | await this.socket.connect(); |
| | | this._channel = await this._login(); |
| | | this._relay('START'); |
| | | _started = true; |
| | | this.socket.on(_channel, (String name, dynamic data) { |
| | | this.handleEventFromRemote(data as Map<String, dynamic>); |
| | | }); |
| | | if (this.store != null) { |
| | | this._relay('ACTION', store.state, 'CONNECT'); |
| | | } |
| | | } |
| | | |
| | | Future<String> _login() { |
| | | Completer<String> c = new Completer<String>(); |
| | | this.socket.emit('login', 'master', |
| | | (String name, dynamic error, dynamic data) { |
| | | c.complete(data as String); |
| | | }); |
| | | return c.future; |
| | | } |
| | | |
| | | _relay(String type, [Object state, dynamic action, String nextActionId]) { |
| | | var message = {'type': type, 'id': socket.id, 'name': 'flutter'}; |
| | | |
| | | if (state != null) { |
| | | message['payload'] = this.stateEncoder.encode(state); |
| | | } |
| | | if (type == 'ACTION') { |
| | | message['action'] = this.actionEncoder.encode(action); |
| | | message['nextActionId'] = nextActionId; |
| | | } else if (action != null) { |
| | | message['action'] = action as String; |
| | | } |
| | | socket.emit(this.socket.id != null ? 'log' : 'log-noid', message); |
| | | } |
| | | |
| | | void handleEventFromRemote(Map<String, dynamic> data) { |
| | | switch (data['type'] as String) { |
| | | case 'DISPATCH': |
| | | _handleDispatch(data['action']); |
| | | break; |
| | | default: |
| | | print('Unknown type:' + data['type'].toString()); |
| | | } |
| | | } |
| | | |
| | | void _handleDispatch(dynamic action) { |
| | | switch (action['type'] as String) { |
| | | case 'JUMP_TO_STATE': |
| | | if (this.store != null) { |
| | | this |
| | | .store |
| | | .dispatch(new DevToolsAction.jumpToState(action['index'] as int)); |
| | | } else { |
| | | print('No store reference set, cannot dispatch remote action'); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | |
| | | /// Middleware function called by redux, dispatches actions to devtools |
| | | call(Store store, dynamic action, NextDispatcher next) { |
| | | next(action); |
| | | if (_started && !(action is DevToolsAction)) { |
| | | this._relay('ACTION', store.state, action); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | part of redux_remote_devtools; |
| | | |
| | | class SocketClusterWrapper { |
| | | Socket _socket; |
| | | Function socketFactory; |
| | | String url; |
| | | SocketClusterWrapper(this.url, {this.socketFactory = Socket.connect}); |
| | | |
| | | Future<void> connect() async { |
| | | this._socket = await socketFactory(this.url); |
| | | } |
| | | |
| | | Emitter on(String event, Function func) { |
| | | return this._socket.on(event, func); |
| | | } |
| | | |
| | | void emit(String event, Object data, [AckCall ack]) { |
| | | this._socket.emit(event, data, ack); |
| | | } |
| | | |
| | | get id => this._socket.id; |
| | | } |
| New file |
| | |
| | | part of redux_remote_devtools; |
| | | |
| | | /// Interface for custom State encoding logic |
| | | abstract class StateEncoder { |
| | | const StateEncoder(); |
| | | |
| | | // Converts a State instance into a string suitable for sending to devtools |
| | | String encode(dynamic state); |
| | | } |
| | | |
| | | /// A State encoder that converts a state instances to stringified JSON |
| | | class JsonStateEncoder extends StateEncoder { |
| | | const JsonStateEncoder() : super(); |
| | | |
| | | /// Encodes a state instance as stringified JSON |
| | | String encode(dynamic state) { |
| | | return jsonEncode(state); |
| | | } |
| | | } |
| New file |
| | |
| | | name: redux_remote_devtools |
| | | description: Remote DevTools for Redux.dart |
| | | author: Michael Marner <michael@20papercups.net> |
| | | homepage: https://github.com/MichaelMarner/dart-redux-remote-devtools |
| | | version: 0.0.5 |
| | | dependencies: |
| | | redux: ^3.0.0 |
| | | redux_dev_tools: ^0.4.0 |
| | | socketcluster_client: ^0.0.3 |
| | | dev_dependencies: |
| | | test: ^1.3.0 |
| | | mockito: ^3.0.0 |
| | | environment: |
| | | sdk: '>=2.0.0 <3.0.0' |
| New file |
| | |
| | | import 'dart:convert'; |
| | | import 'package:test/test.dart'; |
| | | import '../lib/redux_remote_devtools.dart'; |
| | | |
| | | class TestAction { |
| | | int value; |
| | | TestAction({this.value}); |
| | | toJson() { |
| | | return {'value': this.value}; |
| | | } |
| | | } |
| | | |
| | | enum EnumActions { SimpleEnumAction } |
| | | |
| | | void main() { |
| | | group('JsonActionEncoder', () { |
| | | group('encodeAction', () { |
| | | test('Returns a jsonified action', () { |
| | | var encoder = new JsonActionEncoder(); |
| | | var result = encoder.encode(new TestAction(value: 5)); |
| | | var decoded = jsonDecode(result); |
| | | expect(decoded['type'], equals('TestAction')); |
| | | expect(decoded['payload']['value'], equals(5)); |
| | | }); |
| | | |
| | | test('Still returns the type if action is not jsonable', () { |
| | | var encoder = new JsonActionEncoder(); |
| | | var result = encoder.encode(EnumActions.SimpleEnumAction); |
| | | var decoded = jsonDecode(result); |
| | | expect(decoded['type'], equals('EnumActions.SimpleEnumAction')); |
| | | expect(decoded['payload'], equals(null)); |
| | | }); |
| | | }); |
| | | |
| | | group('getActionType', () { |
| | | test('Returns the class name for a class based action', () { |
| | | var encoder = new JsonActionEncoder(); |
| | | var result = encoder.getActionType(new TestAction()); |
| | | expect(result, equals('TestAction')); |
| | | }); |
| | | test('Returns the value for enum actions', () { |
| | | var encoder = new JsonActionEncoder(); |
| | | var result = encoder.getActionType(EnumActions.SimpleEnumAction); |
| | | expect(result, equals('EnumActions.SimpleEnumAction')); |
| | | }); |
| | | }); |
| | | }); |
| | | } |
| New file |
| | |
| | | import '../lib/redux_remote_devtools.dart'; |
| | | import 'package:mockito/mockito.dart'; |
| | | import 'package:test/test.dart'; |
| | | import 'dart:async'; |
| | | import 'package:redux/redux.dart'; |
| | | import 'package:redux_dev_tools/redux_dev_tools.dart'; |
| | | |
| | | class MockSocket extends Mock implements SocketClusterWrapper {} |
| | | |
| | | class MockStore extends Mock implements Store {} |
| | | |
| | | class Next { |
| | | next(action) {} |
| | | } |
| | | |
| | | enum TestActions { SomeAction, SomeOtherAction } |
| | | |
| | | class MockNext extends Mock implements Next {} |
| | | |
| | | void main() { |
| | | group('RemoteDevtoolsMiddleware', () { |
| | | group('constructor', () { |
| | | test('socket is not connected', () { |
| | | var socket = new MockSocket(); |
| | | new RemoteDevToolsMiddleware('example.com', socket: socket); |
| | | verifyNever(socket.connect()); |
| | | }); |
| | | }); |
| | | group('connect', () { |
| | | var socket; |
| | | RemoteDevToolsMiddleware devtools; |
| | | Future connectResponse; |
| | | setUp(() { |
| | | socket = new MockSocket(); |
| | | devtools = RemoteDevToolsMiddleware('example.com', socket: socket); |
| | | }); |
| | | test('it connects the socket', () { |
| | | devtools.connect(); |
| | | verify(socket.connect()); |
| | | }); |
| | | test('it sends the login message', () async { |
| | | when(socket.connect()).thenAnswer((_) => new Future.value()); |
| | | when(socket.id).thenReturn('testId'); |
| | | when(socket.emit("login", "master", captureAny)) |
| | | .thenAnswer((Invocation i) { |
| | | Function fn = i.positionalArguments[2]; |
| | | fn('testChannel', 'err', 'data'); |
| | | }); |
| | | await devtools.connect(); |
| | | verify(socket.emit("login", "master", captureAny)); |
| | | }); |
| | | test('it sends the start message message', () async { |
| | | when(socket.emit("login", "master", captureAny)) |
| | | .thenAnswer((Invocation i) { |
| | | Function fn = i.positionalArguments[2]; |
| | | fn('testChannel', 'err', 'data'); |
| | | }); |
| | | when(socket.id).thenReturn('testId'); |
| | | connectResponse = await devtools.connect(); |
| | | verify(socket.emit("log", |
| | | {'type': "START", 'id': 'testId', 'name': 'flutter'}, captureAny)); |
| | | }); |
| | | test('it sends the state', () async { |
| | | when(socket.emit("login", "master", captureAny)) |
| | | .thenAnswer((Invocation i) { |
| | | Function fn = i.positionalArguments[2]; |
| | | fn('testChannel', 'err', 'data'); |
| | | }); |
| | | when(socket.id).thenReturn('testId'); |
| | | var store = MockStore(); |
| | | when(store.state).thenReturn('TEST STATE'); |
| | | devtools.store = store; |
| | | connectResponse = await devtools.connect(); |
| | | verify(socket.emit("log", |
| | | {'type': "START", 'id': 'testId', 'name': 'flutter'}, captureAny)); |
| | | verify(socket.emit( |
| | | "log", |
| | | { |
| | | 'type': "ACTION", |
| | | 'id': 'testId', |
| | | 'name': 'flutter', |
| | | 'payload': '"TEST STATE"', |
| | | 'action': '{"type":"CONNECT","payload":"CONNECT"}', |
| | | 'nextActionId': null |
| | | }, |
| | | captureAny)); |
| | | }); |
| | | }); |
| | | group('call', () { |
| | | SocketClusterWrapper socket; |
| | | RemoteDevToolsMiddleware devtools; |
| | | Next next = new MockNext(); |
| | | Store store; |
| | | setUp(() async { |
| | | store = new MockStore(); |
| | | when(store.state).thenReturn({'state': 42}); |
| | | socket = new MockSocket(); |
| | | when(socket.emit("login", "master", captureAny)) |
| | | .thenAnswer((Invocation i) { |
| | | Function fn = i.positionalArguments[2]; |
| | | fn('testChannel', 'err', 'data'); |
| | | }); |
| | | when(socket.id).thenReturn('testId'); |
| | | when(socket.connect()).thenAnswer((_) => new Future.value()); |
| | | devtools = RemoteDevToolsMiddleware('example.com', socket: socket); |
| | | await devtools.connect(); |
| | | }); |
| | | test('the action and state are sent', () { |
| | | devtools.call(store, TestActions.SomeAction, next.next); |
| | | verify(socket.emit( |
| | | 'log', |
| | | { |
| | | 'type': 'ACTION', |
| | | 'id': 'testId', |
| | | 'name': 'flutter', |
| | | 'payload': '{"state":42}', |
| | | 'action': '{"type":"TestActions.SomeAction"}', |
| | | 'nextActionId': null |
| | | }, |
| | | captureAny)); |
| | | }); |
| | | test('calls next', () { |
| | | devtools.call(store, TestActions.SomeAction, next.next); |
| | | verify(next.next(TestActions.SomeAction)); |
| | | }); |
| | | }); |
| | | group('remote action', () { |
| | | SocketClusterWrapper socket; |
| | | RemoteDevToolsMiddleware devtools; |
| | | Store store; |
| | | setUp(() async { |
| | | store = new MockStore(); |
| | | when(store.state).thenReturn({'state': 42}); |
| | | socket = new MockSocket(); |
| | | when(socket.emit("login", "master", captureAny)) |
| | | .thenAnswer((Invocation i) { |
| | | Function fn = i.positionalArguments[2]; |
| | | fn('testChannel', 'err', 'data'); |
| | | }); |
| | | when(socket.id).thenReturn('testId'); |
| | | when(socket.connect()).thenAnswer((_) => new Future.value()); |
| | | devtools = RemoteDevToolsMiddleware('example.com', socket: socket); |
| | | devtools.store = store; |
| | | await devtools.connect(); |
| | | }); |
| | | test('handles time travel', () { |
| | | var remoteData = { |
| | | 'type': 'DISPATCH', |
| | | 'action': {'type': 'JUMP_TO_STATE', 'index': 4} |
| | | }; |
| | | devtools.handleEventFromRemote(remoteData); |
| | | verify(store.dispatch(new DevToolsAction.jumpToState(4))); |
| | | }); |
| | | test('Does not dispatch if store has not been sent', () { |
| | | devtools.store = null; |
| | | var remoteData = { |
| | | 'type': 'DISPATCH', |
| | | 'action': {'type': 'JUMP_TO_STATE', 'index': 4} |
| | | }; |
| | | expect( |
| | | () => devtools.handleEventFromRemote(remoteData), returnsNormally); |
| | | }); |
| | | }); |
| | | }); |
| | | } |
| New file |
| | |
| | | import 'package:test/test.dart'; |
| | | import 'package:mockito/mockito.dart'; |
| | | import 'package:test/test.dart'; |
| | | import 'package:socketcluster_client/socketcluster_client.dart'; |
| | | import 'dart:async'; |
| | | import '../lib/redux_remote_devtools.dart'; |
| | | |
| | | class SocketFactory { |
| | | connect(String url) {} |
| | | } |
| | | |
| | | class MockFactory extends Mock implements SocketFactory {} |
| | | |
| | | class MockSocket extends Mock implements Socket {} |
| | | |
| | | void main() { |
| | | group('SocketClusterWrapper', () { |
| | | group('Constructor', () { |
| | | test('It sets the URL', () { |
| | | var wrapper = new SocketClusterWrapper('ws://example.com'); |
| | | expect(wrapper.url, 'ws://example.com'); |
| | | }); |
| | | test('Does not attempt to connect', () { |
| | | var factory = new MockFactory(); |
| | | new SocketClusterWrapper('ws://example.com', |
| | | socketFactory: factory.connect); |
| | | verifyNever(factory.connect(captureAny)); |
| | | }); |
| | | }); |
| | | |
| | | group('connect', () { |
| | | test('It calls connect with the correct URL', () { |
| | | var factory = new MockFactory(); |
| | | var socket = new SocketClusterWrapper('ws://example.com', |
| | | socketFactory: factory.connect); |
| | | socket.connect(); |
| | | verify(factory.connect('ws://example.com')); |
| | | }); |
| | | }); |
| | | |
| | | group('on', () { |
| | | test('It passes the args through', () async { |
| | | var socket = new MockSocket(); |
| | | var wrapper = new SocketClusterWrapper('ws://example.com', |
| | | socketFactory: (String s) => Future.value(socket)); |
| | | var testFunc = () => 'asf'; |
| | | await wrapper.connect(); |
| | | wrapper.on('testEvent', testFunc); |
| | | verify(socket.on('testEvent', testFunc)); |
| | | }); |
| | | }); |
| | | |
| | | group('emit', () { |
| | | test('It passes the args through', () async { |
| | | var socket = new MockSocket(); |
| | | var wrapper = new SocketClusterWrapper('ws://example.com', |
| | | socketFactory: (String s) => Future.value(socket)); |
| | | var testFunc = (String s, dynamic err, dynamic data) => 'asf'; |
| | | await wrapper.connect(); |
| | | wrapper.emit('event', 'data', testFunc); |
| | | verify(socket.emit('event', 'data', testFunc)); |
| | | }); |
| | | }); |
| | | |
| | | group('id', () { |
| | | test('It passes the args through', () async { |
| | | var socket = new MockSocket(); |
| | | when(socket.id).thenReturn('TestId'); |
| | | var wrapper = new SocketClusterWrapper('ws://example.com', |
| | | socketFactory: (String s) => Future.value(socket)); |
| | | var testFunc = (String s, dynamic err, dynamic data) => 'asf'; |
| | | await wrapper.connect(); |
| | | expect(wrapper.id, 'TestId'); |
| | | }); |
| | | }); |
| | | }); |
| | | } |
| New file |
| | |
| | | import 'dart:convert'; |
| | | import 'package:test/test.dart'; |
| | | import '../lib/redux_remote_devtools.dart'; |
| | | |
| | | class TestState { |
| | | int value; |
| | | TestState({this.value}); |
| | | toJson() { |
| | | return {'value': this.value}; |
| | | } |
| | | } |
| | | |
| | | class TestUnencodableState { |
| | | int value; |
| | | TestUnencodableState({this.value}); |
| | | } |
| | | |
| | | enum EnumActions { SimpleEnumAction } |
| | | |
| | | void main() { |
| | | group('JsonStateEncoder', () { |
| | | group('encode', () { |
| | | test('Returns a jsonified state', () { |
| | | var encoder = new JsonStateEncoder(); |
| | | var result = encoder.encode(new TestState(value: 5)); |
| | | var decoded = jsonDecode(result); |
| | | expect(decoded['value'], equals(5)); |
| | | }); |
| | | test('Throws an exception if unencodable', () { |
| | | var encoder = new JsonStateEncoder(); |
| | | var testFunc = () { |
| | | encoder.encode(new TestUnencodableState(value: 5)); |
| | | }; |
| | | expect(testFunc, throwsA(TypeMatcher<JsonUnsupportedObjectError>())); |
| | | }); |
| | | }); |
| | | }); |
| | | } |
| New file |
| | |
| | | import 'action_encoder_test.dart' as actionEncoder; |
| | | import 'socketcluster_wrapper_test.dart' as socketWrapper; |
| | | import 'state_encoder_test.dart' as stateEncoder; |
| | | import 'remote_devtools_middleware_test.dart' as devtools; |
| | | |
| | | /// Script for running all tests on Travis CI |
| | | /// Allows us to generate code coverage |
| | | void main() { |
| | | actionEncoder.main(); |
| | | stateEncoder.main(); |
| | | devtools.main(); |
| | | socketWrapper.main(); |
| | | } |
| New file |
| | |
| | | #!/bin/bash |
| | | |
| | | # Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| | | # for details. All rights reserved. Use of this source code is governed by a |
| | | # BSD-style license that can be found in the LICENSE file. |
| | | |
| | | # Fast fail the script on failures. |
| | | set -e |
| | | |
| | | # Run pub get to fetch packages. |
| | | pub get |
| | | pub global activate coverage |
| | | |
| | | # Run the tests. |
| | | echo "Running tests..." |
| | | pub run test --reporter expanded |
| | | |
| | | # Gather coverage and upload to Coveralls. |
| | | OBS_PORT=9292 |
| | | echo "Collecting coverage on port $OBS_PORT..." |
| | | |
| | | # Start tests in one VM. |
| | | dart \ |
| | | --enable-vm-service=$OBS_PORT \ |
| | | --pause-isolates-on-exit \ |
| | | test/test_all.dart & |
| | | |
| | | # Run the coverage collector to generate the JSON coverage report. |
| | | collect_coverage \ |
| | | --port=$OBS_PORT \ |
| | | --out=var/coverage.json \ |
| | | --wait-paused \ |
| | | --resume-isolates |
| | | |
| | | echo "Generating LCOV report..." |
| | | format_coverage \ |
| | | --lcov \ |
| | | --in=var/coverage.json \ |
| | | --out=var/lcov.info \ |
| | | --packages=.packages \ |
| | | --report-on=lib |