diff --git a/catsvsdogs/README.md b/catsvsdogs/README.md new file mode 100644 index 00000000..84af284c --- /dev/null +++ b/catsvsdogs/README.md @@ -0,0 +1,13 @@ +# Cats VS Dogs - A Flutter App +> by Parth Mistry + + +## Screens: +
+ + + +
+ +--- + diff --git a/catsvsdogs/android/app/build.gradle b/catsvsdogs/android/app/build.gradle new file mode 100644 index 00000000..eb1ec16d --- /dev/null +++ b/catsvsdogs/android/app/build.gradle @@ -0,0 +1,68 @@ +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 plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion 29 + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + aaptOptions { + noCompress 'tflite' + noCompress 'lite' + } + + lintOptions { + disable 'InvalidPackage' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.catsvsdogs" + minSdkVersion 19 + targetSdkVersion 29 + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + 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 { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} diff --git a/catsvsdogs/android/app/src/debug/AndroidManifest.xml b/catsvsdogs/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 00000000..5379c66f --- /dev/null +++ b/catsvsdogs/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/catsvsdogs/android/app/src/main/AndroidManifest.xml b/catsvsdogs/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..12e8683f --- /dev/null +++ b/catsvsdogs/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + diff --git a/catsvsdogs/android/app/src/main/ic_launcher-playstore.png b/catsvsdogs/android/app/src/main/ic_launcher-playstore.png new file mode 100644 index 00000000..29b76eaf Binary files /dev/null and b/catsvsdogs/android/app/src/main/ic_launcher-playstore.png differ diff --git a/catsvsdogs/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/catsvsdogs/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java new file mode 100644 index 00000000..969e45ce --- /dev/null +++ b/catsvsdogs/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java @@ -0,0 +1,22 @@ +package io.flutter.plugins; + +import androidx.annotation.Keep; +import androidx.annotation.NonNull; + +import io.flutter.embedding.engine.FlutterEngine; +import io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry; + +/** + * Generated file. Do not edit. + * This file is generated by the Flutter tool based on the + * plugins that support the Android platform. + */ +@Keep +public final class GeneratedPluginRegistrant { + public static void registerWith(@NonNull FlutterEngine flutterEngine) { + ShimPluginRegistry shimPluginRegistry = new ShimPluginRegistry(flutterEngine); + flutterEngine.getPlugins().add(new io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin()); + flutterEngine.getPlugins().add(new io.flutter.plugins.imagepicker.ImagePickerPlugin()); + sq.flutter.tflite.TflitePlugin.registerWith(shimPluginRegistry.registrarFor("sq.flutter.tflite.TflitePlugin")); + } +} diff --git a/catsvsdogs/android/app/src/main/kotlin/com/example/catsvsdogs/MainActivity.kt b/catsvsdogs/android/app/src/main/kotlin/com/example/catsvsdogs/MainActivity.kt new file mode 100644 index 00000000..fb8b6509 --- /dev/null +++ b/catsvsdogs/android/app/src/main/kotlin/com/example/catsvsdogs/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.catsvsdogs + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/catsvsdogs/android/app/src/main/res/drawable/ic_launcher_background.xml b/catsvsdogs/android/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 00000000..ca3826a4 --- /dev/null +++ b/catsvsdogs/android/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/catsvsdogs/android/app/src/main/res/drawable/launch_background.xml b/catsvsdogs/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 00000000..84037589 --- /dev/null +++ b/catsvsdogs/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/catsvsdogs/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/catsvsdogs/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000..fdd632e4 --- /dev/null +++ b/catsvsdogs/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/catsvsdogs/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/catsvsdogs/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000..fdd632e4 --- /dev/null +++ b/catsvsdogs/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/catsvsdogs/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/catsvsdogs/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..1b3eb8ba Binary files /dev/null and b/catsvsdogs/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/catsvsdogs/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/catsvsdogs/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..c4d98237 Binary files /dev/null and b/catsvsdogs/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/catsvsdogs/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/catsvsdogs/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 00000000..838a07a7 Binary files /dev/null and b/catsvsdogs/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/catsvsdogs/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/catsvsdogs/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..c0aebac8 Binary files /dev/null and b/catsvsdogs/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/catsvsdogs/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/catsvsdogs/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..632d64f7 Binary files /dev/null and b/catsvsdogs/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/catsvsdogs/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/catsvsdogs/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 00000000..84b0924f Binary files /dev/null and b/catsvsdogs/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/catsvsdogs/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/catsvsdogs/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..cb61cb2a Binary files /dev/null and b/catsvsdogs/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/catsvsdogs/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/catsvsdogs/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..4a00da95 Binary files /dev/null and b/catsvsdogs/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/catsvsdogs/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/catsvsdogs/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 00000000..db2695bd Binary files /dev/null and b/catsvsdogs/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/catsvsdogs/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/catsvsdogs/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..0d390c75 Binary files /dev/null and b/catsvsdogs/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/catsvsdogs/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/catsvsdogs/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..107e7b6f Binary files /dev/null and b/catsvsdogs/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/catsvsdogs/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/catsvsdogs/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..c21f0c90 Binary files /dev/null and b/catsvsdogs/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/catsvsdogs/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/catsvsdogs/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..2c91268c Binary files /dev/null and b/catsvsdogs/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/catsvsdogs/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/catsvsdogs/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..4bbf9801 Binary files /dev/null and b/catsvsdogs/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/catsvsdogs/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/catsvsdogs/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..aaed4bbc Binary files /dev/null and b/catsvsdogs/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/catsvsdogs/android/app/src/main/res/values/styles.xml b/catsvsdogs/android/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..a554de43 --- /dev/null +++ b/catsvsdogs/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/catsvsdogs/android/app/src/profile/AndroidManifest.xml b/catsvsdogs/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 00000000..5379c66f --- /dev/null +++ b/catsvsdogs/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/catsvsdogs/android/build.gradle b/catsvsdogs/android/build.gradle new file mode 100644 index 00000000..7cad1568 --- /dev/null +++ b/catsvsdogs/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.3.50' + repositories { + google() + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:3.5.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +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 +} diff --git a/catsvsdogs/android/catsvsdogs_android.iml b/catsvsdogs/android/catsvsdogs_android.iml new file mode 100644 index 00000000..2e77255a --- /dev/null +++ b/catsvsdogs/android/catsvsdogs_android.iml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/catsvsdogs/android/gradle.properties b/catsvsdogs/android/gradle.properties new file mode 100644 index 00000000..64930f1d --- /dev/null +++ b/catsvsdogs/android/gradle.properties @@ -0,0 +1,4 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true +android.enableR8=true diff --git a/catsvsdogs/android/gradle/wrapper/gradle-wrapper.jar b/catsvsdogs/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..13372aef Binary files /dev/null and b/catsvsdogs/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/catsvsdogs/android/gradle/wrapper/gradle-wrapper.properties b/catsvsdogs/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..31afd709 --- /dev/null +++ b/catsvsdogs/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#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-5.6.2-all.zip diff --git a/catsvsdogs/android/gradlew b/catsvsdogs/android/gradlew new file mode 100644 index 00000000..9d82f789 --- /dev/null +++ b/catsvsdogs/android/gradlew @@ -0,0 +1,160 @@ +#!/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 "$@" diff --git a/catsvsdogs/android/gradlew.bat b/catsvsdogs/android/gradlew.bat new file mode 100644 index 00000000..aec99730 --- /dev/null +++ b/catsvsdogs/android/gradlew.bat @@ -0,0 +1,90 @@ +@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 diff --git a/catsvsdogs/android/local.properties b/catsvsdogs/android/local.properties new file mode 100644 index 00000000..6d851a54 --- /dev/null +++ b/catsvsdogs/android/local.properties @@ -0,0 +1,5 @@ +sdk.dir=C:\\Users\\impar\\AppData\\Local\\Android\\sdk +flutter.sdk=C:\\flutter +flutter.buildMode=release +flutter.versionName=1.0.0 +flutter.versionCode=1 \ No newline at end of file diff --git a/catsvsdogs/android/settings.gradle b/catsvsdogs/android/settings.gradle new file mode 100644 index 00000000..33f0745d --- /dev/null +++ b/catsvsdogs/android/settings.gradle @@ -0,0 +1,11 @@ +include ':app' + +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() + +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/catsvsdogs/assets/cat.png b/catsvsdogs/assets/cat.png new file mode 100644 index 00000000..ecb5830b Binary files /dev/null and b/catsvsdogs/assets/cat.png differ diff --git a/catsvsdogs/assets/labels.txt b/catsvsdogs/assets/labels.txt new file mode 100644 index 00000000..61399a13 --- /dev/null +++ b/catsvsdogs/assets/labels.txt @@ -0,0 +1,2 @@ +Dog +Cat diff --git a/catsvsdogs/assets/model_unquant.tflite b/catsvsdogs/assets/model_unquant.tflite new file mode 100644 index 00000000..b2990b07 Binary files /dev/null and b/catsvsdogs/assets/model_unquant.tflite differ diff --git a/catsvsdogs/catsvsdogs.iml b/catsvsdogs/catsvsdogs.iml new file mode 100644 index 00000000..3ae446d1 --- /dev/null +++ b/catsvsdogs/catsvsdogs.iml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/catsvsdogs/icons/icon.png b/catsvsdogs/icons/icon.png new file mode 100644 index 00000000..0b26fec2 Binary files /dev/null and b/catsvsdogs/icons/icon.png differ diff --git a/catsvsdogs/ios/Flutter/AppFrameworkInfo.plist b/catsvsdogs/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 00000000..e2039325 --- /dev/null +++ b/catsvsdogs/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 9.0 + + diff --git a/catsvsdogs/ios/Flutter/Debug.xcconfig b/catsvsdogs/ios/Flutter/Debug.xcconfig new file mode 100644 index 00000000..0b2d479c --- /dev/null +++ b/catsvsdogs/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/catsvsdogs/ios/Flutter/Release.xcconfig b/catsvsdogs/ios/Flutter/Release.xcconfig new file mode 100644 index 00000000..0b2d479c --- /dev/null +++ b/catsvsdogs/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/catsvsdogs/ios/Runner.xcodeproj/project.pbxproj b/catsvsdogs/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..274c90d6 --- /dev/null +++ b/catsvsdogs/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,495 @@ +// !$*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 */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 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 = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* 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 = 1020; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + 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 */, + 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\" embed_and_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 = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift 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 = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + 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_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = 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 = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + 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.catsvsdogs; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + 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_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = 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 = 9.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + 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_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = 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 = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + 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.catsvsdogs; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + 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.catsvsdogs; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + 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 */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} \ No newline at end of file diff --git a/catsvsdogs/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/catsvsdogs/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..59c6d394 --- /dev/null +++ b/catsvsdogs/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/catsvsdogs/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/catsvsdogs/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..fc6bf807 --- /dev/null +++ b/catsvsdogs/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/catsvsdogs/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/catsvsdogs/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..af0309c4 --- /dev/null +++ b/catsvsdogs/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/catsvsdogs/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/catsvsdogs/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 00000000..be0b92ef --- /dev/null +++ b/catsvsdogs/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/catsvsdogs/ios/Runner.xcworkspace/contents.xcworkspacedata b/catsvsdogs/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..59c6d394 --- /dev/null +++ b/catsvsdogs/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/catsvsdogs/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/catsvsdogs/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..fc6bf807 --- /dev/null +++ b/catsvsdogs/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/catsvsdogs/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/catsvsdogs/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..af0309c4 --- /dev/null +++ b/catsvsdogs/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/catsvsdogs/ios/Runner/AppDelegate.swift b/catsvsdogs/ios/Runner/AppDelegate.swift new file mode 100644 index 00000000..37636837 --- /dev/null +++ b/catsvsdogs/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..1950fd80 --- /dev/null +++ b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "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" + } +} diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 00000000..328e6e3b Binary files /dev/null and b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 00000000..90f3fe97 Binary files /dev/null and b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 00000000..9fecacfa Binary files /dev/null and b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 00000000..f1042b18 Binary files /dev/null and b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 00000000..dbc39869 Binary files /dev/null and b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 00000000..dd35fd6b Binary files /dev/null and b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 00000000..8538d0c6 Binary files /dev/null and b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 00000000..9fecacfa Binary files /dev/null and b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 00000000..45663acc Binary files /dev/null and b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 00000000..c95eed38 Binary files /dev/null and b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 00000000..c95eed38 Binary files /dev/null and b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 00000000..9c377d83 Binary files /dev/null and b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 00000000..92b423e4 Binary files /dev/null and b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 00000000..0e95c810 Binary files /dev/null and b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 00000000..2545ec5d Binary files /dev/null and b/catsvsdogs/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/catsvsdogs/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 00000000..d08a4de3 --- /dev/null +++ b/catsvsdogs/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "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" + } +} diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/catsvsdogs/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/catsvsdogs/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/catsvsdogs/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/catsvsdogs/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/catsvsdogs/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/catsvsdogs/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/catsvsdogs/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/catsvsdogs/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 00000000..65a94b5d --- /dev/null +++ b/catsvsdogs/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# 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. \ No newline at end of file diff --git a/catsvsdogs/ios/Runner/Base.lproj/LaunchScreen.storyboard b/catsvsdogs/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..497371ea --- /dev/null +++ b/catsvsdogs/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/catsvsdogs/ios/Runner/Base.lproj/Main.storyboard b/catsvsdogs/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 00000000..bbb83caa --- /dev/null +++ b/catsvsdogs/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/catsvsdogs/ios/Runner/GeneratedPluginRegistrant.h b/catsvsdogs/ios/Runner/GeneratedPluginRegistrant.h new file mode 100644 index 00000000..ed9a5c61 --- /dev/null +++ b/catsvsdogs/ios/Runner/GeneratedPluginRegistrant.h @@ -0,0 +1,17 @@ +// +// Generated file. Do not edit. +// + +#ifndef GeneratedPluginRegistrant_h +#define GeneratedPluginRegistrant_h + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface GeneratedPluginRegistrant : NSObject ++ (void)registerWithRegistry:(NSObject*)registry; +@end + +NS_ASSUME_NONNULL_END +#endif /* GeneratedPluginRegistrant_h */ diff --git a/catsvsdogs/ios/Runner/GeneratedPluginRegistrant.m b/catsvsdogs/ios/Runner/GeneratedPluginRegistrant.m new file mode 100644 index 00000000..de6427c0 --- /dev/null +++ b/catsvsdogs/ios/Runner/GeneratedPluginRegistrant.m @@ -0,0 +1,26 @@ +// +// Generated file. Do not edit. +// + +#import "GeneratedPluginRegistrant.h" + +#if __has_include() +#import +#else +@import image_picker; +#endif + +#if __has_include() +#import +#else +@import tflite; +#endif + +@implementation GeneratedPluginRegistrant + ++ (void)registerWithRegistry:(NSObject*)registry { + [FLTImagePickerPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTImagePickerPlugin"]]; + [TflitePlugin registerWithRegistrar:[registry registrarForPlugin:@"TflitePlugin"]]; +} + +@end diff --git a/catsvsdogs/ios/Runner/Info.plist b/catsvsdogs/ios/Runner/Info.plist new file mode 100644 index 00000000..4b5a9751 --- /dev/null +++ b/catsvsdogs/ios/Runner/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + catsvsdogs + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/catsvsdogs/ios/Runner/Runner-Bridging-Header.h b/catsvsdogs/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 00000000..fae207f9 --- /dev/null +++ b/catsvsdogs/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/catsvsdogs/lib/home.dart b/catsvsdogs/lib/home.dart new file mode 100644 index 00000000..07f42184 --- /dev/null +++ b/catsvsdogs/lib/home.dart @@ -0,0 +1,187 @@ +import 'package:flutter/material.dart'; +import 'package:tflite/tflite.dart'; +import 'package:image_picker/image_picker.dart'; +import 'dart:io'; + +class Home extends StatefulWidget { + @override + _HomeState createState() => _HomeState(); +} + +class _HomeState extends State { + bool _loading = true; + File _image; + List _output; + final picker = ImagePicker(); + + @override + void initState() { + super.initState(); + loadModel().then((value) { + setState(() {}); + }); + } + + classifyImage(File image) async { + var output = await Tflite.runModelOnImage( + path: image.path, + numResults: 2, + threshold: 0.5, + imageMean: 127.6, + imageStd: 127.5); + setState(() { + _output = output; + _loading = false; + }); + } + + loadModel() async { + await Tflite.loadModel( + model: 'assets/model_unquant.tflite', labels: 'assets/labels.txt'); + } + + pickImage() async { + var image = await picker.getImage(source: ImageSource.camera); + if (image = null) return null; + setState(() { + _image = File(image.path); + }); + classifyImage(_image); + } + + pickGalleryImage() async { + var image = await picker.getImage(source: ImageSource.gallery); + if (image == null) return null; + setState(() { + _image = File(image.path); + }); + classifyImage(_image); + } + + @override + void dispose() { + Tflite.close(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Color(0xFF101010), + body: Container( + padding: const EdgeInsets.symmetric(horizontal: 24), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 85, + ), + Text( + 'TeachableMachine.com CNN', + style: TextStyle(color: Color(0xFFEEDA28), fontSize: 18), + ), + SizedBox( + height: 6, + ), + Text( + 'Detect Cats and Dogs', + style: TextStyle( + color: Color(0xFFE99600), + fontWeight: FontWeight.w500, + fontSize: 23, + ), + ), + SizedBox( + height: 40, + ), + Center( + child: _loading + ? Container( + width: 280, + child: Column( + children: [ + Image.asset( + 'assets/cat.png', + ), + SizedBox( + height: 50, + ), + ], + ), + ) + : Container( + child: Column( + children: [ + Container( + height: 250, + child: Image.file(_image), + ), + SizedBox( + height: 20, + ), + _output != null + ? Text( + '${_output[0]['label']}', + style: TextStyle( + color: Colors.white, fontSize: 20), + ) + : Container(), + SizedBox( + height: 20, + ) + ], + ), + ), + ), + Container( + width: MediaQuery.of(context).size.width, + child: Column( + children: [ + GestureDetector( + onTap: pickImage, + child: Container( + width: MediaQuery.of(context).size.width - 150, + alignment: Alignment.center, + padding: const EdgeInsets.symmetric( + horizontal: 24, vertical: 17), + decoration: BoxDecoration( + color: Colors.deepOrange, + borderRadius: BorderRadius.circular(6), + ), + child: Text( + 'Take a photo', + style: TextStyle(color: Colors.white), + ), + ), + ), + SizedBox( + height: 10, + ), + GestureDetector( + onTap: pickGalleryImage, + child: Container( + width: MediaQuery.of(context).size.width - 150, + alignment: Alignment.center, + padding: const EdgeInsets.symmetric( + horizontal: 24, vertical: 17), + decoration: BoxDecoration( + color: Colors.deepOrange, + borderRadius: BorderRadius.circular(6), + ), + child: Text( + 'Import from Gallery', + style: TextStyle(color: Colors.white), + ), + ), + ), + SizedBox( + height: 10, + ) + ], + ), + ), + ], + ), + ), + ); + } +} diff --git a/catsvsdogs/lib/main.dart b/catsvsdogs/lib/main.dart new file mode 100644 index 00000000..12ce0762 --- /dev/null +++ b/catsvsdogs/lib/main.dart @@ -0,0 +1,17 @@ +import 'package:catsvsdogs/splash_screen.dart'; +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Cats VS Dogs', + home: MySplash(), + debugShowCheckedModeBanner: false, + ); + } +} diff --git a/catsvsdogs/lib/splash_screen.dart b/catsvsdogs/lib/splash_screen.dart new file mode 100644 index 00000000..d49f1fa4 --- /dev/null +++ b/catsvsdogs/lib/splash_screen.dart @@ -0,0 +1,28 @@ +import 'package:flutter/material.dart'; +import 'package:splashscreen/splashscreen.dart'; + +import 'home.dart'; + +class MySplash extends StatefulWidget { + @override + _MySplashState createState() => _MySplashState(); +} + +class _MySplashState extends State { + @override + Widget build(BuildContext context) { + return SplashScreen( + seconds: 2, + navigateAfterSeconds: Home(), + title: Text( + 'Cats and Dogs', + style: TextStyle( + fontWeight: FontWeight.bold, fontSize: 30, color: Colors.white), + ), + image: Image.asset('assets/cat.png'), + backgroundColor: Colors.black, + photoSize: 50, + loaderColor: Color(0xFFEEDA2A), + ); + } +} diff --git a/catsvsdogs/pubspec.lock b/catsvsdogs/pubspec.lock new file mode 100644 index 00000000..b8f34539 --- /dev/null +++ b/catsvsdogs/pubspec.lock @@ -0,0 +1,280 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.13" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.0" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.5.0-nullsafety" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0-nullsafety" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0-nullsafety.2" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0-nullsafety" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0-nullsafety" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.15.0-nullsafety.2" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.5" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0-nullsafety" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_launcher_icons: + dependency: "direct main" + description: + name: flutter_launcher_icons + url: "https://pub.dartlang.org" + source: hosted + version: "0.8.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.9" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.2" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.4" + image: + dependency: transitive + description: + name: image + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.17" + image_picker: + dependency: "direct main" + description: + name: image_picker + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.7+9" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.10-nullsafety" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0-nullsafety.2" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.0-nullsafety" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.2" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.0-nullsafety" + splashscreen: + dependency: "direct main" + description: + name: splashscreen + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.10.0-nullsafety" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0-nullsafety" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0-nullsafety" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0-nullsafety" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.19-nullsafety" + tflite: + dependency: "direct main" + description: + name: tflite + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0-nullsafety.2" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0-nullsafety.2" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "4.5.1" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.1" +sdks: + dart: ">=2.10.0-0.0.dev <2.10.0" + flutter: ">=1.12.13 <2.0.0" diff --git a/catsvsdogs/pubspec.yaml b/catsvsdogs/pubspec.yaml new file mode 100644 index 00000000..7b5ab32b --- /dev/null +++ b/catsvsdogs/pubspec.yaml @@ -0,0 +1,79 @@ +name: catsvsdogs +description: A new Flutter project. + +# The following line prevents the package from being accidentally published to +# pub.dev using `pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# 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. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +version: 1.0.0+1 + +environment: + sdk: ">=2.7.0 <3.0.0" + +dependencies: + flutter: + sdk: flutter + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.0 + tflite: ^1.1.1 + splashscreen: ^1.2.0 + image_picker: ^0.6.7+9 + flutter_launcher_icons: ^0.8.0 + +flutter_icons: + image_path: "icons/icon.png" + android: true + ios: true + +dev_dependencies: + flutter_test: + sdk: flutter + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/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: + - assets/ + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware. + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/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.dev/custom-fonts/#from-packages + diff --git a/catsvsdogs/screens/Screenshot_1601042533.png b/catsvsdogs/screens/Screenshot_1601042533.png new file mode 100644 index 00000000..60f6c01f Binary files /dev/null and b/catsvsdogs/screens/Screenshot_1601042533.png differ diff --git a/catsvsdogs/screens/Screenshot_1601042573.png b/catsvsdogs/screens/Screenshot_1601042573.png new file mode 100644 index 00000000..81a76a3d Binary files /dev/null and b/catsvsdogs/screens/Screenshot_1601042573.png differ diff --git a/catsvsdogs/screens/Screenshot_1601042579.png b/catsvsdogs/screens/Screenshot_1601042579.png new file mode 100644 index 00000000..1ec01ac0 Binary files /dev/null and b/catsvsdogs/screens/Screenshot_1601042579.png differ diff --git a/catsvsdogs/test/widget_test.dart b/catsvsdogs/test/widget_test.dart new file mode 100644 index 00000000..76c5688c --- /dev/null +++ b/catsvsdogs/test/widget_test.dart @@ -0,0 +1,30 @@ +// 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:catsvsdogs/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(MyApp()); + + // 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); + }); +} diff --git a/catsvsdogs/web/favicon.png b/catsvsdogs/web/favicon.png new file mode 100644 index 00000000..8aaa46ac Binary files /dev/null and b/catsvsdogs/web/favicon.png differ diff --git a/catsvsdogs/web/icons/Icon-192.png b/catsvsdogs/web/icons/Icon-192.png new file mode 100644 index 00000000..b749bfef Binary files /dev/null and b/catsvsdogs/web/icons/Icon-192.png differ diff --git a/catsvsdogs/web/icons/Icon-512.png b/catsvsdogs/web/icons/Icon-512.png new file mode 100644 index 00000000..88cfd48d Binary files /dev/null and b/catsvsdogs/web/icons/Icon-512.png differ diff --git a/catsvsdogs/web/index.html b/catsvsdogs/web/index.html new file mode 100644 index 00000000..7ac1389d --- /dev/null +++ b/catsvsdogs/web/index.html @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + catsvsdogs + + + + + + + + diff --git a/catsvsdogs/web/manifest.json b/catsvsdogs/web/manifest.json new file mode 100644 index 00000000..66175a43 --- /dev/null +++ b/catsvsdogs/web/manifest.json @@ -0,0 +1,23 @@ +{ + "name": "catsvsdogs", + "short_name": "catsvsdogs", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} diff --git a/redesigned-flutter-Counter-app/README.md b/redesigned-flutter-Counter-app/README.md new file mode 100644 index 00000000..c869cc3b --- /dev/null +++ b/redesigned-flutter-Counter-app/README.md @@ -0,0 +1,8 @@ +

The Redesigned Flutter Counter App

+ +![dark theme](https://user-images.githubusercontent.com/37099416/109557998-8440c680-7ae1-11eb-9ca9-c08af45910cf.gif) +![light theme](https://user-images.githubusercontent.com/37099416/109558239-d08c0680-7ae1-11eb-83d3-63ca6d295a18.gif) + + + + diff --git a/redesigned-flutter-Counter-app/android/app/build.gradle b/redesigned-flutter-Counter-app/android/app/build.gradle new file mode 100644 index 00000000..02e8c031 --- /dev/null +++ b/redesigned-flutter-Counter-app/android/app/build.gradle @@ -0,0 +1,63 @@ +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 plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion 29 + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + lintOptions { + disable 'InvalidPackage' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.bloc_architecture_app" + minSdkVersion 16 + targetSdkVersion 29 + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + 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 { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} diff --git a/redesigned-flutter-Counter-app/android/app/src/debug/AndroidManifest.xml b/redesigned-flutter-Counter-app/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 00000000..40ce14fa --- /dev/null +++ b/redesigned-flutter-Counter-app/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/redesigned-flutter-Counter-app/android/app/src/main/AndroidManifest.xml b/redesigned-flutter-Counter-app/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..639b6e49 --- /dev/null +++ b/redesigned-flutter-Counter-app/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + diff --git a/redesigned-flutter-Counter-app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/redesigned-flutter-Counter-app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java new file mode 100644 index 00000000..83a55abb --- /dev/null +++ b/redesigned-flutter-Counter-app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java @@ -0,0 +1,29 @@ +package io.flutter.plugins; + +import androidx.annotation.Keep; +import androidx.annotation.NonNull; +import io.flutter.Log; + +import io.flutter.embedding.engine.FlutterEngine; + +/** + * Generated file. Do not edit. + * This file is generated by the Flutter tool based on the + * plugins that support the Android platform. + */ +@Keep +public final class GeneratedPluginRegistrant { + private static final String TAG = "GeneratedPluginRegistrant"; + public static void registerWith(@NonNull FlutterEngine flutterEngine) { + try { + flutterEngine.getPlugins().add(new io.flutter.plugins.pathprovider.PathProviderPlugin()); + } catch(Exception e) { + Log.e(TAG, "Error registering plugin path_provider, io.flutter.plugins.pathprovider.PathProviderPlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin()); + } catch(Exception e) { + Log.e(TAG, "Error registering plugin shared_preferences, io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin", e); + } + } +} diff --git a/redesigned-flutter-Counter-app/android/app/src/main/kotlin/com/example/bloc_architecture_app/MainActivity.kt b/redesigned-flutter-Counter-app/android/app/src/main/kotlin/com/example/bloc_architecture_app/MainActivity.kt new file mode 100644 index 00000000..a182a12a --- /dev/null +++ b/redesigned-flutter-Counter-app/android/app/src/main/kotlin/com/example/bloc_architecture_app/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.bloc_architecture_app + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/redesigned-flutter-Counter-app/android/app/src/main/res/drawable/launch_background.xml b/redesigned-flutter-Counter-app/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 00000000..304732f8 --- /dev/null +++ b/redesigned-flutter-Counter-app/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/redesigned-flutter-Counter-app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/redesigned-flutter-Counter-app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..db77bb4b Binary files /dev/null and b/redesigned-flutter-Counter-app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/redesigned-flutter-Counter-app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/redesigned-flutter-Counter-app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..17987b79 Binary files /dev/null and b/redesigned-flutter-Counter-app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/redesigned-flutter-Counter-app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/redesigned-flutter-Counter-app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..09d43914 Binary files /dev/null and b/redesigned-flutter-Counter-app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/redesigned-flutter-Counter-app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/redesigned-flutter-Counter-app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..d5f1c8d3 Binary files /dev/null and b/redesigned-flutter-Counter-app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/redesigned-flutter-Counter-app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/redesigned-flutter-Counter-app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..4d6372ee Binary files /dev/null and b/redesigned-flutter-Counter-app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/redesigned-flutter-Counter-app/android/app/src/main/res/values/styles.xml b/redesigned-flutter-Counter-app/android/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..1f83a33f --- /dev/null +++ b/redesigned-flutter-Counter-app/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/redesigned-flutter-Counter-app/android/app/src/profile/AndroidManifest.xml b/redesigned-flutter-Counter-app/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 00000000..40ce14fa --- /dev/null +++ b/redesigned-flutter-Counter-app/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/redesigned-flutter-Counter-app/android/build.gradle b/redesigned-flutter-Counter-app/android/build.gradle new file mode 100644 index 00000000..3100ad2d --- /dev/null +++ b/redesigned-flutter-Counter-app/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.3.50' + repositories { + google() + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:3.5.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +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 +} diff --git a/redesigned-flutter-Counter-app/android/gradle.properties b/redesigned-flutter-Counter-app/android/gradle.properties new file mode 100644 index 00000000..a6738207 --- /dev/null +++ b/redesigned-flutter-Counter-app/android/gradle.properties @@ -0,0 +1,4 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true +android.enableR8=true diff --git a/redesigned-flutter-Counter-app/android/gradle/wrapper/gradle-wrapper.properties b/redesigned-flutter-Counter-app/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..296b146b --- /dev/null +++ b/redesigned-flutter-Counter-app/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#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-5.6.2-all.zip diff --git a/redesigned-flutter-Counter-app/android/local.properties b/redesigned-flutter-Counter-app/android/local.properties new file mode 100644 index 00000000..b405246a --- /dev/null +++ b/redesigned-flutter-Counter-app/android/local.properties @@ -0,0 +1,2 @@ +sdk.dir=C:\\Users\\impar\\AppData\\Local\\Android\\sdk +flutter.sdk=C:\\flutter \ No newline at end of file diff --git a/redesigned-flutter-Counter-app/android/settings.gradle b/redesigned-flutter-Counter-app/android/settings.gradle new file mode 100644 index 00000000..44e62bcf --- /dev/null +++ b/redesigned-flutter-Counter-app/android/settings.gradle @@ -0,0 +1,11 @@ +include ':app' + +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() + +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/redesigned-flutter-Counter-app/assets/flares/circle.flr b/redesigned-flutter-Counter-app/assets/flares/circle.flr new file mode 100644 index 00000000..d9637d9e Binary files /dev/null and b/redesigned-flutter-Counter-app/assets/flares/circle.flr differ diff --git a/redesigned-flutter-Counter-app/ios/Flutter/AppFrameworkInfo.plist b/redesigned-flutter-Counter-app/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 00000000..f2872cf4 --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 9.0 + + diff --git a/redesigned-flutter-Counter-app/ios/Flutter/Debug.xcconfig b/redesigned-flutter-Counter-app/ios/Flutter/Debug.xcconfig new file mode 100644 index 00000000..592ceee8 --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/redesigned-flutter-Counter-app/ios/Flutter/Generated.xcconfig b/redesigned-flutter-Counter-app/ios/Flutter/Generated.xcconfig new file mode 100644 index 00000000..3d5219da --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Flutter/Generated.xcconfig @@ -0,0 +1,13 @@ +// This is a generated file; do not edit or check into version control. +FLUTTER_ROOT=C:\flutter +FLUTTER_APPLICATION_PATH=C:\Users\impar\OneDrive\Desktop\redefined counter app +COCOAPODS_PARALLEL_CODE_SIGN=true +FLUTTER_TARGET=lib\main.dart +FLUTTER_BUILD_DIR=build +FLUTTER_BUILD_NAME=1.0.0 +FLUTTER_BUILD_NUMBER=1 +EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386 +DART_OBFUSCATION=false +TRACK_WIDGET_CREATION=false +TREE_SHAKE_ICONS=false +PACKAGE_CONFIG=.packages diff --git a/redesigned-flutter-Counter-app/ios/Flutter/Release.xcconfig b/redesigned-flutter-Counter-app/ios/Flutter/Release.xcconfig new file mode 100644 index 00000000..592ceee8 --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/redesigned-flutter-Counter-app/ios/Flutter/flutter_export_environment.sh b/redesigned-flutter-Counter-app/ios/Flutter/flutter_export_environment.sh new file mode 100644 index 00000000..02e285a3 --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Flutter/flutter_export_environment.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# This is a generated file; do not edit or check into version control. +export "FLUTTER_ROOT=C:\flutter" +export "FLUTTER_APPLICATION_PATH=C:\Users\impar\OneDrive\Desktop\redefined counter app" +export "COCOAPODS_PARALLEL_CODE_SIGN=true" +export "FLUTTER_TARGET=lib\main.dart" +export "FLUTTER_BUILD_DIR=build" +export "FLUTTER_BUILD_NAME=1.0.0" +export "FLUTTER_BUILD_NUMBER=1" +export "DART_OBFUSCATION=false" +export "TRACK_WIDGET_CREATION=false" +export "TREE_SHAKE_ICONS=false" +export "PACKAGE_CONFIG=.packages" diff --git a/redesigned-flutter-Counter-app/ios/Runner.xcodeproj/project.pbxproj b/redesigned-flutter-Counter-app/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..674bec5c --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,495 @@ +// !$*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 */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 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 = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* 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 = 1020; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + 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 */, + 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\" embed_and_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 = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift 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 = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + 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_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = 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 = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + 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.blocArchitectureApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + 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_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = 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 = 9.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + 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_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = 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 = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + 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.blocArchitectureApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + 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.blocArchitectureApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + 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 */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/redesigned-flutter-Counter-app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/redesigned-flutter-Counter-app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..1d526a16 --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/redesigned-flutter-Counter-app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/redesigned-flutter-Counter-app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/redesigned-flutter-Counter-app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/redesigned-flutter-Counter-app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..f9b0d7c5 --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/redesigned-flutter-Counter-app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/redesigned-flutter-Counter-app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 00000000..a28140cf --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/redesigned-flutter-Counter-app/ios/Runner.xcworkspace/contents.xcworkspacedata b/redesigned-flutter-Counter-app/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..1d526a16 --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/redesigned-flutter-Counter-app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/redesigned-flutter-Counter-app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/redesigned-flutter-Counter-app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/redesigned-flutter-Counter-app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..f9b0d7c5 --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/redesigned-flutter-Counter-app/ios/Runner/AppDelegate.swift b/redesigned-flutter-Counter-app/ios/Runner/AppDelegate.swift new file mode 100644 index 00000000..70693e4a --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..d36b1fab --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "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" + } +} diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 00000000..dc9ada47 Binary files /dev/null and b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 00000000..28c6bf03 Binary files /dev/null and b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 00000000..2ccbfd96 Binary files /dev/null and b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 00000000..f091b6b0 Binary files /dev/null and b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 00000000..4cde1211 Binary files /dev/null and b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 00000000..d0ef06e7 Binary files /dev/null and b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 00000000..dcdc2306 Binary files /dev/null and b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 00000000..2ccbfd96 Binary files /dev/null and b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 00000000..c8f9ed8f Binary files /dev/null and b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 00000000..a6d6b860 Binary files /dev/null and b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 00000000..a6d6b860 Binary files /dev/null and b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 00000000..75b2d164 Binary files /dev/null and b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 00000000..c4df70d3 Binary files /dev/null and b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 00000000..6a84f41e Binary files /dev/null and b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 00000000..d0e1f585 Binary files /dev/null and b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 00000000..0bedcf2f --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "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" + } +} diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 00000000..89c2725b --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# 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. \ No newline at end of file diff --git a/redesigned-flutter-Counter-app/ios/Runner/Base.lproj/LaunchScreen.storyboard b/redesigned-flutter-Counter-app/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..f2e259c7 --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/redesigned-flutter-Counter-app/ios/Runner/Base.lproj/Main.storyboard b/redesigned-flutter-Counter-app/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 00000000..f3c28516 --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/redesigned-flutter-Counter-app/ios/Runner/GeneratedPluginRegistrant.h b/redesigned-flutter-Counter-app/ios/Runner/GeneratedPluginRegistrant.h new file mode 100644 index 00000000..7a890927 --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Runner/GeneratedPluginRegistrant.h @@ -0,0 +1,19 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GeneratedPluginRegistrant_h +#define GeneratedPluginRegistrant_h + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface GeneratedPluginRegistrant : NSObject ++ (void)registerWithRegistry:(NSObject*)registry; +@end + +NS_ASSUME_NONNULL_END +#endif /* GeneratedPluginRegistrant_h */ diff --git a/redesigned-flutter-Counter-app/ios/Runner/GeneratedPluginRegistrant.m b/redesigned-flutter-Counter-app/ios/Runner/GeneratedPluginRegistrant.m new file mode 100644 index 00000000..d77ed09c --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Runner/GeneratedPluginRegistrant.m @@ -0,0 +1,28 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#import "GeneratedPluginRegistrant.h" + +#if __has_include() +#import +#else +@import path_provider; +#endif + +#if __has_include() +#import +#else +@import shared_preferences; +#endif + +@implementation GeneratedPluginRegistrant + ++ (void)registerWithRegistry:(NSObject*)registry { + [FLTPathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTPathProviderPlugin"]]; + [FLTSharedPreferencesPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTSharedPreferencesPlugin"]]; +} + +@end diff --git a/redesigned-flutter-Counter-app/ios/Runner/Info.plist b/redesigned-flutter-Counter-app/ios/Runner/Info.plist new file mode 100644 index 00000000..410ba7f7 --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Runner/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + bloc_architecture_app + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/redesigned-flutter-Counter-app/ios/Runner/Runner-Bridging-Header.h b/redesigned-flutter-Counter-app/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 00000000..308a2a56 --- /dev/null +++ b/redesigned-flutter-Counter-app/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/redesigned-flutter-Counter-app/lib/core/constants/strings.dart b/redesigned-flutter-Counter-app/lib/core/constants/strings.dart new file mode 100644 index 00000000..20047136 --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/core/constants/strings.dart @@ -0,0 +1,4 @@ +class Strings { + // App + static final appTitle = 'App Name'; +} diff --git a/redesigned-flutter-Counter-app/lib/core/exceptions/route_exception.dart b/redesigned-flutter-Counter-app/lib/core/exceptions/route_exception.dart new file mode 100644 index 00000000..5a0f5303 --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/core/exceptions/route_exception.dart @@ -0,0 +1,5 @@ +class RouteException implements Exception { + final String message; + + const RouteException(this.message); +} diff --git a/redesigned-flutter-Counter-app/lib/core/themes/app_theme.dart b/redesigned-flutter-Counter-app/lib/core/themes/app_theme.dart new file mode 100644 index 00000000..2e0b9a52 --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/core/themes/app_theme.dart @@ -0,0 +1,56 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/scheduler.dart'; +import 'package:flutter/services.dart'; + +class AppTheme { + static Color lightBackgroundColor = const Color(0xfff2f2f2); + static Color lightPrimaryColor = const Color(0xfff2f2f2); + static Color lightAccentColor = Colors.blueGrey.shade200; + static Color lightParticlesColor = const Color(0x44948282); + + static Color darkBackgroundColor = const Color(0xFF1A2127); + static Color darkPrimaryColor = const Color(0xFF1A2127); + static Color darkAccentColor = Colors.blueGrey.shade600; + static Color darkParticlesColor = const Color(0x441C2A3D); + + const AppTheme._(); + + static final lightTheme = ThemeData( + brightness: Brightness.light, + primaryColor: lightPrimaryColor, + accentColor: lightAccentColor, + backgroundColor: lightBackgroundColor, + visualDensity: VisualDensity.adaptivePlatformDensity, + ); + + static final darkTheme = ThemeData( + brightness: Brightness.dark, + primaryColor: darkPrimaryColor, + accentColor: darkAccentColor, + backgroundColor: darkBackgroundColor, + visualDensity: VisualDensity.adaptivePlatformDensity, + ); + + static Brightness get currentSystemBrightness => + SchedulerBinding.instance.window.platformBrightness; + + static setStatusBarAndNavigationBarColors(ThemeMode themeMode) { + SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle( + statusBarColor: Colors.transparent, + statusBarIconBrightness: + themeMode == ThemeMode.light ? Brightness.dark : Brightness.light, + systemNavigationBarIconBrightness: + themeMode == ThemeMode.light ? Brightness.dark : Brightness.light, + systemNavigationBarColor: themeMode == ThemeMode.light + ? lightBackgroundColor + : darkBackgroundColor, + systemNavigationBarDividerColor: Colors.transparent, + )); + } +} + +extension ThemeExtras on ThemeData { + Color get particlesColor => this.brightness == Brightness.light + ? AppTheme.lightParticlesColor + : AppTheme.darkParticlesColor; +} diff --git a/redesigned-flutter-Counter-app/lib/data/data_providers/data_provider.dart b/redesigned-flutter-Counter-app/lib/data/data_providers/data_provider.dart new file mode 100644 index 00000000..91c3afac --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/data/data_providers/data_provider.dart @@ -0,0 +1,3 @@ +// Dummy file + +class DataProvider {} diff --git a/redesigned-flutter-Counter-app/lib/data/http/http_client.dart b/redesigned-flutter-Counter-app/lib/data/http/http_client.dart new file mode 100644 index 00000000..569eacbc --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/data/http/http_client.dart @@ -0,0 +1 @@ +// Dummy file diff --git a/redesigned-flutter-Counter-app/lib/data/models/model.dart b/redesigned-flutter-Counter-app/lib/data/models/model.dart new file mode 100644 index 00000000..f97602db --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/data/models/model.dart @@ -0,0 +1,3 @@ +// Dummy file + +class Model {} diff --git a/redesigned-flutter-Counter-app/lib/data/repositories/repository.dart b/redesigned-flutter-Counter-app/lib/data/repositories/repository.dart new file mode 100644 index 00000000..c4b5cdb5 --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/data/repositories/repository.dart @@ -0,0 +1,3 @@ +// Dummy file + +class Repository {} diff --git a/redesigned-flutter-Counter-app/lib/logic/bloc/bloc.dart b/redesigned-flutter-Counter-app/lib/logic/bloc/bloc.dart new file mode 100644 index 00000000..569eacbc --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/logic/bloc/bloc.dart @@ -0,0 +1 @@ +// Dummy file diff --git a/redesigned-flutter-Counter-app/lib/logic/cubit/counter_cubit.dart b/redesigned-flutter-Counter-app/lib/logic/cubit/counter_cubit.dart new file mode 100644 index 00000000..5f2cbc65 --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/logic/cubit/counter_cubit.dart @@ -0,0 +1,25 @@ +import 'package:bloc/bloc.dart'; +import 'package:hydrated_bloc/hydrated_bloc.dart'; +import 'package:meta/meta.dart'; + +part 'counter_state.dart'; + +class CounterCubit extends Cubit with HydratedMixin { + CounterCubit() : super(CounterState(counterValue: 0)); + + void increment() => emit(CounterState(counterValue: state.counterValue + 1)); + void decrement() => emit(CounterState(counterValue: state.counterValue - 1)); + + @override + CounterState fromJson(Map json) { + if (json != null) { + return CounterState.fromMap(json); + } + return CounterState(counterValue: 0); + } + + @override + Map toJson(CounterState state) { + return state.toMap(); + } +} diff --git a/redesigned-flutter-Counter-app/lib/logic/cubit/counter_state.dart b/redesigned-flutter-Counter-app/lib/logic/cubit/counter_state.dart new file mode 100644 index 00000000..079ea902 --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/logic/cubit/counter_state.dart @@ -0,0 +1,24 @@ +part of 'counter_cubit.dart'; + +class CounterState { + final int counterValue; + + CounterState({@required this.counterValue}); + + Map toMap() { + return { + 'counterValue': counterValue, + }; + } + + factory CounterState.fromMap(Map map) { + if (map == null) return null; + + return CounterState( + counterValue: map['counterValue'], + ); + } + + @override + String toString() => 'CounterState(counterValue: $counterValue)'; +} diff --git a/redesigned-flutter-Counter-app/lib/logic/cubit/theme_cubit.dart b/redesigned-flutter-Counter-app/lib/logic/cubit/theme_cubit.dart new file mode 100644 index 00000000..ca165796 --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/logic/cubit/theme_cubit.dart @@ -0,0 +1,24 @@ +import 'package:bloc/bloc.dart'; +import 'package:bloc_architecture_app/core/themes/app_theme.dart'; +import 'package:flutter/material.dart'; +import 'package:meta/meta.dart'; + +part 'theme_state.dart'; + +class ThemeCubit extends Cubit { + ThemeCubit() : super(ThemeState(themeMode: ThemeMode.light)) { + updateAppTheme(); + } + + void updateAppTheme() { + final Brightness currentBrightness = AppTheme.currentSystemBrightness; + currentBrightness == Brightness.light + ? _setTheme(ThemeMode.light) + : _setTheme(ThemeMode.dark); + } + + void _setTheme(ThemeMode themeMode) { + AppTheme.setStatusBarAndNavigationBarColors(themeMode); + emit(ThemeState(themeMode: themeMode)); + } +} diff --git a/redesigned-flutter-Counter-app/lib/logic/cubit/theme_state.dart b/redesigned-flutter-Counter-app/lib/logic/cubit/theme_state.dart new file mode 100644 index 00000000..b9f28b28 --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/logic/cubit/theme_state.dart @@ -0,0 +1,7 @@ +part of 'theme_cubit.dart'; + +class ThemeState { + final ThemeMode themeMode; + + ThemeState({@required this.themeMode}); +} diff --git a/redesigned-flutter-Counter-app/lib/logic/debug/app_bloc_observer.dart b/redesigned-flutter-Counter-app/lib/logic/debug/app_bloc_observer.dart new file mode 100644 index 00000000..bb100169 --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/logic/debug/app_bloc_observer.dart @@ -0,0 +1,13 @@ +import 'package:flutter_bloc/flutter_bloc.dart'; + +class AppBlocObserver extends BlocObserver { + @override + void onEvent(Bloc bloc, Object event) { + super.onEvent(bloc, event); + } + + @override + void onTransition(Bloc bloc, Transition transition) { + super.onTransition(bloc, transition); + } +} diff --git a/redesigned-flutter-Counter-app/lib/main.dart b/redesigned-flutter-Counter-app/lib/main.dart new file mode 100644 index 00000000..ead17de7 --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/main.dart @@ -0,0 +1,97 @@ +import 'package:bloc_architecture_app/logic/cubit/counter_cubit.dart'; +import 'package:device_preview/device_preview.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:hydrated_bloc/hydrated_bloc.dart'; +import 'package:sizer/sizer.dart'; + +import 'core/constants/strings.dart'; +import 'core/themes/app_theme.dart'; +import 'logic/cubit/theme_cubit.dart'; +import 'logic/debug/app_bloc_observer.dart'; +import 'presentation/router/app_router.dart'; +import 'package:path_provider/path_provider.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + Bloc.observer = AppBlocObserver(); + HydratedBloc.storage = await HydratedStorage.build( + storageDirectory: await getApplicationDocumentsDirectory()); + runApp( + DevicePreview( + enabled: false, + builder: (context) => App(), + ), + ); +} + +class App extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MultiBlocProvider( + providers: [ + BlocProvider( + create: (context) => ThemeCubit(), + ), + BlocProvider( + create: (context) => CounterCubit(), + ), + ], + child: CounterApp(), + ); + } +} + +class CounterApp extends StatefulWidget { + const CounterApp({ + Key key, + }) : super(key: key); + + @override + _CounterAppState createState() => _CounterAppState(); +} + +class _CounterAppState extends State with WidgetsBindingObserver { + @override + void initState() { + WidgetsBinding.instance.addObserver(this); + super.initState(); + } + + @override + void didChangePlatformBrightness() { + context.read().updateAppTheme(); + super.didChangePlatformBrightness(); + } + + @override + void dispose() { + WidgetsBinding.instance.removeObserver(this); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return LayoutBuilder( + builder: (context, constraints) { + return OrientationBuilder( + builder: (context, orientation) { + return Sizer(builder: (context, constraints, orientation) { + return MaterialApp( + builder: DevicePreview.appBuilder, + title: Strings.appTitle, + theme: AppTheme.lightTheme, + darkTheme: AppTheme.darkTheme, + themeMode: context.select( + (ThemeCubit themeCubit) => themeCubit.state.themeMode), + debugShowCheckedModeBanner: false, + initialRoute: AppRouter.counter, + onGenerateRoute: AppRouter.onGenerateRoute, + ); + }); + }, + ); + }, + ); + } +} diff --git a/redesigned-flutter-Counter-app/lib/presentation/router/app_router.dart b/redesigned-flutter-Counter-app/lib/presentation/router/app_router.dart new file mode 100644 index 00000000..2001e35d --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/presentation/router/app_router.dart @@ -0,0 +1,21 @@ +import 'package:bloc_architecture_app/presentation/screens/counter_screen/counter_screen.dart'; +import 'package:flutter/material.dart'; + +import '../../core/exceptions/route_exception.dart'; + +class AppRouter { + static const String counter = 'counter'; + + const AppRouter._(); + + static Route onGenerateRoute(RouteSettings settings) { + switch (settings.name) { + case counter: + return MaterialPageRoute( + builder: (_) => CounterScreen(), + ); + default: + throw const RouteException('Route not found!'); + } + } +} diff --git a/redesigned-flutter-Counter-app/lib/presentation/screens/counter_screen/counter_screen.dart b/redesigned-flutter-Counter-app/lib/presentation/screens/counter_screen/counter_screen.dart new file mode 100644 index 00000000..724d4921 --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/presentation/screens/counter_screen/counter_screen.dart @@ -0,0 +1,33 @@ +import 'package:bloc_architecture_app/presentation/screens/counter_screen/widgets/animated_circles.dart'; +import 'package:bloc_architecture_app/presentation/screens/counter_screen/widgets/counter_slider.dart'; +import 'package:bloc_architecture_app/presentation/screens/counter_screen/widgets/counter_value.dart'; +import 'package:bloc_architecture_app/presentation/screens/counter_screen/widgets/plasma_background.dart'; +import 'package:flutter/material.dart'; +import 'package:sizer/sizer.dart'; + +class CounterScreen extends StatelessWidget { + CounterScreen({Key key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Stack( + alignment: Alignment.center, + children: [ + PlasmaBackground(), + Positioned( + top: 10.0.h, + child: Stack( + alignment: Alignment.center, + children: [ + AnimatedCircles(), + CounterValue(), + ], + ), + ), + Positioned(bottom: 8.0.h, child: CounterSlider()), + ], + ), + ); + } +} diff --git a/redesigned-flutter-Counter-app/lib/presentation/screens/counter_screen/widgets/animated_circles.dart b/redesigned-flutter-Counter-app/lib/presentation/screens/counter_screen/widgets/animated_circles.dart new file mode 100644 index 00000000..b56c1870 --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/presentation/screens/counter_screen/widgets/animated_circles.dart @@ -0,0 +1,22 @@ +import 'package:flare_flutter/flare_actor.dart'; +import 'package:flutter/material.dart'; +import 'package:sizer/sizer.dart'; + +class AnimatedCircles extends StatelessWidget { + const AnimatedCircles({ + Key key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Container( + width: 70.0.w, + height: 40.0.h, + child: FlareActor( + 'assets/flares/circle.flr', + animation: "Alarm", + color: Theme.of(context).accentColor, + ), + ); + } +} diff --git a/redesigned-flutter-Counter-app/lib/presentation/screens/counter_screen/widgets/counter_slider.dart b/redesigned-flutter-Counter-app/lib/presentation/screens/counter_screen/widgets/counter_slider.dart new file mode 100644 index 00000000..94a538c1 --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/presentation/screens/counter_screen/widgets/counter_slider.dart @@ -0,0 +1,155 @@ +import 'package:bloc_architecture_app/logic/cubit/counter_cubit.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/physics.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:sizer/sizer.dart'; + +class CounterSlider extends StatefulWidget { + const CounterSlider({ + Key key, + }) : super(key: key); + + @override + _Stepper2State createState() => _Stepper2State(); +} + +class _Stepper2State extends State + with SingleTickerProviderStateMixin { + AnimationController _controller; + Animation _animation; + double _startAnimationPosX; + + @override + void initState() { + super.initState(); + + _controller = + AnimationController(vsync: this, lowerBound: -0.5, upperBound: 0.5); + _controller.value = 0.0; + _controller.addListener(() {}); + + _animation = Tween(begin: Offset(0.0, 0.0), end: Offset(1.5, 0.0)) + .animate(_controller); + } + + @override + void dispose() { + _controller?.dispose(); + super.dispose(); + } + + @override + void didUpdateWidget(oldWidget) { + super.didUpdateWidget(oldWidget); + _animation = Tween(begin: Offset(0.0, 0.0), end: Offset(1.5, 0.0)) + .animate(_controller); + } + + @override + Widget build(BuildContext context) { + return FittedBox( + child: Container( + width: SizerUtil.deviceType == DeviceType.tablet ? 40.0.w : 55.0.w, + height: 12.0.h, + child: Material( + type: MaterialType.canvas, + clipBehavior: Clip.antiAlias, + borderRadius: BorderRadius.circular(60.0), + color: Theme.of(context).accentColor.withOpacity(0.2), + child: Stack( + alignment: Alignment.center, + children: [ + Positioned( + left: 10.0, + bottom: null, + child: Icon( + Icons.remove, + size: SizerUtil.deviceType == DeviceType.tablet + ? 7.0.w + : 10.0.w, + color: Theme.of(context).iconTheme.color.withOpacity(0.7), + ), + ), + Positioned( + right: 10.0, + top: null, + child: Icon( + Icons.add, + size: SizerUtil.deviceType == DeviceType.tablet + ? 7.0.w + : 10.0.w, + color: Theme.of(context).iconTheme.color.withOpacity(0.7), + ), + ), + GestureDetector( + onHorizontalDragStart: _onPanStart, + onHorizontalDragUpdate: _onPanUpdate, + onHorizontalDragEnd: _onPanEnd, + child: SlideTransition( + position: _animation, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Material( + color: Theme.of(context).accentColor, + shape: const CircleBorder(), + elevation: 5.0, + child: Center( + child: Icon( + Icons.trip_origin, + size: SizerUtil.deviceType == DeviceType.tablet + ? 7.0.w + : 10.0.w, + color: Theme.of(context) + .iconTheme + .color + .withOpacity(0.6), + ), + ), + ), + ), + ), + ), + ], + ), + ), + ), + ); + } + + double offsetFromGlobalPos(Offset globalPosition) { + RenderBox box = context.findRenderObject() as RenderBox; + Offset local = box.globalToLocal(globalPosition); + _startAnimationPosX = ((local.dx * 0.75) / box.size.width) - 0.4; + + return ((local.dx * 0.75) / box.size.width) - 0.4; + } + + void _onPanStart(DragStartDetails details) { + _controller.stop(); + _controller.value = offsetFromGlobalPos(details.globalPosition); + } + + void _onPanUpdate(DragUpdateDetails details) { + _controller.value = offsetFromGlobalPos(details.globalPosition); + } + + void _onPanEnd(DragEndDetails details) { + _controller.stop(); + + if (_controller.value <= -0.20) { + context.read().decrement(); + } else if (_controller.value >= 0.20) { + context.read().increment(); + } + + final SpringDescription _kDefaultSpring = + new SpringDescription.withDampingRatio( + mass: 0.9, + stiffness: 250.0, + ratio: 0.6, + ); + + _controller.animateWith( + SpringSimulation(_kDefaultSpring, _startAnimationPosX, 0.0, 0.0)); + } +} diff --git a/redesigned-flutter-Counter-app/lib/presentation/screens/counter_screen/widgets/counter_value.dart b/redesigned-flutter-Counter-app/lib/presentation/screens/counter_screen/widgets/counter_value.dart new file mode 100644 index 00000000..33d606c5 --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/presentation/screens/counter_screen/widgets/counter_value.dart @@ -0,0 +1,44 @@ +import 'package:animate_do/animate_do.dart'; +import 'package:bloc_architecture_app/logic/cubit/counter_cubit.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:sizer/sizer.dart'; + +class CounterValue extends StatefulWidget { + const CounterValue({ + Key key, + }) : super(key: key); + + @override + _CounterValueState createState() => _CounterValueState(); +} + +class _CounterValueState extends State { + AnimationController _animationController; + + @override + void dispose() { + _animationController?.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + _animationController?.forward(from: 0.0); + return ZoomIn( + duration: const Duration(milliseconds: 400), + manualTrigger: true, + controller: (controller) => _animationController = controller, + child: Text( + context + .select( + (CounterCubit counterCubit) => counterCubit.state.counterValue) + .toString(), + style: Theme.of(context).textTheme.headline1.copyWith( + fontWeight: FontWeight.bold, + fontSize: 80.0.sp, + ), + ), + ); + } +} diff --git a/redesigned-flutter-Counter-app/lib/presentation/screens/counter_screen/widgets/plasma_background.dart b/redesigned-flutter-Counter-app/lib/presentation/screens/counter_screen/widgets/plasma_background.dart new file mode 100644 index 00000000..0c98eb56 --- /dev/null +++ b/redesigned-flutter-Counter-app/lib/presentation/screens/counter_screen/widgets/plasma_background.dart @@ -0,0 +1,33 @@ +import 'package:flutter/material.dart'; +import 'package:simple_animations/simple_animations.dart'; +import 'package:bloc_architecture_app/core/themes/app_theme.dart'; + +class PlasmaBackground extends StatelessWidget { + const PlasmaBackground({ + Key key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + color: Theme.of(context).backgroundColor, + backgroundBlendMode: BlendMode.srcOver, + ), + child: PlasmaRenderer( + type: PlasmaType.infinity, + particles: 5, + color: Theme.of(context).particlesColor, + blur: 0.51, + size: 0.39, + speed: 0.39, + offset: 0, + blendMode: BlendMode.plus, + variation1: 0, + variation2: 0, + variation3: 0, + rotation: 0, + ), + ); + } +} diff --git a/redesigned-flutter-Counter-app/pubspec.lock b/redesigned-flutter-Counter-app/pubspec.lock new file mode 100644 index 00000000..d90b9d80 --- /dev/null +++ b/redesigned-flutter-Counter-app/pubspec.lock @@ -0,0 +1,500 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + animate_do: + dependency: "direct main" + description: + name: animate_do + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.8.1" + bloc: + dependency: "direct main" + description: + name: bloc + url: "https://pub.dartlang.org" + source: hosted + version: "7.0.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.15.0" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + device_frame: + dependency: transitive + description: + name: device_frame + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + device_preview: + dependency: "direct main" + description: + name: device_preview + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.1" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + ffi: + dependency: transitive + description: + name: ffi + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + file: + dependency: transitive + description: + name: file + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.1" + flare_flutter: + dependency: "direct main" + description: + name: flare_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + url: "https://pub.dartlang.org" + source: hosted + version: "7.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_svg: + dependency: transitive + description: + name: flutter_svg + url: "https://pub.dartlang.org" + source: hosted + version: "0.21.0+1" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + font_awesome_flutter: + dependency: transitive + description: + name: font_awesome_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "9.0.0" + freezed_annotation: + dependency: transitive + description: + name: freezed_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "0.14.2" + hive: + dependency: transitive + description: + name: hive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.3" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.0" + hydrated_bloc: + dependency: "direct main" + description: + name: hydrated_bloc + url: "https://pub.dartlang.org" + source: hosted + version: "7.0.0" + intl: + dependency: transitive + description: + name: intl + url: "https://pub.dartlang.org" + source: hosted + version: "0.17.0" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.3" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.1" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.10" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + nested: + dependency: transitive + description: + name: nested + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.0" + path_drawing: + dependency: transitive + description: + name: path_drawing + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.1" + path_provider: + dependency: transitive + description: + name: path_provider + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + path_provider_macos: + dependency: transitive + description: + name: path_provider_macos + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.11.0" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "4.1.0" + platform: + dependency: transitive + description: + name: platform + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + process: + dependency: transitive + description: + name: process + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.1" + provider: + dependency: transitive + description: + name: provider + url: "https://pub.dartlang.org" + source: hosted + version: "5.0.0" + shared_preferences: + dependency: transitive + description: + name: shared_preferences + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.5" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + shared_preferences_macos: + dependency: transitive + description: + name: shared_preferences_macos + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + simple_animations: + dependency: "direct main" + description: + name: simple_animations + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.1" + sizer: + dependency: "direct main" + description: + name: sizer + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.13" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.10.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + supercharged: + dependency: transitive + description: + name: supercharged + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + supercharged_dart: + dependency: transitive + description: + name: supercharged_dart + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + synchronized: + dependency: transitive + description: + name: synchronized + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.2" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0" + universal_io: + dependency: transitive + description: + name: universal_io + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + win32: + dependency: transitive + description: + name: win32 + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "5.1.1" +sdks: + dart: ">=2.13.0 <3.0.0" + flutter: ">=1.24.0-7.0" diff --git a/redesigned-flutter-Counter-app/pubspec.yaml b/redesigned-flutter-Counter-app/pubspec.yaml new file mode 100644 index 00000000..b315f576 --- /dev/null +++ b/redesigned-flutter-Counter-app/pubspec.yaml @@ -0,0 +1,31 @@ +name: bloc_architecture_app +description: A Flutetr Bloc Architecture project. + +publish_to: "none" + +version: 1.0.0+1 + +environment: + sdk: ">=2.7.0 <3.0.0" + +dependencies: + flutter: + sdk: flutter + animate_do: ^2.0.0 + bloc: ^7.0.0 + cupertino_icons: ^1.0.0 + device_preview: ^0.7.1 + flare_flutter: ^3.0.0 + flutter_bloc: ^7.0.0 + hydrated_bloc: ^7.0.0 + simple_animations: ^3.1.1 + sizer: ^2.0.13 + +dev_dependencies: + flutter_test: + sdk: flutter + +flutter: + uses-material-design: true + assets: + - assets/flares/