├── README.md
├── android
├── align_ai_android.iml
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── io
│ │ │ │ └── flutter
│ │ │ │ └── plugins
│ │ │ │ └── GeneratedPluginRegistrant.java
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── align_ai
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── local.properties
└── settings.gradle
├── assets
├── posenet_mv1_075_float_from_checkpoints.tflite
└── set-tiny-women-performing-yoga-poses-women-practicing-asanas-pelvic-floor-exercises-flat-cartoon-isolated-white-background_176448-14.jpg
├── images
├── 3.jpg
├── 4.jpg
├── Capture.PNG
├── align.PNG
├── align.jpg
├── arm-press.gif
├── arm_press.PNG
├── cardio.PNG
├── construction.PNG
├── crunch.PNG
├── img1.png
├── lunge_squat.PNG
├── pilates.PNG
├── plank.PNG
├── push_up.PNG
├── squat.PNG
├── warrior-pose.gif
├── workout.PNG
├── yoga.PNG
├── yoga1.PNG
├── yoga2.PNG
├── yoga3.PNG
├── yoga4.PNG
└── yoga5.PNG
├── ios
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ ├── Generated.xcconfig
│ ├── Release.xcconfig
│ └── flutter_export_environment.sh
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── GeneratedPluginRegistrant.h
│ ├── GeneratedPluginRegistrant.m
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── home_screen.dart
├── main.dart
├── main_screen.dart
├── pushed_pageA.dart
├── pushed_pageS.dart
├── pushed_pageY.dart
├── services
│ ├── camera.dart
│ ├── render_data.dart
│ ├── render_data_arm_press.dart
│ └── render_data_yoga.dart
├── widgets
│ └── search_bar.dart
└── workouts.dart
├── pubspec.lock
├── pubspec.yaml
└── test
└── widget_test.dart
/README.md:
--------------------------------------------------------------------------------
1 | # Hack Western 7 - AlignAI
2 |
3 |
4 |
5 |
6 |
7 | AlignAI is a mobile fitness application that utilizes TensorFLows pose estimation model to determine if a user is doing a specified exercise correctly based on their body alignment.
8 |
9 | The Flutter app was built in 48 hours for Hack Western, a digital Hackathon. Check out the full app demo [here](https://youtu.be/qTkxSWIwJk8)
10 |
11 |
12 |
13 |
14 |
15 | Since this was built in only 48 hours the code is certainly not perfect, but it works and I'll be improving it in the future!
16 |
--------------------------------------------------------------------------------
/android/align_ai_android.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | aaptOptions {
30 | noCompress 'tflite'
31 | noCompress 'lite'
32 | }
33 | compileSdkVersion 28
34 |
35 | sourceSets {
36 | main.java.srcDirs += 'src/main/kotlin'
37 | }
38 |
39 | lintOptions {
40 | disable 'InvalidPackage'
41 | }
42 |
43 | defaultConfig {
44 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
45 | applicationId "com.example.align_ai"
46 | minSdkVersion 21
47 | targetSdkVersion 28
48 | versionCode flutterVersionCode.toInteger()
49 | versionName flutterVersionName
50 | }
51 |
52 | buildTypes {
53 | release {
54 | // TODO: Add your own signing config for the release build.
55 | // Signing with the debug keys for now, so `flutter run --release` works.
56 | signingConfig signingConfigs.debug
57 | }
58 | }
59 | }
60 |
61 | flutter {
62 | source '../..'
63 | }
64 |
65 | dependencies {
66 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
67 | }
68 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
12 |
19 |
23 |
27 |
32 |
36 |
37 |
38 |
39 |
40 |
41 |
43 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:
--------------------------------------------------------------------------------
1 | package io.flutter.plugins;
2 |
3 | import androidx.annotation.Keep;
4 | import androidx.annotation.NonNull;
5 |
6 | import io.flutter.embedding.engine.FlutterEngine;
7 | import io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry;
8 |
9 | /**
10 | * Generated file. Do not edit.
11 | * This file is generated by the Flutter tool based on the
12 | * plugins that support the Android platform.
13 | */
14 | @Keep
15 | public final class GeneratedPluginRegistrant {
16 | public static void registerWith(@NonNull FlutterEngine flutterEngine) {
17 | ShimPluginRegistry shimPluginRegistry = new ShimPluginRegistry(flutterEngine);
18 | flutterEngine.getPlugins().add(new io.flutter.plugins.camera.CameraPlugin());
19 | sq.flutter.tflite.TflitePlugin.registerWith(shimPluginRegistry.registrarFor("sq.flutter.tflite.TflitePlugin"));
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/align_ai/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.align_ai
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.5.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/android/local.properties:
--------------------------------------------------------------------------------
1 | sdk.dir=C:\\Users\\peter\\AppData\\Local\\Android\\sdk
2 | flutter.sdk=C:\\flutter
3 | flutter.buildMode=debug
4 | flutter.versionName=1.0.0
5 | flutter.versionCode=1
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/assets/posenet_mv1_075_float_from_checkpoints.tflite:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/assets/posenet_mv1_075_float_from_checkpoints.tflite
--------------------------------------------------------------------------------
/assets/set-tiny-women-performing-yoga-poses-women-practicing-asanas-pelvic-floor-exercises-flat-cartoon-isolated-white-background_176448-14.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/assets/set-tiny-women-performing-yoga-poses-women-practicing-asanas-pelvic-floor-exercises-flat-cartoon-isolated-white-background_176448-14.jpg
--------------------------------------------------------------------------------
/images/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/3.jpg
--------------------------------------------------------------------------------
/images/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/4.jpg
--------------------------------------------------------------------------------
/images/Capture.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/Capture.PNG
--------------------------------------------------------------------------------
/images/align.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/align.PNG
--------------------------------------------------------------------------------
/images/align.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/align.jpg
--------------------------------------------------------------------------------
/images/arm-press.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/arm-press.gif
--------------------------------------------------------------------------------
/images/arm_press.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/arm_press.PNG
--------------------------------------------------------------------------------
/images/cardio.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/cardio.PNG
--------------------------------------------------------------------------------
/images/construction.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/construction.PNG
--------------------------------------------------------------------------------
/images/crunch.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/crunch.PNG
--------------------------------------------------------------------------------
/images/img1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/img1.png
--------------------------------------------------------------------------------
/images/lunge_squat.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/lunge_squat.PNG
--------------------------------------------------------------------------------
/images/pilates.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/pilates.PNG
--------------------------------------------------------------------------------
/images/plank.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/plank.PNG
--------------------------------------------------------------------------------
/images/push_up.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/push_up.PNG
--------------------------------------------------------------------------------
/images/squat.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/squat.PNG
--------------------------------------------------------------------------------
/images/warrior-pose.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/warrior-pose.gif
--------------------------------------------------------------------------------
/images/workout.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/workout.PNG
--------------------------------------------------------------------------------
/images/yoga.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/yoga.PNG
--------------------------------------------------------------------------------
/images/yoga1.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/yoga1.PNG
--------------------------------------------------------------------------------
/images/yoga2.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/yoga2.PNG
--------------------------------------------------------------------------------
/images/yoga3.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/yoga3.PNG
--------------------------------------------------------------------------------
/images/yoga4.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/yoga4.PNG
--------------------------------------------------------------------------------
/images/yoga5.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/images/yoga5.PNG
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Generated.xcconfig:
--------------------------------------------------------------------------------
1 | // This is a generated file; do not edit or check into version control.
2 | FLUTTER_ROOT=C:\flutter
3 | FLUTTER_APPLICATION_PATH=C:\Users\peter\Desktop\align_ai\align_ai
4 | FLUTTER_TARGET=lib\main.dart
5 | FLUTTER_BUILD_DIR=build
6 | SYMROOT=${SOURCE_ROOT}/../build\ios
7 | OTHER_LDFLAGS=$(inherited) -framework Flutter
8 | FLUTTER_FRAMEWORK_DIR=C:\flutter\bin\cache\artifacts\engine\ios
9 | FLUTTER_BUILD_NAME=1.0.0
10 | FLUTTER_BUILD_NUMBER=1
11 | DART_OBFUSCATION=false
12 | TRACK_WIDGET_CREATION=false
13 | TREE_SHAKE_ICONS=false
14 | PACKAGE_CONFIG=.packages
15 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/flutter_export_environment.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # This is a generated file; do not edit or check into version control.
3 | export "FLUTTER_ROOT=C:\flutter"
4 | export "FLUTTER_APPLICATION_PATH=C:\Users\peter\Desktop\align_ai\align_ai"
5 | export "FLUTTER_TARGET=lib\main.dart"
6 | export "FLUTTER_BUILD_DIR=build"
7 | export "SYMROOT=${SOURCE_ROOT}/../build\ios"
8 | export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
9 | export "FLUTTER_FRAMEWORK_DIR=C:\flutter\bin\cache\artifacts\engine\ios"
10 | export "FLUTTER_BUILD_NAME=1.0.0"
11 | export "FLUTTER_BUILD_NUMBER=1"
12 | export "DART_OBFUSCATION=false"
13 | export "TRACK_WIDGET_CREATION=false"
14 | export "TREE_SHAKE_ICONS=false"
15 | export "PACKAGE_CONFIG=.packages"
16 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXCopyFilesBuildPhase section */
19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
20 | isa = PBXCopyFilesBuildPhase;
21 | buildActionMask = 2147483647;
22 | dstPath = "";
23 | dstSubfolderSpec = 10;
24 | files = (
25 | );
26 | name = "Embed Frameworks";
27 | runOnlyForDeploymentPostprocessing = 0;
28 | };
29 | /* End PBXCopyFilesBuildPhase section */
30 |
31 | /* Begin PBXFileReference section */
32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | /* End PBXFileReference section */
46 |
47 | /* Begin PBXFrameworksBuildPhase section */
48 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
49 | isa = PBXFrameworksBuildPhase;
50 | buildActionMask = 2147483647;
51 | files = (
52 | );
53 | runOnlyForDeploymentPostprocessing = 0;
54 | };
55 | /* End PBXFrameworksBuildPhase section */
56 |
57 | /* Begin PBXGroup section */
58 | 9740EEB11CF90186004384FC /* Flutter */ = {
59 | isa = PBXGroup;
60 | children = (
61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
65 | );
66 | name = Flutter;
67 | sourceTree = "";
68 | };
69 | 97C146E51CF9000F007C117D = {
70 | isa = PBXGroup;
71 | children = (
72 | 9740EEB11CF90186004384FC /* Flutter */,
73 | 97C146F01CF9000F007C117D /* Runner */,
74 | 97C146EF1CF9000F007C117D /* Products */,
75 | );
76 | sourceTree = "";
77 | };
78 | 97C146EF1CF9000F007C117D /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 97C146EE1CF9000F007C117D /* Runner.app */,
82 | );
83 | name = Products;
84 | sourceTree = "";
85 | };
86 | 97C146F01CF9000F007C117D /* Runner */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
92 | 97C147021CF9000F007C117D /* Info.plist */,
93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
97 | );
98 | path = Runner;
99 | sourceTree = "";
100 | };
101 | /* End PBXGroup section */
102 |
103 | /* Begin PBXNativeTarget section */
104 | 97C146ED1CF9000F007C117D /* Runner */ = {
105 | isa = PBXNativeTarget;
106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107 | buildPhases = (
108 | 9740EEB61CF901F6004384FC /* Run Script */,
109 | 97C146EA1CF9000F007C117D /* Sources */,
110 | 97C146EB1CF9000F007C117D /* Frameworks */,
111 | 97C146EC1CF9000F007C117D /* Resources */,
112 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
114 | );
115 | buildRules = (
116 | );
117 | dependencies = (
118 | );
119 | name = Runner;
120 | productName = Runner;
121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
122 | productType = "com.apple.product-type.application";
123 | };
124 | /* End PBXNativeTarget section */
125 |
126 | /* Begin PBXProject section */
127 | 97C146E61CF9000F007C117D /* Project object */ = {
128 | isa = PBXProject;
129 | attributes = {
130 | LastUpgradeCheck = 1020;
131 | ORGANIZATIONNAME = "";
132 | TargetAttributes = {
133 | 97C146ED1CF9000F007C117D = {
134 | CreatedOnToolsVersion = 7.3.1;
135 | LastSwiftMigration = 1100;
136 | };
137 | };
138 | };
139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
140 | compatibilityVersion = "Xcode 9.3";
141 | developmentRegion = en;
142 | hasScannedForEncodings = 0;
143 | knownRegions = (
144 | en,
145 | Base,
146 | );
147 | mainGroup = 97C146E51CF9000F007C117D;
148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
149 | projectDirPath = "";
150 | projectRoot = "";
151 | targets = (
152 | 97C146ED1CF9000F007C117D /* Runner */,
153 | );
154 | };
155 | /* End PBXProject section */
156 |
157 | /* Begin PBXResourcesBuildPhase section */
158 | 97C146EC1CF9000F007C117D /* Resources */ = {
159 | isa = PBXResourcesBuildPhase;
160 | buildActionMask = 2147483647;
161 | files = (
162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
166 | );
167 | runOnlyForDeploymentPostprocessing = 0;
168 | };
169 | /* End PBXResourcesBuildPhase section */
170 |
171 | /* Begin PBXShellScriptBuildPhase section */
172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
173 | isa = PBXShellScriptBuildPhase;
174 | buildActionMask = 2147483647;
175 | files = (
176 | );
177 | inputPaths = (
178 | );
179 | name = "Thin Binary";
180 | outputPaths = (
181 | );
182 | runOnlyForDeploymentPostprocessing = 0;
183 | shellPath = /bin/sh;
184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
185 | };
186 | 9740EEB61CF901F6004384FC /* Run Script */ = {
187 | isa = PBXShellScriptBuildPhase;
188 | buildActionMask = 2147483647;
189 | files = (
190 | );
191 | inputPaths = (
192 | );
193 | name = "Run Script";
194 | outputPaths = (
195 | );
196 | runOnlyForDeploymentPostprocessing = 0;
197 | shellPath = /bin/sh;
198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
199 | };
200 | /* End PBXShellScriptBuildPhase section */
201 |
202 | /* Begin PBXSourcesBuildPhase section */
203 | 97C146EA1CF9000F007C117D /* Sources */ = {
204 | isa = PBXSourcesBuildPhase;
205 | buildActionMask = 2147483647;
206 | files = (
207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
209 | );
210 | runOnlyForDeploymentPostprocessing = 0;
211 | };
212 | /* End PBXSourcesBuildPhase section */
213 |
214 | /* Begin PBXVariantGroup section */
215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
216 | isa = PBXVariantGroup;
217 | children = (
218 | 97C146FB1CF9000F007C117D /* Base */,
219 | );
220 | name = Main.storyboard;
221 | sourceTree = "";
222 | };
223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
224 | isa = PBXVariantGroup;
225 | children = (
226 | 97C147001CF9000F007C117D /* Base */,
227 | );
228 | name = LaunchScreen.storyboard;
229 | sourceTree = "";
230 | };
231 | /* End PBXVariantGroup section */
232 |
233 | /* Begin XCBuildConfiguration section */
234 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
235 | isa = XCBuildConfiguration;
236 | buildSettings = {
237 | ALWAYS_SEARCH_USER_PATHS = NO;
238 | CLANG_ANALYZER_NONNULL = YES;
239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
240 | CLANG_CXX_LIBRARY = "libc++";
241 | CLANG_ENABLE_MODULES = YES;
242 | CLANG_ENABLE_OBJC_ARC = YES;
243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
244 | CLANG_WARN_BOOL_CONVERSION = YES;
245 | CLANG_WARN_COMMA = YES;
246 | CLANG_WARN_CONSTANT_CONVERSION = YES;
247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
249 | CLANG_WARN_EMPTY_BODY = YES;
250 | CLANG_WARN_ENUM_CONVERSION = YES;
251 | CLANG_WARN_INFINITE_RECURSION = YES;
252 | CLANG_WARN_INT_CONVERSION = YES;
253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
258 | CLANG_WARN_STRICT_PROTOTYPES = YES;
259 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
260 | CLANG_WARN_UNREACHABLE_CODE = YES;
261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
263 | COPY_PHASE_STRIP = NO;
264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
265 | ENABLE_NS_ASSERTIONS = NO;
266 | ENABLE_STRICT_OBJC_MSGSEND = YES;
267 | GCC_C_LANGUAGE_STANDARD = gnu99;
268 | GCC_NO_COMMON_BLOCKS = YES;
269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
271 | GCC_WARN_UNDECLARED_SELECTOR = YES;
272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
273 | GCC_WARN_UNUSED_FUNCTION = YES;
274 | GCC_WARN_UNUSED_VARIABLE = YES;
275 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
276 | MTL_ENABLE_DEBUG_INFO = NO;
277 | SDKROOT = iphoneos;
278 | SUPPORTED_PLATFORMS = iphoneos;
279 | TARGETED_DEVICE_FAMILY = "1,2";
280 | VALIDATE_PRODUCT = YES;
281 | };
282 | name = Profile;
283 | };
284 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
285 | isa = XCBuildConfiguration;
286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
287 | buildSettings = {
288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
289 | CLANG_ENABLE_MODULES = YES;
290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
291 | ENABLE_BITCODE = NO;
292 | FRAMEWORK_SEARCH_PATHS = (
293 | "$(inherited)",
294 | "$(PROJECT_DIR)/Flutter",
295 | );
296 | INFOPLIST_FILE = Runner/Info.plist;
297 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
298 | LIBRARY_SEARCH_PATHS = (
299 | "$(inherited)",
300 | "$(PROJECT_DIR)/Flutter",
301 | );
302 | PRODUCT_BUNDLE_IDENTIFIER = com.example.alignAi;
303 | PRODUCT_NAME = "$(TARGET_NAME)";
304 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
305 | SWIFT_VERSION = 5.0;
306 | VERSIONING_SYSTEM = "apple-generic";
307 | };
308 | name = Profile;
309 | };
310 | 97C147031CF9000F007C117D /* Debug */ = {
311 | isa = XCBuildConfiguration;
312 | buildSettings = {
313 | ALWAYS_SEARCH_USER_PATHS = NO;
314 | CLANG_ANALYZER_NONNULL = YES;
315 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
316 | CLANG_CXX_LIBRARY = "libc++";
317 | CLANG_ENABLE_MODULES = YES;
318 | CLANG_ENABLE_OBJC_ARC = YES;
319 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
320 | CLANG_WARN_BOOL_CONVERSION = YES;
321 | CLANG_WARN_COMMA = YES;
322 | CLANG_WARN_CONSTANT_CONVERSION = YES;
323 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
325 | CLANG_WARN_EMPTY_BODY = YES;
326 | CLANG_WARN_ENUM_CONVERSION = YES;
327 | CLANG_WARN_INFINITE_RECURSION = YES;
328 | CLANG_WARN_INT_CONVERSION = YES;
329 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
330 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
334 | CLANG_WARN_STRICT_PROTOTYPES = YES;
335 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
336 | CLANG_WARN_UNREACHABLE_CODE = YES;
337 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
338 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
339 | COPY_PHASE_STRIP = NO;
340 | DEBUG_INFORMATION_FORMAT = dwarf;
341 | ENABLE_STRICT_OBJC_MSGSEND = YES;
342 | ENABLE_TESTABILITY = YES;
343 | GCC_C_LANGUAGE_STANDARD = gnu99;
344 | GCC_DYNAMIC_NO_PIC = NO;
345 | GCC_NO_COMMON_BLOCKS = YES;
346 | GCC_OPTIMIZATION_LEVEL = 0;
347 | GCC_PREPROCESSOR_DEFINITIONS = (
348 | "DEBUG=1",
349 | "$(inherited)",
350 | );
351 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
352 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
353 | GCC_WARN_UNDECLARED_SELECTOR = YES;
354 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
355 | GCC_WARN_UNUSED_FUNCTION = YES;
356 | GCC_WARN_UNUSED_VARIABLE = YES;
357 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
358 | MTL_ENABLE_DEBUG_INFO = YES;
359 | ONLY_ACTIVE_ARCH = YES;
360 | SDKROOT = iphoneos;
361 | TARGETED_DEVICE_FAMILY = "1,2";
362 | };
363 | name = Debug;
364 | };
365 | 97C147041CF9000F007C117D /* Release */ = {
366 | isa = XCBuildConfiguration;
367 | buildSettings = {
368 | ALWAYS_SEARCH_USER_PATHS = NO;
369 | CLANG_ANALYZER_NONNULL = YES;
370 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
371 | CLANG_CXX_LIBRARY = "libc++";
372 | CLANG_ENABLE_MODULES = YES;
373 | CLANG_ENABLE_OBJC_ARC = YES;
374 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
375 | CLANG_WARN_BOOL_CONVERSION = YES;
376 | CLANG_WARN_COMMA = YES;
377 | CLANG_WARN_CONSTANT_CONVERSION = YES;
378 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
380 | CLANG_WARN_EMPTY_BODY = YES;
381 | CLANG_WARN_ENUM_CONVERSION = YES;
382 | CLANG_WARN_INFINITE_RECURSION = YES;
383 | CLANG_WARN_INT_CONVERSION = YES;
384 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
385 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
386 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
387 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
388 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
389 | CLANG_WARN_STRICT_PROTOTYPES = YES;
390 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
391 | CLANG_WARN_UNREACHABLE_CODE = YES;
392 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
393 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
394 | COPY_PHASE_STRIP = NO;
395 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
396 | ENABLE_NS_ASSERTIONS = NO;
397 | ENABLE_STRICT_OBJC_MSGSEND = YES;
398 | GCC_C_LANGUAGE_STANDARD = gnu99;
399 | GCC_NO_COMMON_BLOCKS = YES;
400 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
401 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
402 | GCC_WARN_UNDECLARED_SELECTOR = YES;
403 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
404 | GCC_WARN_UNUSED_FUNCTION = YES;
405 | GCC_WARN_UNUSED_VARIABLE = YES;
406 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
407 | MTL_ENABLE_DEBUG_INFO = NO;
408 | SDKROOT = iphoneos;
409 | SUPPORTED_PLATFORMS = iphoneos;
410 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
411 | TARGETED_DEVICE_FAMILY = "1,2";
412 | VALIDATE_PRODUCT = YES;
413 | };
414 | name = Release;
415 | };
416 | 97C147061CF9000F007C117D /* Debug */ = {
417 | isa = XCBuildConfiguration;
418 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
419 | buildSettings = {
420 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
421 | CLANG_ENABLE_MODULES = YES;
422 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
423 | ENABLE_BITCODE = NO;
424 | FRAMEWORK_SEARCH_PATHS = (
425 | "$(inherited)",
426 | "$(PROJECT_DIR)/Flutter",
427 | );
428 | INFOPLIST_FILE = Runner/Info.plist;
429 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
430 | LIBRARY_SEARCH_PATHS = (
431 | "$(inherited)",
432 | "$(PROJECT_DIR)/Flutter",
433 | );
434 | PRODUCT_BUNDLE_IDENTIFIER = com.example.alignAi;
435 | PRODUCT_NAME = "$(TARGET_NAME)";
436 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
437 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
438 | SWIFT_VERSION = 5.0;
439 | VERSIONING_SYSTEM = "apple-generic";
440 | };
441 | name = Debug;
442 | };
443 | 97C147071CF9000F007C117D /* Release */ = {
444 | isa = XCBuildConfiguration;
445 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
446 | buildSettings = {
447 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
448 | CLANG_ENABLE_MODULES = YES;
449 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
450 | ENABLE_BITCODE = NO;
451 | FRAMEWORK_SEARCH_PATHS = (
452 | "$(inherited)",
453 | "$(PROJECT_DIR)/Flutter",
454 | );
455 | INFOPLIST_FILE = Runner/Info.plist;
456 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
457 | LIBRARY_SEARCH_PATHS = (
458 | "$(inherited)",
459 | "$(PROJECT_DIR)/Flutter",
460 | );
461 | PRODUCT_BUNDLE_IDENTIFIER = com.example.alignAi;
462 | PRODUCT_NAME = "$(TARGET_NAME)";
463 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
464 | SWIFT_VERSION = 5.0;
465 | VERSIONING_SYSTEM = "apple-generic";
466 | };
467 | name = Release;
468 | };
469 | /* End XCBuildConfiguration section */
470 |
471 | /* Begin XCConfigurationList section */
472 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
473 | isa = XCConfigurationList;
474 | buildConfigurations = (
475 | 97C147031CF9000F007C117D /* Debug */,
476 | 97C147041CF9000F007C117D /* Release */,
477 | 249021D3217E4FDB00AE95B9 /* Profile */,
478 | );
479 | defaultConfigurationIsVisible = 0;
480 | defaultConfigurationName = Release;
481 | };
482 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
483 | isa = XCConfigurationList;
484 | buildConfigurations = (
485 | 97C147061CF9000F007C117D /* Debug */,
486 | 97C147071CF9000F007C117D /* Release */,
487 | 249021D4217E4FDB00AE95B9 /* Profile */,
488 | );
489 | defaultConfigurationIsVisible = 0;
490 | defaultConfigurationName = Release;
491 | };
492 | /* End XCConfigurationList section */
493 | };
494 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
495 | }
496 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PeterMclay/AlignAI/d5f5f3be999e92f823e80960fc195d9099659b39/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/GeneratedPluginRegistrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | #ifndef GeneratedPluginRegistrant_h
6 | #define GeneratedPluginRegistrant_h
7 |
8 | #import
9 |
10 | NS_ASSUME_NONNULL_BEGIN
11 |
12 | @interface GeneratedPluginRegistrant : NSObject
13 | + (void)registerWithRegistry:(NSObject*)registry;
14 | @end
15 |
16 | NS_ASSUME_NONNULL_END
17 | #endif /* GeneratedPluginRegistrant_h */
18 |
--------------------------------------------------------------------------------
/ios/Runner/GeneratedPluginRegistrant.m:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | #import "GeneratedPluginRegistrant.h"
6 |
7 | #if __has_include()
8 | #import
9 | #else
10 | @import camera;
11 | #endif
12 |
13 | #if __has_include()
14 | #import
15 | #else
16 | @import tflite;
17 | #endif
18 |
19 | @implementation GeneratedPluginRegistrant
20 |
21 | + (void)registerWithRegistry:(NSObject*)registry {
22 | [CameraPlugin registerWithRegistrar:[registry registrarForPlugin:@"CameraPlugin"]];
23 | [TflitePlugin registerWithRegistrar:[registry registrarForPlugin:@"TflitePlugin"]];
24 | }
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | align_ai
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/lib/home_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:align_ai/main.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:line_awesome_flutter/line_awesome_flutter.dart';
4 | import 'package:camera/camera.dart';
5 |
6 | import 'main_screen.dart';
7 | import 'workouts.dart';
8 |
9 | class HomeScreen extends StatefulWidget {
10 | final List cameras;
11 | HomeScreen(this.cameras);
12 |
13 | @override
14 | _HomeScreenState createState() => _HomeScreenState();
15 | }
16 |
17 | class _HomeScreenState extends State {
18 | int _selectedIndex = 0;
19 | static List _widgetOptions = [
20 | MainScreen(cameras),
21 | WorkOutPage(),
22 | Image.asset('images/construction.PNG'),
23 | ];
24 |
25 | void _onItemTapped(int index) {
26 | setState(() {
27 | _selectedIndex = index;
28 | });
29 | }
30 |
31 | @override
32 | Widget build(BuildContext context) {
33 | return Scaffold(
34 | body: Center(
35 | child: _widgetOptions.elementAt(_selectedIndex),
36 | ),
37 | bottomNavigationBar: BottomNavigationBar(
38 | //fixedColor: Colors.white,
39 | backgroundColor: Colors.white,
40 | showSelectedLabels: false,
41 | showUnselectedLabels: false,
42 | items: const [
43 | BottomNavigationBarItem(
44 | backgroundColor: Colors.white,
45 | icon: Icon(LineAwesomeIcons.universal_access),
46 | title: Text('Align'),
47 | ),
48 | BottomNavigationBarItem(
49 | backgroundColor: Colors.white,
50 | icon: Icon(LineAwesomeIcons.burn),
51 | title: Text('Workout'),
52 | ),
53 | BottomNavigationBarItem(
54 | backgroundColor: Colors.white,
55 | icon: Icon(LineAwesomeIcons.user),
56 | title: Text('Profile'),
57 | ),
58 | ],
59 | currentIndex: _selectedIndex,
60 | unselectedItemColor: Colors.black,
61 | selectedItemColor: Color(0xFFFE7C7C),
62 | iconSize: 36.0,
63 | elevation: 0.0,
64 | onTap: _onItemTapped,
65 | ),
66 | );
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'dart:async';
3 | import 'package:camera/camera.dart';
4 |
5 | import 'main_screen.dart';
6 | import 'home_screen.dart';
7 |
8 | List cameras;
9 |
10 | Future main() async {
11 | WidgetsFlutterBinding.ensureInitialized();
12 | try {
13 | cameras = await availableCameras();
14 | } on CameraException catch (e) {
15 | print('Error: $e.code\nError Message: $e.message');
16 | }
17 | runApp(MyApp());
18 | }
19 |
20 | class MyApp extends StatelessWidget {
21 | @override
22 | Widget build(BuildContext context) {
23 | return MaterialApp(
24 | home: HomeScreen(cameras),
25 | //home: MainScreen(cameras),
26 | routes: {
27 | MainScreen.id: (context) => MainScreen(cameras),
28 | //DemoScreen.id: (context) => DemoScreen(),
29 | },
30 | );
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/lib/main_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:align_ai/main.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:camera/camera.dart';
4 | import 'package:align_ai/widgets/search_bar.dart';
5 |
6 | import 'pushed_pageA.dart';
7 | import 'pushed_pageS.dart';
8 | import 'pushed_pageY.dart';
9 |
10 | class MainScreen extends StatelessWidget {
11 | final List cameras;
12 | MainScreen(this.cameras);
13 |
14 | static const String id = 'main_screen';
15 | @override
16 | Widget build(BuildContext context) {
17 | Size screen = MediaQuery.of(context).size;
18 | return Scaffold(
19 | backgroundColor: Colors.white,
20 | // appBar: AppBar(
21 | // title: Text('Align.AI'),
22 | // backgroundColor: Colors.blueAccent,
23 | // ),
24 | body: Column(
25 | //mainAxisAlignment: MainAxisAlignment.start,
26 | crossAxisAlignment: CrossAxisAlignment.start,
27 | children: [
28 | SizedBox(height: 50),
29 | Container(
30 | padding: EdgeInsets.only(left: 16.0, right: 16.0),
31 | child: Text(
32 | 'AlignAI',
33 | style: TextStyle(
34 | color: Color(0xFFFE7C7C),
35 | fontWeight: FontWeight.bold,
36 | fontSize: 28.0,
37 | ),
38 | ),
39 | ),
40 | Container(
41 | padding: EdgeInsets.only(left: 16.0, right: 16.0),
42 | child: Text(
43 | 'Master Your Body Alignment',
44 | style: TextStyle(
45 | color: Colors.black,
46 | fontWeight: FontWeight.w400,
47 | fontSize: 18.0,
48 | ),
49 | ),
50 | ),
51 | SizedBox(height: 10),
52 | Image.asset('images/align.PNG'),
53 | SizedBox(height: 10),
54 | Container(
55 | padding: EdgeInsets.only(left: 16.0, right: 16.0),
56 | child: SizedBox(
57 | child: SearchBar('What pose do you wish to align?'),
58 | ),
59 | ),
60 | SizedBox(height: 20),
61 | Container(
62 | padding: EdgeInsets.only(left: 16.0, right: 16.0),
63 | child: Text(
64 | 'Strength Alignment',
65 | style: TextStyle(
66 | color: Colors.black,
67 | fontWeight: FontWeight.w600,
68 | fontSize: 24.0,
69 | ),
70 | ),
71 | ),
72 | Container(
73 | child: SizedBox(
74 | height: 150,
75 | child: ListView(
76 | padding: EdgeInsets.symmetric(vertical: 5.0),
77 | scrollDirection: Axis.horizontal,
78 | children: [
79 | Stack(
80 | children: [
81 | Container(
82 | width: 140,
83 | height: 140,
84 | padding: EdgeInsets.symmetric(horizontal: 10.0),
85 | child: RaisedButton(
86 | shape: RoundedRectangleBorder(
87 | borderRadius: BorderRadius.circular(18.0)),
88 | color: Colors.white,
89 | child: Container(
90 | padding: EdgeInsets.all(10.0),
91 | child: Image.asset('images/crunch.PNG')),
92 | onPressed: () {
93 | print('hello');
94 | },
95 | ),
96 | ),
97 | ],
98 | ),
99 | Stack(
100 | children: [
101 | Container(
102 | width: 140,
103 | height: 140,
104 | padding: EdgeInsets.symmetric(horizontal: 10.0),
105 | child: RaisedButton(
106 | shape: RoundedRectangleBorder(
107 | borderRadius: BorderRadius.circular(18.0)),
108 | color: Colors.white,
109 | child: Container(
110 | padding: EdgeInsets.all(10.0),
111 | child: Image.asset('images/arm_press.PNG')),
112 | onPressed: () =>
113 | onSelectA(context: context, modelName: 'posenet'),
114 | ),
115 | ),
116 | ],
117 | ),
118 | Stack(
119 | children: [
120 | Container(
121 | width: 140,
122 | height: 140,
123 | padding: EdgeInsets.symmetric(horizontal: 10.0),
124 | child: RaisedButton(
125 | shape: RoundedRectangleBorder(
126 | borderRadius: BorderRadius.circular(18.0)),
127 | color: Colors.white,
128 | child: Container(
129 | padding: EdgeInsets.all(10.0),
130 | child: Image.asset('images/push_up.PNG')),
131 | onPressed: () {
132 | print('hello');
133 | },
134 | ),
135 | ),
136 | ],
137 | ),
138 | Stack(
139 | children: [
140 | Container(
141 | width: 140,
142 | height: 140,
143 | padding: EdgeInsets.symmetric(horizontal: 10.0),
144 | child: RaisedButton(
145 | shape: RoundedRectangleBorder(
146 | borderRadius: BorderRadius.circular(18.0)),
147 | color: Colors.white,
148 | child: Container(
149 | padding: EdgeInsets.all(10.0),
150 | child: Image.asset('images/squat.PNG')),
151 | onPressed: () =>
152 | onSelectS(context: context, modelName: 'posenet'),
153 | ),
154 | ),
155 | ],
156 | ),
157 | Stack(
158 | children: [
159 | Container(
160 | width: 140,
161 | height: 140,
162 | padding: EdgeInsets.symmetric(horizontal: 10.0),
163 | child: RaisedButton(
164 | shape: RoundedRectangleBorder(
165 | borderRadius: BorderRadius.circular(18.0)),
166 | color: Colors.white,
167 | child: Container(
168 | padding: EdgeInsets.all(10.0),
169 | child: Image.asset('images/plank.PNG')),
170 | onPressed: () {
171 | print('hello');
172 | },
173 | ),
174 | ),
175 | ],
176 | ),
177 | Stack(
178 | children: [
179 | Container(
180 | width: 140,
181 | height: 140,
182 | padding: EdgeInsets.symmetric(horizontal: 10.0),
183 | child: RaisedButton(
184 | shape: RoundedRectangleBorder(
185 | borderRadius: BorderRadius.circular(18.0)),
186 | color: Colors.white,
187 | child: Container(
188 | padding: EdgeInsets.all(10.0),
189 | child: Image.asset('images/lunge_squat.PNG')),
190 | onPressed: () {
191 | print('hello');
192 | },
193 | ),
194 | ),
195 | ],
196 | ),
197 | ],
198 | ),
199 | ),
200 | ),
201 | SizedBox(height: 15.0),
202 | Container(
203 | padding: EdgeInsets.only(left: 16.0, right: 16.0),
204 | child: Text(
205 | 'Yoga Alignment',
206 | style: TextStyle(
207 | color: Colors.black,
208 | fontWeight: FontWeight.w600,
209 | fontSize: 24.0,
210 | ),
211 | ),
212 | ),
213 | Container(
214 | child: SizedBox(
215 | height: 150,
216 | child: ListView(
217 | padding: EdgeInsets.symmetric(vertical: 5.0),
218 | scrollDirection: Axis.horizontal,
219 | children: [
220 | Stack(
221 | children: [
222 | Container(
223 | width: 140,
224 | height: 140,
225 | padding: EdgeInsets.symmetric(horizontal: 10.0),
226 | child: RaisedButton(
227 | shape: RoundedRectangleBorder(
228 | borderRadius: BorderRadius.circular(18.0)),
229 | color: Colors.white,
230 | child: Container(
231 | padding: EdgeInsets.all(10.0),
232 | child: Image.asset('images/yoga1.PNG')),
233 | onPressed: () {
234 | print('hello');
235 | },
236 | ),
237 | ),
238 | ],
239 | ),
240 | Stack(
241 | children: [
242 | Container(
243 | width: 140,
244 | height: 140,
245 | padding: EdgeInsets.symmetric(horizontal: 10.0),
246 | child: RaisedButton(
247 | shape: RoundedRectangleBorder(
248 | borderRadius: BorderRadius.circular(18.0)),
249 | color: Colors.white,
250 | child: Container(
251 | padding: EdgeInsets.all(10.0),
252 | child: Image.asset('images/yoga4.PNG')),
253 | onPressed: () =>
254 | onSelectY(context: context, modelName: 'posenet'),
255 | ),
256 | ),
257 | ],
258 | ),
259 | Stack(
260 | children: [
261 | Container(
262 | width: 140,
263 | height: 140,
264 | padding: EdgeInsets.symmetric(horizontal: 10.0),
265 | child: RaisedButton(
266 | shape: RoundedRectangleBorder(
267 | borderRadius: BorderRadius.circular(18.0)),
268 | color: Colors.white,
269 | child: Container(
270 | padding: EdgeInsets.all(10.0),
271 | child: Image.asset('images/yoga2.PNG')),
272 | onPressed: () {
273 | print('hello');
274 | },
275 | ),
276 | ),
277 | ],
278 | ),
279 | Stack(
280 | children: [
281 | Container(
282 | width: 140,
283 | height: 140,
284 | padding: EdgeInsets.symmetric(horizontal: 10.0),
285 | child: RaisedButton(
286 | shape: RoundedRectangleBorder(
287 | borderRadius: BorderRadius.circular(18.0)),
288 | color: Colors.white,
289 | child: Container(
290 | padding: EdgeInsets.all(10.0),
291 | child: Image.asset('images/yoga3.PNG')),
292 | onPressed: () {
293 | print('hello');
294 | },
295 | ),
296 | ),
297 | ],
298 | ),
299 | Stack(
300 | children: [
301 | Container(
302 | width: 140,
303 | height: 140,
304 | padding: EdgeInsets.symmetric(horizontal: 10.0),
305 | child: RaisedButton(
306 | shape: RoundedRectangleBorder(
307 | borderRadius: BorderRadius.circular(18.0)),
308 | color: Colors.white,
309 | child: Container(
310 | padding: EdgeInsets.all(10.0),
311 | child: Image.asset('images/yoga5.PNG')),
312 | onPressed: () {
313 | print('hello');
314 | },
315 | ),
316 | ),
317 | ],
318 | ),
319 | ],
320 | ),
321 | ),
322 | ),
323 | // Container(
324 | // child: RaisedButton(
325 | // child: Text('Pose Estimation'),
326 | // onPressed: () =>
327 | // onSelectY(context: context, modelName: 'posenet'),
328 | // ),
329 | // ),
330 | ],
331 | ),
332 | );
333 | }
334 | }
335 |
336 | void onSelectA({BuildContext context, String modelName}) async {
337 | Navigator.push(
338 | context,
339 | MaterialPageRoute(
340 | builder: (context) => PushedPageA(
341 | cameras: cameras,
342 | title: modelName,
343 | ),
344 | ),
345 | );
346 | }
347 |
348 | void onSelectS({BuildContext context, String modelName}) async {
349 | Navigator.push(
350 | context,
351 | MaterialPageRoute(
352 | builder: (context) => PushedPageS(
353 | cameras: cameras,
354 | title: modelName,
355 | ),
356 | ),
357 | );
358 | }
359 |
360 | void onSelectY({BuildContext context, String modelName}) async {
361 | Navigator.push(
362 | context,
363 | MaterialPageRoute(
364 | builder: (context) => PushedPageY(
365 | cameras: cameras,
366 | title: modelName,
367 | ),
368 | ),
369 | );
370 | }
371 |
--------------------------------------------------------------------------------
/lib/pushed_pageA.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:camera/camera.dart';
3 | import 'package:tflite/tflite.dart';
4 | import 'dart:math';
5 |
6 | import 'package:align_ai/services/camera.dart';
7 | import 'package:align_ai/services/render_data.dart';
8 | import 'package:align_ai/services/render_data_yoga.dart';
9 | import 'package:align_ai/services/render_data_arm_press.dart';
10 |
11 | class PushedPageA extends StatefulWidget {
12 | final List cameras;
13 | final String title;
14 | const PushedPageA({this.cameras, this.title});
15 | @override
16 | _PushedPageAState createState() => _PushedPageAState();
17 | }
18 |
19 | class _PushedPageAState extends State {
20 | List _data;
21 | int _imageHeight = 0;
22 | int _imageWidth = 0;
23 | int x = 1;
24 |
25 | @override
26 | void initState() {
27 | super.initState();
28 | var res = loadModel();
29 | print('Model Response: ' + res.toString());
30 | }
31 |
32 | _setRecognitions(data, imageHeight, imageWidth) {
33 | if (!mounted) {
34 | return;
35 | }
36 | setState(() {
37 | _data = data;
38 | _imageHeight = imageHeight;
39 | _imageWidth = imageWidth;
40 | });
41 | }
42 |
43 | loadModel() async {
44 | return await Tflite.loadModel(
45 | model: "assets/posenet_mv1_075_float_from_checkpoints.tflite");
46 | }
47 |
48 | @override
49 | Widget build(BuildContext context) {
50 | Size screen = MediaQuery.of(context).size;
51 | return Scaffold(
52 | appBar: AppBar(
53 | title: Text('AlignAI Arm Press'),
54 | backgroundColor: Colors.transparent,
55 | elevation: 0,
56 | ),
57 | body: Stack(
58 | children: [
59 | Camera(
60 | cameras: widget.cameras,
61 | setRecognitions: _setRecognitions,
62 | ),
63 | RenderDataArmPress(
64 | data: _data == null ? [] : _data,
65 | previewH: max(_imageHeight, _imageWidth),
66 | previewW: min(_imageHeight, _imageWidth),
67 | screenH: screen.height,
68 | screenW: screen.width,
69 | ),
70 | ],
71 | ),
72 | );
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/lib/pushed_pageS.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:camera/camera.dart';
3 | import 'package:tflite/tflite.dart';
4 | import 'dart:math';
5 |
6 | import 'package:align_ai/services/camera.dart';
7 | import 'package:align_ai/services/render_data.dart';
8 | import 'package:align_ai/services/render_data_yoga.dart';
9 | import 'package:align_ai/services/render_data_arm_press.dart';
10 |
11 | class PushedPageS extends StatefulWidget {
12 | final List cameras;
13 | final String title;
14 | const PushedPageS({this.cameras, this.title});
15 | @override
16 | _PushedPageSState createState() => _PushedPageSState();
17 | }
18 |
19 | class _PushedPageSState extends State {
20 | List _data;
21 | int _imageHeight = 0;
22 | int _imageWidth = 0;
23 | int x = 1;
24 |
25 | @override
26 | void initState() {
27 | super.initState();
28 | var res = loadModel();
29 | print('Model Response: ' + res.toString());
30 | }
31 |
32 | _setRecognitions(data, imageHeight, imageWidth) {
33 | if (!mounted) {
34 | return;
35 | }
36 | setState(() {
37 | _data = data;
38 | _imageHeight = imageHeight;
39 | _imageWidth = imageWidth;
40 | });
41 | }
42 |
43 | loadModel() async {
44 | return await Tflite.loadModel(
45 | model: "assets/posenet_mv1_075_float_from_checkpoints.tflite");
46 | }
47 |
48 | @override
49 | Widget build(BuildContext context) {
50 | Size screen = MediaQuery.of(context).size;
51 | return Scaffold(
52 | appBar: AppBar(
53 | title: Text('AlignAI Squat'),
54 | backgroundColor: Colors.transparent,
55 | elevation: 0,
56 | ),
57 | body: Stack(
58 | children: [
59 | Camera(
60 | cameras: widget.cameras,
61 | setRecognitions: _setRecognitions,
62 | ),
63 | RenderData(
64 | data: _data == null ? [] : _data,
65 | previewH: max(_imageHeight, _imageWidth),
66 | previewW: min(_imageHeight, _imageWidth),
67 | screenH: screen.height,
68 | screenW: screen.width,
69 | ),
70 | ],
71 | ),
72 | );
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/lib/pushed_pageY.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:camera/camera.dart';
3 | import 'package:tflite/tflite.dart';
4 | import 'dart:math';
5 |
6 | import 'package:align_ai/services/camera.dart';
7 | import 'package:align_ai/services/render_data.dart';
8 | import 'package:align_ai/services/render_data_yoga.dart';
9 | import 'package:align_ai/services/render_data_arm_press.dart';
10 |
11 | class PushedPageY extends StatefulWidget {
12 | final List cameras;
13 | final String title;
14 | const PushedPageY({this.cameras, this.title});
15 | @override
16 | _PushedPageYState createState() => _PushedPageYState();
17 | }
18 |
19 | class _PushedPageYState extends State {
20 | List _data;
21 | int _imageHeight = 0;
22 | int _imageWidth = 0;
23 | int x = 1;
24 |
25 | @override
26 | void initState() {
27 | super.initState();
28 | var res = loadModel();
29 | print('Model Response: ' + res.toString());
30 | }
31 |
32 | _setRecognitions(data, imageHeight, imageWidth) {
33 | if (!mounted) {
34 | return;
35 | }
36 | setState(() {
37 | _data = data;
38 | _imageHeight = imageHeight;
39 | _imageWidth = imageWidth;
40 | });
41 | }
42 |
43 | loadModel() async {
44 | return await Tflite.loadModel(
45 | model: "assets/posenet_mv1_075_float_from_checkpoints.tflite");
46 | }
47 |
48 | @override
49 | Widget build(BuildContext context) {
50 | Size screen = MediaQuery.of(context).size;
51 | return Scaffold(
52 | appBar: AppBar(
53 | title: Text('AlignAI Warrior Pose'),
54 | backgroundColor: Colors.transparent,
55 | elevation: 0,
56 | ),
57 | body: Stack(
58 | children: [
59 | Camera(
60 | cameras: widget.cameras,
61 | setRecognitions: _setRecognitions,
62 | ),
63 | RenderDataYoga(
64 | data: _data == null ? [] : _data,
65 | previewH: max(_imageHeight, _imageWidth),
66 | previewW: min(_imageHeight, _imageWidth),
67 | screenH: screen.height,
68 | screenW: screen.width,
69 | ),
70 | ],
71 | ),
72 | );
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/lib/services/camera.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:camera/camera.dart';
3 | import 'package:tflite/tflite.dart';
4 | import 'dart:math' as math;
5 |
6 | typedef void Callback(List list, int h, int w);
7 |
8 | class Camera extends StatefulWidget {
9 | final List cameras;
10 | final Callback setRecognitions;
11 |
12 | Camera({this.cameras, this.setRecognitions});
13 |
14 | @override
15 | _CameraState createState() => new _CameraState();
16 | }
17 |
18 | class _CameraState extends State {
19 | CameraController controller;
20 | bool isDetecting = false;
21 |
22 | @override
23 | void initState() {
24 | super.initState();
25 |
26 | if (widget.cameras == null || widget.cameras.length < 1) {
27 | print('No camera is found');
28 | } else {
29 | controller = new CameraController(
30 | widget.cameras[1],
31 | ResolutionPreset.high,
32 | );
33 | controller.initialize().then((_) {
34 | if (!mounted) {
35 | return;
36 | }
37 | setState(() {});
38 |
39 | controller.startImageStream((CameraImage img) {
40 | if (!isDetecting) {
41 | isDetecting = true;
42 |
43 | int startTime = new DateTime.now().millisecondsSinceEpoch;
44 |
45 | Tflite.runPoseNetOnFrame(
46 | bytesList: img.planes.map((plane) {
47 | return plane.bytes;
48 | }).toList(),
49 | imageHeight: img.height,
50 | imageWidth: img.width,
51 | //numResults: 2,
52 | numResults: 1,
53 | rotation: -90,
54 | threshold: 0.1,
55 | nmsRadius: 10,
56 | ).then((recognitions) {
57 | int endTime = new DateTime.now().millisecondsSinceEpoch;
58 | print("Detection took ${endTime - startTime}");
59 |
60 | widget.setRecognitions(recognitions, img.height, img.width);
61 |
62 | isDetecting = false;
63 | });
64 | }
65 | });
66 | });
67 | }
68 | }
69 |
70 | @override
71 | void dispose() {
72 | controller?.dispose();
73 | super.dispose();
74 | }
75 |
76 | @override
77 | Widget build(BuildContext context) {
78 | if (controller == null || !controller.value.isInitialized) {
79 | return Container();
80 | }
81 |
82 | var tmp = MediaQuery.of(context).size;
83 | var screenH = math.max(tmp.height, tmp.width);
84 | var screenW = math.min(tmp.height, tmp.width);
85 | tmp = controller.value.previewSize;
86 | var previewH = math.max(tmp.height, tmp.width);
87 | var previewW = math.min(tmp.height, tmp.width);
88 | var screenRatio = screenH / screenW;
89 | var previewRatio = previewH / previewW;
90 |
91 | return OverflowBox(
92 | maxHeight:
93 | screenRatio > previewRatio ? screenH : screenW / previewW * previewH,
94 | maxWidth:
95 | screenRatio > previewRatio ? screenH / previewH * previewW : screenW,
96 | child: CameraPreview(controller),
97 | );
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/lib/services/render_data.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'dart:ui' as ui;
3 |
4 | class RenderData extends StatefulWidget {
5 | final List data;
6 | final int previewH;
7 | final int previewW;
8 | final double screenH;
9 | final double screenW;
10 |
11 | RenderData(
12 | {this.data, this.previewH, this.previewW, this.screenH, this.screenW});
13 | @override
14 | _RenderDataState createState() => _RenderDataState();
15 | }
16 |
17 | class _RenderDataState extends State {
18 | Map> inputArr;
19 |
20 | String excercise = 'squat';
21 | double upperRange = 300;
22 | double lowerRange = 500;
23 | bool midCount, isCorrectPosture;
24 | int _counter;
25 | Color correctColor;
26 | double shoulderLY;
27 | double shoulderRY;
28 | double kneeRY;
29 | double kneeLY;
30 | bool squatUp;
31 | String whatToDo = 'Finding Posture';
32 |
33 | var leftEyePos = Vector(0, 0);
34 | var rightEyePos = Vector(0, 0);
35 | var leftShoulderPos = Vector(0, 0);
36 | var rightShoulderPos = Vector(0, 0);
37 | var leftHipPos = Vector(0, 0);
38 | var rightHipPos = Vector(0, 0);
39 | var leftElbowPos = Vector(0, 0);
40 | var rightElbowPos = Vector(0, 0);
41 | var leftWristPos = Vector(0, 0);
42 | var rightWristPos = Vector(0, 0);
43 | var leftKneePos = Vector(0, 0);
44 | var rightKneePos = Vector(0, 0);
45 | var leftAnklePos = Vector(0, 0);
46 | var rightAnklePos = Vector(0, 0);
47 |
48 | @override
49 | void initState() {
50 | inputArr = new Map();
51 | midCount = false;
52 | isCorrectPosture = false;
53 | _counter = 0;
54 | correctColor = Colors.red;
55 | shoulderLY = 0;
56 | shoulderRY = 0;
57 | kneeRY = 0;
58 | kneeLY = 0;
59 | squatUp = true;
60 | super.initState();
61 | }
62 |
63 | bool _postureAccordingToExercise(Map> poses) {
64 | setState(() {
65 | shoulderLY = poses['leftShoulder'][1];
66 | shoulderRY = poses['rightShoulder'][1];
67 | kneeLY = poses['leftKnee'][1];
68 | kneeRY = poses['rightKnee'][1];
69 | });
70 | if (excercise == 'squat') {
71 | if (squatUp) {
72 | return poses['leftShoulder'][1] < 320 &&
73 | poses['leftShoulder'][1] > 280 &&
74 | poses['rightShoulder'][1] < 320 &&
75 | poses['rightShoulder'][1] > 280 &&
76 | poses['rightKnee'][1] > 570 &&
77 | poses['leftKnee'][1] > 570;
78 | } else {
79 | return poses['leftShoulder'][1] > 475 &&
80 | poses['rightShoulder'][1] > 475;
81 | }
82 | }
83 | }
84 |
85 | _checkCorrectPosture(Map> poses) {
86 | if (_postureAccordingToExercise(poses)) {
87 | if (!isCorrectPosture) {
88 | setState(() {
89 | isCorrectPosture = true;
90 | correctColor = Colors.green;
91 | });
92 | }
93 | } else {
94 | if (isCorrectPosture) {
95 | setState(() {
96 | isCorrectPosture = false;
97 | correctColor = Colors.red;
98 | });
99 | }
100 | }
101 | }
102 |
103 | Future _countingLogic(Map> poses) async {
104 | if (poses != null) {
105 | _checkCorrectPosture(poses);
106 |
107 | if (isCorrectPosture && squatUp && midCount == false) {
108 | //in correct initial posture
109 | setState(() {
110 | whatToDo = 'Squat Down';
111 | //correctColor = Colors.green;
112 | });
113 | squatUp = !squatUp;
114 | isCorrectPosture = false;
115 | }
116 |
117 | //lowered all the way
118 | if (isCorrectPosture && !squatUp && midCount == false) {
119 | midCount = true;
120 | isCorrectPosture = false;
121 | squatUp = !squatUp;
122 | setState(() {
123 | whatToDo = 'Go Up';
124 | //correctColor = Colors.green;
125 | });
126 | }
127 |
128 | //back up
129 | if (midCount &&
130 | poses['leftShoulder'][1] < 320 &&
131 | poses['leftShoulder'][1] > 280 &&
132 | poses['rightShoulder'][1] < 320 &&
133 | poses['rightShoulder'][1] > 280) {
134 | incrementCounter();
135 | midCount = false;
136 | squatUp = !squatUp;
137 | setState(() {
138 | //whatToDo = 'Go Up';
139 | });
140 | }
141 | }
142 | }
143 |
144 | void incrementCounter() {
145 | setState(() {
146 | _counter++;
147 | });
148 | }
149 |
150 | @override
151 | Widget build(BuildContext context) {
152 | void _getKeyPoints(k, x, y) {
153 | if (k["part"] == 'leftEye') {
154 | leftEyePos.x = x - 230;
155 | leftEyePos.y = y - 45;
156 | }
157 | if (k["part"] == 'rightEye') {
158 | rightEyePos.x = x - 230;
159 | rightEyePos.y = y - 45;
160 | }
161 | if (k["part"] == 'leftShoulder') {
162 | leftShoulderPos.x = x - 230;
163 | leftShoulderPos.y = y - 45;
164 | }
165 | if (k["part"] == 'rightShoulder') {
166 | rightShoulderPos.x = x - 230;
167 | rightShoulderPos.y = y - 45;
168 | }
169 | if (k["part"] == 'leftElbow') {
170 | leftElbowPos.x = x - 230;
171 | leftElbowPos.y = y - 45;
172 | }
173 | if (k["part"] == 'rightElbow') {
174 | rightElbowPos.x = x - 230;
175 | rightElbowPos.y = y - 45;
176 | }
177 | if (k["part"] == 'leftWrist') {
178 | leftWristPos.x = x - 230;
179 | leftWristPos.y = y - 45;
180 | }
181 | if (k["part"] == 'rightWrist') {
182 | rightWristPos.x = x - 230;
183 | rightWristPos.y = y - 45;
184 | }
185 | if (k["part"] == 'leftHip') {
186 | leftHipPos.x = x - 230;
187 | leftHipPos.y = y - 45;
188 | }
189 | if (k["part"] == 'rightHip') {
190 | rightHipPos.x = x - 230;
191 | rightHipPos.y = y - 45;
192 | }
193 | if (k["part"] == 'leftKnee') {
194 | leftKneePos.x = x - 230;
195 | leftKneePos.y = y - 45;
196 | }
197 | if (k["part"] == 'rightKnee') {
198 | rightKneePos.x = x - 230;
199 | rightKneePos.y = y - 45;
200 | }
201 | if (k["part"] == 'leftAnkle') {
202 | leftAnklePos.x = x - 230;
203 | leftAnklePos.y = y - 45;
204 | }
205 | if (k["part"] == 'rightAnkle') {
206 | rightAnklePos.x = x - 230;
207 | rightAnklePos.y = y - 45;
208 | }
209 | }
210 |
211 | List _renderKeypoints() {
212 | var lists = [];
213 | widget.data.forEach((re) {
214 | var list = re["keypoints"].values.map((k) {
215 | var _x = k["x"];
216 | var _y = k["y"];
217 | var scaleW, scaleH, x, y;
218 |
219 | if (widget.screenH / widget.screenW >
220 | widget.previewH / widget.previewW) {
221 | scaleW = widget.screenH / widget.previewH * widget.previewW;
222 | scaleH = widget.screenH;
223 | var difW = (scaleW - widget.screenW) / scaleW;
224 | x = (_x - difW / 2) * scaleW;
225 | y = _y * scaleH;
226 | } else {
227 | scaleH = widget.screenW / widget.previewW * widget.previewH;
228 | scaleW = widget.screenW;
229 | var difH = (scaleH - widget.screenH) / scaleH;
230 | x = _x * scaleW;
231 | y = (_y - difH / 2) * scaleH;
232 | }
233 | inputArr[k['part']] = [x, y];
234 | //Mirroring
235 | if (x > 320) {
236 | var temp = x - 320;
237 | x = 320 - temp;
238 | } else {
239 | var temp = 320 - x;
240 | x = 320 + temp;
241 | }
242 |
243 | _getKeyPoints(k, x, y);
244 |
245 | if (k["part"] == 'leftEye') {
246 | leftEyePos.x = x - 230;
247 | leftEyePos.y = y - 45;
248 | }
249 | if (k["part"] == 'rightEye') {
250 | rightEyePos.x = x - 230;
251 | rightEyePos.y = y - 45;
252 | }
253 | return Positioned(
254 | left: x - 230,
255 | top: y - 50,
256 | width: 100,
257 | height: 15,
258 | child: Container(
259 | // child: Text(
260 | // "● ${k["part"]}",
261 | // style: TextStyle(
262 | // color: Color.fromRGBO(37, 213, 253, 1.0),
263 | // fontSize: 12.0,
264 | // ),
265 | // ),
266 | ),
267 | );
268 | }).toList();
269 |
270 | _countingLogic(inputArr);
271 | inputArr.clear();
272 |
273 | lists..addAll(list);
274 | });
275 | //lists.clear();
276 |
277 | return lists;
278 | }
279 |
280 | return Stack(
281 | children: [
282 | Stack(
283 | children: [
284 | CustomPaint(
285 | painter:
286 | MyPainter(left: leftShoulderPos, right: rightShoulderPos),
287 | ),
288 | CustomPaint(
289 | painter: MyPainter(left: leftElbowPos, right: leftShoulderPos),
290 | ),
291 | CustomPaint(
292 | painter: MyPainter(left: leftWristPos, right: leftElbowPos),
293 | ),
294 | CustomPaint(
295 | painter: MyPainter(left: rightElbowPos, right: rightShoulderPos),
296 | ),
297 | CustomPaint(
298 | painter: MyPainter(left: rightWristPos, right: rightElbowPos),
299 | ),
300 | CustomPaint(
301 | painter: MyPainter(left: leftShoulderPos, right: leftHipPos),
302 | ),
303 | CustomPaint(
304 | painter: MyPainter(left: leftHipPos, right: leftKneePos),
305 | ),
306 | CustomPaint(
307 | painter: MyPainter(left: leftKneePos, right: leftAnklePos),
308 | ),
309 | CustomPaint(
310 | painter: MyPainter(left: rightShoulderPos, right: rightHipPos),
311 | ),
312 | CustomPaint(
313 | painter: MyPainter(left: rightHipPos, right: rightKneePos),
314 | ),
315 | CustomPaint(
316 | painter: MyPainter(left: rightKneePos, right: rightAnklePos),
317 | ),
318 | CustomPaint(
319 | painter: MyPainter(left: leftHipPos, right: rightHipPos),
320 | ),
321 | ],
322 | ),
323 | Stack(children: _renderKeypoints()),
324 | Align(
325 | alignment: Alignment.bottomCenter,
326 | child: Container(
327 | height: 50,
328 | width: widget.screenW,
329 | decoration: BoxDecoration(
330 | color: correctColor,
331 | borderRadius: BorderRadius.only(
332 | topLeft: Radius.circular(25.0),
333 | topRight: Radius.circular(25)),
334 | ),
335 | child: Column(
336 | children: [
337 | Text(
338 | '$whatToDo\nArm Presses: ${_counter.toString()}',
339 | style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
340 | ),
341 | ],
342 | ),
343 | ),
344 | ),
345 | ],
346 | );
347 | }
348 | }
349 |
350 | class Vector {
351 | double x, y;
352 | Vector(this.x, this.y);
353 | }
354 |
355 | class MyPainter extends CustomPainter {
356 | Vector left;
357 | Vector right;
358 | MyPainter({this.left, this.right});
359 | @override
360 | void paint(Canvas canvas, Size size) {
361 | final p1 = Offset(left.x, left.y);
362 | final p2 = Offset(right.x, right.y);
363 | final paint = Paint()
364 | ..color = Colors.blue
365 | ..strokeWidth = 4;
366 | canvas.drawLine(p1, p2, paint);
367 | }
368 |
369 | @override
370 | bool shouldRepaint(CustomPainter old) {
371 | return false;
372 | }
373 | }
374 |
375 | // class MyPainter extends CustomPainter {
376 | // Vector leftShoulderPos;
377 | // Vector rightShoulderPos;
378 | // Vector leftHipPos;
379 | // Vector rightHipPos;
380 | // Vector leftElbowPos;
381 | // Vector rightElbowPos;
382 | // Vector leftWristPos;
383 | // Vector rightWristPos;
384 | // Vector leftKneePos;
385 | // Vector rightKneePos;
386 | // Vector leftAnklePos;
387 | // Vector rightAnklePos;
388 | // MyPainter(
389 | // {this.leftShoulderPos,
390 | // this.leftAnklePos,
391 | // this.leftElbowPos,
392 | // this.leftHipPos,
393 | // this.leftKneePos,
394 | // this.leftWristPos,
395 | // this.rightAnklePos,
396 | // this.rightElbowPos,
397 | // this.rightHipPos,
398 | // this.rightKneePos,
399 | // this.rightShoulderPos,
400 | // this.rightWristPos});
401 | // @override
402 | // void paint(Canvas canvas, Size size) {
403 | // final pointMode = ui.PointMode.polygon;
404 | // final points = [
405 | // Offset(leftWristPos.x, leftWristPos.y),
406 | // Offset(leftElbowPos.x, leftElbowPos.y),
407 | // Offset(leftShoulderPos.x, leftShoulderPos.y),
408 | // Offset(leftHipPos.x, leftHipPos.y),
409 | // Offset(leftKneePos.x, leftKneePos.y),
410 | // Offset(leftAnklePos.x, leftAnklePos.y),
411 | // Offset(rightHipPos.x, rightHipPos.y),
412 | // Offset(rightKneePos.x, rightKneePos.y),
413 | // Offset(rightAnklePos.x, rightAnklePos.y),
414 | // Offset(rightShoulderPos.x, rightShoulderPos.y),
415 | // Offset(rightElbowPos.x, rightElbowPos.y),
416 | // Offset(rightWristPos.x, rightWristPos.y),
417 | // ];
418 | // final paint = Paint()
419 | // ..color = Colors.black
420 | // ..strokeWidth = 4
421 | // ..strokeCap = StrokeCap.round;
422 | // canvas.drawPoints(pointMode, points, paint);
423 | // }
424 |
425 | // @override
426 | // bool shouldRepaint(CustomPainter old) {
427 | // return false;
428 | // }
429 | // }
430 |
431 | // CustomPaint(
432 | // painter: MyPainter(
433 | // leftShoulderPos: leftShoulderPos,
434 | // leftElbowPos: leftElbowPos,
435 | // leftWristPos: leftWristPos,
436 | // leftHipPos: leftHipPos,
437 | // leftKneePos: leftKneePos,
438 | // leftAnklePos: leftAnklePos,
439 | // rightHipPos: rightHipPos,
440 | // rightKneePos: rightKneePos,
441 | // rightAnklePos: rightAnklePos,
442 | // rightShoulderPos: rightShoulderPos,
443 | // rightElbowPos: rightElbowPos,
444 | // rightWristPos: rightWristPos),
445 | // ),
446 |
--------------------------------------------------------------------------------
/lib/services/render_data_arm_press.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class RenderDataArmPress extends StatefulWidget {
4 | final List data;
5 | final int previewH;
6 | final int previewW;
7 | final double screenH;
8 | final double screenW;
9 |
10 | RenderDataArmPress(
11 | {this.data, this.previewH, this.previewW, this.screenH, this.screenW});
12 | @override
13 | _RenderDataArmPressState createState() => _RenderDataArmPressState();
14 | }
15 |
16 | class _RenderDataArmPressState extends State {
17 | Map> inputArr;
18 |
19 | String excercise = 'arm_press';
20 | double upperRange = 300;
21 | double lowerRange = 500;
22 | bool midCount, isCorrectPosture;
23 | int _counter;
24 | Color correctColor;
25 | double shoulderLY;
26 | double shoulderRY;
27 |
28 | double wristLX, wristLY, wristRX, wristRY, elbowLX, elbowRX;
29 | double kneeRY;
30 | double kneeLY;
31 | bool squatUp;
32 | String whatToDo = 'Finding Posture';
33 |
34 | var leftEyePos = Vector(0, 0);
35 | var rightEyePos = Vector(0, 0);
36 | var leftShoulderPos = Vector(0, 0);
37 | var rightShoulderPos = Vector(0, 0);
38 | var leftHipPos = Vector(0, 0);
39 | var rightHipPos = Vector(0, 0);
40 | var leftElbowPos = Vector(0, 0);
41 | var rightElbowPos = Vector(0, 0);
42 | var leftWristPos = Vector(0, 0);
43 | var rightWristPos = Vector(0, 0);
44 | var leftKneePos = Vector(0, 0);
45 | var rightKneePos = Vector(0, 0);
46 | var leftAnklePos = Vector(0, 0);
47 | var rightAnklePos = Vector(0, 0);
48 |
49 | @override
50 | void initState() {
51 | inputArr = new Map();
52 | midCount = false;
53 | isCorrectPosture = false;
54 | _counter = 0;
55 | correctColor = Colors.red;
56 | shoulderLY = 0;
57 | shoulderRY = 0;
58 | kneeRY = 0;
59 | kneeLY = 0;
60 | squatUp = true;
61 | super.initState();
62 | }
63 |
64 | bool _postureAccordingToExercise(Map> poses) {
65 | setState(() {
66 | wristLX = poses['leftWrist'][0];
67 | wristLY = poses['leftWrist'][1];
68 | wristRX = poses['rightWrist'][0];
69 | wristRY = poses['rightWrist'][1];
70 | elbowLX = poses['leftElbow'][0];
71 | elbowRX = poses['rightElbow'][0];
72 |
73 | shoulderLY = poses['leftShoulder'][1];
74 | shoulderRY = poses['rightShoulder'][1];
75 | kneeLY = poses['leftKnee'][1];
76 | kneeRY = poses['rightKnee'][1];
77 | });
78 | if (excercise == 'arm_press') {
79 | if (squatUp) {
80 | return wristLX > 280 &&
81 | elbowLX > 280 &&
82 | wristRX < 95 &&
83 | elbowRX < 95 &&
84 | wristLY < 240 &&
85 | wristLY > 200 &&
86 | wristRY < 240 &&
87 | wristRY > 200;
88 | } else {
89 | return wristLY < 125 && wristRY < 125;
90 | }
91 | }
92 | }
93 |
94 | _checkCorrectPosture(Map> poses) {
95 | if (_postureAccordingToExercise(poses)) {
96 | if (!isCorrectPosture) {
97 | setState(() {
98 | isCorrectPosture = true;
99 | correctColor = Colors.green;
100 | });
101 | }
102 | } else {
103 | if (isCorrectPosture) {
104 | setState(() {
105 | isCorrectPosture = false;
106 | correctColor = Colors.red;
107 | });
108 | }
109 | }
110 | }
111 |
112 | Future _countingLogic(Map> poses) async {
113 | if (poses != null) {
114 | _checkCorrectPosture(poses);
115 |
116 | if (isCorrectPosture && squatUp && midCount == false) {
117 | //in correct initial posture
118 | setState(() {
119 | whatToDo = 'Lift';
120 | //correctColor = Colors.green;
121 | });
122 | squatUp = !squatUp;
123 | isCorrectPosture = false;
124 | }
125 |
126 | //lowered all the way
127 | if (isCorrectPosture && !squatUp && midCount == false) {
128 | midCount = true;
129 | isCorrectPosture = false;
130 | squatUp = !squatUp;
131 | setState(() {
132 | whatToDo = 'Drop';
133 | //correctColor = Colors.green;
134 | });
135 | }
136 |
137 | //back up
138 | if (midCount && isCorrectPosture) {
139 | incrementCounter();
140 | midCount = false;
141 | squatUp = !squatUp;
142 | setState(() {
143 | whatToDo = 'Lift';
144 | });
145 | }
146 | }
147 | }
148 |
149 | void incrementCounter() {
150 | setState(() {
151 | _counter++;
152 | });
153 | }
154 |
155 | @override
156 | Widget build(BuildContext context) {
157 | void _getKeyPoints(k, x, y) {
158 | if (k["part"] == 'leftEye') {
159 | leftEyePos.x = x - 230;
160 | leftEyePos.y = y - 45;
161 | }
162 | if (k["part"] == 'rightEye') {
163 | rightEyePos.x = x - 230;
164 | rightEyePos.y = y - 45;
165 | }
166 | if (k["part"] == 'leftShoulder') {
167 | leftShoulderPos.x = x - 230;
168 | leftShoulderPos.y = y - 45;
169 | }
170 | if (k["part"] == 'rightShoulder') {
171 | rightShoulderPos.x = x - 230;
172 | rightShoulderPos.y = y - 45;
173 | }
174 | if (k["part"] == 'leftElbow') {
175 | leftElbowPos.x = x - 230;
176 | leftElbowPos.y = y - 45;
177 | }
178 | if (k["part"] == 'rightElbow') {
179 | rightElbowPos.x = x - 230;
180 | rightElbowPos.y = y - 45;
181 | }
182 | if (k["part"] == 'leftWrist') {
183 | leftWristPos.x = x - 230;
184 | leftWristPos.y = y - 45;
185 | }
186 | if (k["part"] == 'rightWrist') {
187 | rightWristPos.x = x - 230;
188 | rightWristPos.y = y - 45;
189 | }
190 | if (k["part"] == 'leftHip') {
191 | leftHipPos.x = x - 230;
192 | leftHipPos.y = y - 45;
193 | }
194 | if (k["part"] == 'rightHip') {
195 | rightHipPos.x = x - 230;
196 | rightHipPos.y = y - 45;
197 | }
198 | if (k["part"] == 'leftKnee') {
199 | leftKneePos.x = x - 230;
200 | leftKneePos.y = y - 45;
201 | }
202 | if (k["part"] == 'rightKnee') {
203 | rightKneePos.x = x - 230;
204 | rightKneePos.y = y - 45;
205 | }
206 | if (k["part"] == 'leftAnkle') {
207 | leftAnklePos.x = x - 230;
208 | leftAnklePos.y = y - 45;
209 | }
210 | if (k["part"] == 'rightAnkle') {
211 | rightAnklePos.x = x - 230;
212 | rightAnklePos.y = y - 45;
213 | }
214 | }
215 |
216 | List _renderKeypoints() {
217 | var lists = [];
218 | widget.data.forEach((re) {
219 | var list = re["keypoints"].values.map((k) {
220 | var _x = k["x"];
221 | var _y = k["y"];
222 | var scaleW, scaleH, x, y;
223 |
224 | if (widget.screenH / widget.screenW >
225 | widget.previewH / widget.previewW) {
226 | scaleW = widget.screenH / widget.previewH * widget.previewW;
227 | scaleH = widget.screenH;
228 | var difW = (scaleW - widget.screenW) / scaleW;
229 | x = (_x - difW / 2) * scaleW;
230 | y = _y * scaleH;
231 | } else {
232 | scaleH = widget.screenW / widget.previewW * widget.previewH;
233 | scaleW = widget.screenW;
234 | var difH = (scaleH - widget.screenH) / scaleH;
235 | x = _x * scaleW;
236 | y = (_y - difH / 2) * scaleH;
237 | }
238 | inputArr[k['part']] = [x, y];
239 | //Mirroring
240 | if (x > 320) {
241 | var temp = x - 320;
242 | x = 320 - temp;
243 | } else {
244 | var temp = 320 - x;
245 | x = 320 + temp;
246 | }
247 |
248 | _getKeyPoints(k, x, y);
249 |
250 | if (k["part"] == 'leftEye') {
251 | leftEyePos.x = x - 230;
252 | leftEyePos.y = y - 45;
253 | }
254 | if (k["part"] == 'rightEye') {
255 | rightEyePos.x = x - 230;
256 | rightEyePos.y = y - 45;
257 | }
258 | return Positioned(
259 | left: x - 230,
260 | top: y - 50,
261 | width: 100,
262 | height: 15,
263 | child: Container(
264 | // child: Text(
265 | // "● ${k["part"]}",
266 | // style: TextStyle(
267 | // color: Color.fromRGBO(37, 213, 253, 1.0),
268 | // fontSize: 12.0,
269 | // ),
270 | // ),
271 | ),
272 | );
273 | }).toList();
274 |
275 | _countingLogic(inputArr);
276 | inputArr.clear();
277 |
278 | lists..addAll(list);
279 | });
280 | //lists.clear();
281 |
282 | return lists;
283 | }
284 |
285 | return Stack(
286 | children: [
287 | Stack(
288 | children: [
289 | CustomPaint(
290 | painter:
291 | MyPainter(left: leftShoulderPos, right: rightShoulderPos),
292 | ),
293 | CustomPaint(
294 | painter: MyPainter(left: leftElbowPos, right: leftShoulderPos),
295 | ),
296 | CustomPaint(
297 | painter: MyPainter(left: leftWristPos, right: leftElbowPos),
298 | ),
299 | CustomPaint(
300 | painter: MyPainter(left: rightElbowPos, right: rightShoulderPos),
301 | ),
302 | CustomPaint(
303 | painter: MyPainter(left: rightWristPos, right: rightElbowPos),
304 | ),
305 | CustomPaint(
306 | painter: MyPainter(left: leftShoulderPos, right: leftHipPos),
307 | ),
308 | CustomPaint(
309 | painter: MyPainter(left: leftHipPos, right: leftKneePos),
310 | ),
311 | CustomPaint(
312 | painter: MyPainter(left: leftKneePos, right: leftAnklePos),
313 | ),
314 | CustomPaint(
315 | painter: MyPainter(left: rightShoulderPos, right: rightHipPos),
316 | ),
317 | CustomPaint(
318 | painter: MyPainter(left: rightHipPos, right: rightKneePos),
319 | ),
320 | CustomPaint(
321 | painter: MyPainter(left: rightKneePos, right: rightAnklePos),
322 | ),
323 | CustomPaint(
324 | painter: MyPainter(left: leftHipPos, right: rightHipPos),
325 | ),
326 | ],
327 | ),
328 | Stack(children: _renderKeypoints()),
329 | Align(
330 | alignment: Alignment.bottomCenter,
331 | child: Container(
332 | height: 50,
333 | width: widget.screenW,
334 | decoration: BoxDecoration(
335 | color: correctColor,
336 | borderRadius: BorderRadius.only(
337 | topLeft: Radius.circular(25.0),
338 | topRight: Radius.circular(25)),
339 | ),
340 | child: Column(
341 | children: [
342 | Text(
343 | '$whatToDo\nArm Presses: ${_counter.toString()}',
344 | style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
345 | ),
346 | ],
347 | ),
348 | ),
349 | ),
350 | ],
351 | );
352 | }
353 | }
354 |
355 | class Vector {
356 | double x, y;
357 | Vector(this.x, this.y);
358 | }
359 |
360 | class MyPainter extends CustomPainter {
361 | Vector left;
362 | Vector right;
363 | MyPainter({this.left, this.right});
364 | @override
365 | void paint(Canvas canvas, Size size) {
366 | final p1 = Offset(left.x, left.y);
367 | final p2 = Offset(right.x, right.y);
368 | final paint = Paint()
369 | ..color = Colors.blue
370 | ..strokeWidth = 4;
371 | canvas.drawLine(p1, p2, paint);
372 | }
373 |
374 | @override
375 | bool shouldRepaint(CustomPainter old) {
376 | return false;
377 | }
378 | }
379 |
--------------------------------------------------------------------------------
/lib/services/render_data_yoga.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class RenderDataYoga extends StatefulWidget {
4 | final List data;
5 | final int previewH;
6 | final int previewW;
7 | final double screenH;
8 | final double screenW;
9 |
10 | RenderDataYoga(
11 | {this.data, this.previewH, this.previewW, this.screenH, this.screenW});
12 | @override
13 | _RenderDataYogaState createState() => _RenderDataYogaState();
14 | }
15 |
16 | class _RenderDataYogaState extends State {
17 | Map> inputArr;
18 |
19 | String excercise = 'warrior';
20 | Color correctColor;
21 | Color armColor, shoulderColor, legColor;
22 | String memo = 'Warrior position not aligned.';
23 |
24 | double leftShoulderY,
25 | rightShoulderY,
26 | leftWristX,
27 | leftWristY,
28 | rightWristX,
29 | rightWristY,
30 | leftAnkleX,
31 | rightAnkleX,
32 | leftKneeY,
33 | leftHipY;
34 |
35 | bool wristAlignment, shoulderAlignment, ankleAlignment, kneeAndHipAlignment;
36 |
37 | var leftEyePos = Vector(0, 0);
38 | var rightEyePos = Vector(0, 0);
39 | var leftShoulderPos = Vector(0, 0);
40 | var rightShoulderPos = Vector(0, 0);
41 | var leftHipPos = Vector(0, 0);
42 | var rightHipPos = Vector(0, 0);
43 | var leftElbowPos = Vector(0, 0);
44 | var rightElbowPos = Vector(0, 0);
45 | var leftWristPos = Vector(0, 0);
46 | var rightWristPos = Vector(0, 0);
47 | var leftKneePos = Vector(0, 0);
48 | var rightKneePos = Vector(0, 0);
49 | var leftAnklePos = Vector(0, 0);
50 | var rightAnklePos = Vector(0, 0);
51 |
52 | @override
53 | void initState() {
54 | inputArr = new Map();
55 | correctColor = Colors.red;
56 | wristAlignment = false;
57 | shoulderAlignment = false;
58 | ankleAlignment = false;
59 | kneeAndHipAlignment = false;
60 | armColor = Colors.red;
61 | shoulderColor = Colors.red;
62 | legColor = Colors.red;
63 | super.initState();
64 | }
65 |
66 | void _postureAccordingToExercise(Map> poses) {
67 | setState(() {
68 | leftShoulderY = poses['leftShoulder'][1];
69 | rightShoulderY = poses['rightShoulder'][1];
70 | leftWristX = poses['leftWrist'][0];
71 | leftWristY = poses['leftWrist'][1];
72 | rightWristX = poses['rightWrist'][0];
73 | rightWristY = poses['leftWrist'][1];
74 | leftAnkleX = poses['leftAnkle'][0];
75 | rightAnkleX = poses['rightAnkle'][0];
76 | leftKneeY = poses['leftKnee'][1];
77 | leftHipY = poses['leftHip'][1];
78 | });
79 |
80 | if (leftWristY > 120 &&
81 | rightWristY > 120 &&
82 | leftWristX < 255 &&
83 | leftWristX > 200 &&
84 | rightWristX < 255 &&
85 | rightWristX > 160) {
86 | wristAlignment = true;
87 | setState(() {
88 | armColor = Colors.green;
89 | shoulderColor = Colors.green;
90 | });
91 | } else {
92 | wristAlignment = false;
93 | setState(() {
94 | armColor = Colors.red;
95 | shoulderColor = Colors.red;
96 | });
97 | }
98 | if (leftAnkleX > 360 && rightAnkleX < 60) {
99 | ankleAlignment = true;
100 | setState(() {
101 | legColor = Colors.green;
102 | });
103 | } else {
104 | ankleAlignment = false;
105 | setState(() {
106 | legColor = Colors.red;
107 | });
108 | }
109 | if (leftKneeY > 580 && leftHipY > 505) {
110 | kneeAndHipAlignment = true;
111 | setState(() {
112 | //legColor = Colors.green;
113 | });
114 | } else {
115 | kneeAndHipAlignment = false;
116 | setState(() {
117 | legColor = Colors.red;
118 | });
119 | }
120 | if (wristAlignment && ankleAlignment && kneeAndHipAlignment) {
121 | setState(() {
122 | correctColor = Colors.green;
123 | memo = 'Warrior position aligned!';
124 | });
125 | } else {
126 | setState(() {
127 | correctColor = Colors.red;
128 | memo = 'Warrior position not aligned.';
129 | });
130 | }
131 | }
132 |
133 | @override
134 | Widget build(BuildContext context) {
135 | void _getKeyPoints(k, x, y) {
136 | if (k["part"] == 'leftEye') {
137 | leftEyePos.x = x - 230;
138 | leftEyePos.y = y - 45;
139 | }
140 | if (k["part"] == 'rightEye') {
141 | rightEyePos.x = x - 230;
142 | rightEyePos.y = y - 45;
143 | }
144 | if (k["part"] == 'leftShoulder') {
145 | leftShoulderPos.x = x - 230;
146 | leftShoulderPos.y = y - 45;
147 | }
148 | if (k["part"] == 'rightShoulder') {
149 | rightShoulderPos.x = x - 230;
150 | rightShoulderPos.y = y - 45;
151 | }
152 | if (k["part"] == 'leftElbow') {
153 | leftElbowPos.x = x - 230;
154 | leftElbowPos.y = y - 45;
155 | }
156 | if (k["part"] == 'rightElbow') {
157 | rightElbowPos.x = x - 230;
158 | rightElbowPos.y = y - 45;
159 | }
160 | if (k["part"] == 'leftWrist') {
161 | leftWristPos.x = x - 230;
162 | leftWristPos.y = y - 45;
163 | }
164 | if (k["part"] == 'rightWrist') {
165 | rightWristPos.x = x - 230;
166 | rightWristPos.y = y - 45;
167 | }
168 | if (k["part"] == 'leftHip') {
169 | leftHipPos.x = x - 230;
170 | leftHipPos.y = y - 45;
171 | }
172 | if (k["part"] == 'rightHip') {
173 | rightHipPos.x = x - 230;
174 | rightHipPos.y = y - 45;
175 | }
176 | if (k["part"] == 'leftKnee') {
177 | leftKneePos.x = x - 230;
178 | leftKneePos.y = y - 45;
179 | }
180 | if (k["part"] == 'rightKnee') {
181 | rightKneePos.x = x - 230;
182 | rightKneePos.y = y - 45;
183 | }
184 | if (k["part"] == 'leftAnkle') {
185 | leftAnklePos.x = x - 230;
186 | leftAnklePos.y = y - 45;
187 | }
188 | if (k["part"] == 'rightAnkle') {
189 | rightAnklePos.x = x - 230;
190 | rightAnklePos.y = y - 45;
191 | }
192 | }
193 |
194 | List _renderKeypoints() {
195 | var lists = [];
196 | widget.data.forEach((re) {
197 | var list = re["keypoints"].values.map((k) {
198 | var _x = k["x"];
199 | var _y = k["y"];
200 | var scaleW, scaleH, x, y;
201 |
202 | if (widget.screenH / widget.screenW >
203 | widget.previewH / widget.previewW) {
204 | scaleW = widget.screenH / widget.previewH * widget.previewW;
205 | scaleH = widget.screenH;
206 | var difW = (scaleW - widget.screenW) / scaleW;
207 | x = (_x - difW / 2) * scaleW;
208 | y = _y * scaleH;
209 | } else {
210 | scaleH = widget.screenW / widget.previewW * widget.previewH;
211 | scaleW = widget.screenW;
212 | var difH = (scaleH - widget.screenH) / scaleH;
213 | x = _x * scaleW;
214 | y = (_y - difH / 2) * scaleH;
215 | }
216 | inputArr[k['part']] = [x, y];
217 | //Mirroring
218 | if (x > 320) {
219 | var temp = x - 320;
220 | x = 320 - temp;
221 | } else {
222 | var temp = 320 - x;
223 | x = 320 + temp;
224 | }
225 |
226 | _getKeyPoints(k, x, y);
227 |
228 | if (k["part"] == 'leftEye') {
229 | leftEyePos.x = x - 230;
230 | leftEyePos.y = y - 45;
231 | }
232 | if (k["part"] == 'rightEye') {
233 | rightEyePos.x = x - 230;
234 | rightEyePos.y = y - 45;
235 | }
236 | return Positioned(
237 | left: x - 230,
238 | top: y - 50,
239 | width: 100,
240 | height: 15,
241 | child: Container(
242 | // child: Text(
243 | // "● ${k["part"]}",
244 | // style: TextStyle(
245 | // color: Color.fromRGBO(37, 213, 253, 1.0),
246 | // fontSize: 12.0,
247 | // ),
248 | // ),
249 | ),
250 | );
251 | }).toList();
252 |
253 | _postureAccordingToExercise(inputArr);
254 | inputArr.clear();
255 |
256 | lists..addAll(list);
257 | });
258 | //lists.clear();
259 |
260 | return lists;
261 | }
262 |
263 | return Stack(
264 | children: [
265 | Stack(
266 | children: [
267 | CustomPaint(
268 | painter: MyPainter(
269 | left: leftShoulderPos,
270 | right: rightShoulderPos,
271 | color: shoulderColor),
272 | ),
273 | CustomPaint(
274 | painter: MyPainter(
275 | left: leftElbowPos, right: leftShoulderPos, color: armColor),
276 | ),
277 | CustomPaint(
278 | painter: MyPainter(
279 | left: leftWristPos, right: leftElbowPos, color: armColor),
280 | ),
281 | CustomPaint(
282 | painter: MyPainter(
283 | left: rightElbowPos,
284 | right: rightShoulderPos,
285 | color: armColor),
286 | ),
287 | CustomPaint(
288 | painter: MyPainter(
289 | left: rightWristPos, right: rightElbowPos, color: armColor),
290 | ),
291 | CustomPaint(
292 | painter: MyPainter(
293 | left: leftShoulderPos,
294 | right: leftHipPos,
295 | color: shoulderColor),
296 | ),
297 | CustomPaint(
298 | painter: MyPainter(
299 | left: leftHipPos, right: leftKneePos, color: legColor),
300 | ),
301 | CustomPaint(
302 | painter: MyPainter(
303 | left: leftKneePos, right: leftAnklePos, color: legColor),
304 | ),
305 | CustomPaint(
306 | painter: MyPainter(
307 | left: rightShoulderPos,
308 | right: rightHipPos,
309 | color: shoulderColor),
310 | ),
311 | CustomPaint(
312 | painter: MyPainter(
313 | left: rightHipPos, right: rightKneePos, color: legColor),
314 | ),
315 | CustomPaint(
316 | painter: MyPainter(
317 | left: rightKneePos, right: rightAnklePos, color: legColor),
318 | ),
319 | CustomPaint(
320 | painter: MyPainter(
321 | left: leftHipPos, right: rightHipPos, color: shoulderColor),
322 | ),
323 | ],
324 | ),
325 | Stack(children: _renderKeypoints()),
326 | Align(
327 | alignment: Alignment.bottomCenter,
328 | child: Container(
329 | height: 50,
330 | width: widget.screenW,
331 | decoration: BoxDecoration(
332 | color: correctColor,
333 | borderRadius: BorderRadius.only(
334 | topLeft: Radius.circular(25.0),
335 | topRight: Radius.circular(25)),
336 | ),
337 | child: Column(
338 | children: [
339 | Text(
340 | //'$whatToDo\nArm Presses: ${_counter.toString()}',
341 | '$memo',
342 | style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
343 | ),
344 | ],
345 | ),
346 | ),
347 | ),
348 | ],
349 | );
350 | }
351 | }
352 |
353 | class Vector {
354 | double x, y;
355 | Vector(this.x, this.y);
356 | }
357 |
358 | class MyPainter extends CustomPainter {
359 | Vector left;
360 | Vector right;
361 | Color color;
362 | MyPainter({this.left, this.right, this.color});
363 | @override
364 | void paint(Canvas canvas, Size size) {
365 | final p1 = Offset(left.x, left.y);
366 | final p2 = Offset(right.x, right.y);
367 | final paint = Paint()
368 | ..color = color //Colors.blue
369 | ..strokeWidth = 4;
370 | canvas.drawLine(p1, p2, paint);
371 | }
372 |
373 | @override
374 | bool shouldRepaint(CustomPainter old) {
375 | return false;
376 | }
377 | }
378 |
--------------------------------------------------------------------------------
/lib/widgets/search_bar.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:line_awesome_flutter/line_awesome_flutter.dart';
3 |
4 | class SearchBar extends StatelessWidget {
5 | String description;
6 | SearchBar(this.description);
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return Container(
11 | margin: EdgeInsets.only(top: 5),
12 | padding: EdgeInsets.symmetric(horizontal: 10, vertical: 0),
13 | decoration: BoxDecoration(
14 | color: Colors.grey[200],
15 | borderRadius: BorderRadius.circular(25),
16 | ),
17 | child: TextField(
18 | decoration: InputDecoration(
19 | hintText: description,
20 | icon: Icon(LineAwesomeIcons.search),
21 | border: InputBorder.none,
22 | ),
23 | ),
24 | );
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/workouts.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:align_ai/widgets/search_bar.dart';
3 |
4 | class WorkOutPage extends StatelessWidget {
5 | @override
6 | Widget build(BuildContext context) {
7 | Size screen = MediaQuery.of(context).size;
8 | return Scaffold(
9 | backgroundColor: Colors.white,
10 | body: Padding(
11 | padding: const EdgeInsets.only(left: 16.0, right: 16.0),
12 | child: Column(
13 | crossAxisAlignment: CrossAxisAlignment.start,
14 | children: [
15 | SizedBox(height: 50),
16 | Text(
17 | 'Workout',
18 | style: TextStyle(
19 | color: Color(0xFFFE7C7C),
20 | fontWeight: FontWeight.bold,
21 | fontSize: 28.0,
22 | ),
23 | ),
24 | Image.asset('images/workout.PNG'),
25 | SizedBox(height: 10),
26 | SizedBox(
27 | child: SearchBar('What do you want to do today? Cardio?'),
28 | ),
29 | SizedBox(height: 10),
30 | SizedBox(
31 | //width: screen.width,
32 | height: 350,
33 | child: ListView(
34 | scrollDirection: Axis.vertical,
35 | children: [
36 | Container(
37 | height: 200,
38 | width: screen.width,
39 | decoration: BoxDecoration(
40 | color: Color(0xFF953CE6),
41 | borderRadius: BorderRadius.circular(18.0),
42 | ),
43 | child: Padding(
44 | padding: const EdgeInsets.all(18.0),
45 | child: Row(
46 | //mainAxisAlignment: MainAxisAlignment.start,
47 | children: [
48 | Column(
49 | crossAxisAlignment: CrossAxisAlignment.start,
50 | children: [
51 | Text(
52 | 'Cardio',
53 | style: TextStyle(
54 | color: Colors.white,
55 | fontSize: 18,
56 | ),
57 | ),
58 | SizedBox(height: 20.0),
59 | Text(
60 | '30 minutes',
61 | style: TextStyle(
62 | color: Colors.white,
63 | fontSize: 14,
64 | ),
65 | ),
66 | Text(
67 | 'Medium activity',
68 | style: TextStyle(
69 | color: Colors.white,
70 | fontSize: 14,
71 | ),
72 | ),
73 | ],
74 | ),
75 | Image.asset('images/cardio.PNG'),
76 | ],
77 | ),
78 | ),
79 | ),
80 | SizedBox(height: 10),
81 | Container(
82 | height: 200,
83 | width: screen.width,
84 | decoration: BoxDecoration(
85 | color: Color(0xFF00b87c),
86 | borderRadius: BorderRadius.circular(18.0),
87 | ),
88 | child: Padding(
89 | padding: const EdgeInsets.all(18.0),
90 | child: Row(
91 | //mainAxisAlignment: MainAxisAlignment.start,
92 | children: [
93 | Column(
94 | crossAxisAlignment: CrossAxisAlignment.start,
95 | children: [
96 | Text(
97 | 'Pilates',
98 | style: TextStyle(
99 | color: Colors.white,
100 | fontSize: 18,
101 | ),
102 | ),
103 | SizedBox(height: 20.0),
104 | Text(
105 | '45 minutes',
106 | style: TextStyle(
107 | color: Colors.white,
108 | fontSize: 14,
109 | ),
110 | ),
111 | Text(
112 | 'Heavy activity',
113 | style: TextStyle(
114 | color: Colors.white,
115 | fontSize: 14,
116 | ),
117 | ),
118 | ],
119 | ),
120 | Image.asset('images/pilates.PNG'),
121 | ],
122 | ),
123 | ),
124 | ),
125 | SizedBox(height: 10),
126 | Container(
127 | height: 200,
128 | width: screen.width,
129 | decoration: BoxDecoration(
130 | color: Color(0xFF353491),
131 | borderRadius: BorderRadius.circular(18.0),
132 | ),
133 | child: Padding(
134 | padding: const EdgeInsets.all(18.0),
135 | child: Row(
136 | //mainAxisAlignment: MainAxisAlignment.start,
137 | children: [
138 | Column(
139 | crossAxisAlignment: CrossAxisAlignment.start,
140 | children: [
141 | Text(
142 | 'Yoga',
143 | style: TextStyle(
144 | color: Colors.white,
145 | fontSize: 18,
146 | ),
147 | ),
148 | SizedBox(height: 20.0),
149 | Text(
150 | '20 minutes',
151 | style: TextStyle(
152 | color: Colors.white,
153 | fontSize: 14,
154 | ),
155 | ),
156 | Text(
157 | 'Light activity',
158 | style: TextStyle(
159 | color: Colors.white,
160 | fontSize: 14,
161 | ),
162 | ),
163 | ],
164 | ),
165 | Image.asset('images/yoga.PNG'),
166 | ],
167 | ),
168 | ),
169 | ),
170 | ],
171 | ),
172 | ),
173 | ],
174 | ),
175 | ),
176 | );
177 | }
178 | }
179 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.4.2"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "2.0.0"
18 | camera:
19 | dependency: "direct main"
20 | description:
21 | name: camera
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "0.5.8+11"
25 | characters:
26 | dependency: transitive
27 | description:
28 | name: characters
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.0.0"
32 | charcode:
33 | dependency: transitive
34 | description:
35 | name: charcode
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.3"
39 | clock:
40 | dependency: transitive
41 | description:
42 | name: clock
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.0.1"
46 | collection:
47 | dependency: transitive
48 | description:
49 | name: collection
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "1.14.13"
53 | cupertino_icons:
54 | dependency: "direct main"
55 | description:
56 | name: cupertino_icons
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "0.1.3"
60 | fake_async:
61 | dependency: transitive
62 | description:
63 | name: fake_async
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "1.1.0"
67 | flutter:
68 | dependency: "direct main"
69 | description: flutter
70 | source: sdk
71 | version: "0.0.0"
72 | flutter_test:
73 | dependency: "direct dev"
74 | description: flutter
75 | source: sdk
76 | version: "0.0.0"
77 | font_awesome_flutter:
78 | dependency: "direct main"
79 | description:
80 | name: font_awesome_flutter
81 | url: "https://pub.dartlang.org"
82 | source: hosted
83 | version: "8.10.0"
84 | line_awesome_flutter:
85 | dependency: "direct main"
86 | description:
87 | name: line_awesome_flutter
88 | url: "https://pub.dartlang.org"
89 | source: hosted
90 | version: "1.0.1"
91 | matcher:
92 | dependency: transitive
93 | description:
94 | name: matcher
95 | url: "https://pub.dartlang.org"
96 | source: hosted
97 | version: "0.12.8"
98 | meta:
99 | dependency: transitive
100 | description:
101 | name: meta
102 | url: "https://pub.dartlang.org"
103 | source: hosted
104 | version: "1.1.8"
105 | path:
106 | dependency: transitive
107 | description:
108 | name: path
109 | url: "https://pub.dartlang.org"
110 | source: hosted
111 | version: "1.7.0"
112 | sky_engine:
113 | dependency: transitive
114 | description: flutter
115 | source: sdk
116 | version: "0.0.99"
117 | source_span:
118 | dependency: transitive
119 | description:
120 | name: source_span
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "1.7.0"
124 | stack_trace:
125 | dependency: transitive
126 | description:
127 | name: stack_trace
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "1.9.5"
131 | stream_channel:
132 | dependency: transitive
133 | description:
134 | name: stream_channel
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "2.0.0"
138 | string_scanner:
139 | dependency: transitive
140 | description:
141 | name: string_scanner
142 | url: "https://pub.dartlang.org"
143 | source: hosted
144 | version: "1.0.5"
145 | term_glyph:
146 | dependency: transitive
147 | description:
148 | name: term_glyph
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "1.1.0"
152 | test_api:
153 | dependency: transitive
154 | description:
155 | name: test_api
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "0.2.17"
159 | tflite:
160 | dependency: "direct main"
161 | description:
162 | name: tflite
163 | url: "https://pub.dartlang.org"
164 | source: hosted
165 | version: "1.1.1"
166 | typed_data:
167 | dependency: transitive
168 | description:
169 | name: typed_data
170 | url: "https://pub.dartlang.org"
171 | source: hosted
172 | version: "1.2.0"
173 | vector_math:
174 | dependency: transitive
175 | description:
176 | name: vector_math
177 | url: "https://pub.dartlang.org"
178 | source: hosted
179 | version: "2.0.8"
180 | sdks:
181 | dart: ">=2.9.0-14.0.dev <3.0.0"
182 | flutter: ">=1.12.13+hotfix.5 <2.0.0"
183 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: align_ai
2 | description: A new Flutter project.
3 |
4 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
5 |
6 | version: 1.0.0+1
7 |
8 | environment:
9 | sdk: ">=2.7.0 <3.0.0"
10 |
11 | dependencies:
12 | flutter:
13 | sdk: flutter
14 |
15 |
16 |
17 | cupertino_icons: ^0.1.3
18 | camera: ^0.5.8+11
19 | tflite: ^1.1.1
20 | font_awesome_flutter: ^8.10.0
21 | line_awesome_flutter: ^1.0.1
22 |
23 | dev_dependencies:
24 | flutter_test:
25 | sdk: flutter
26 |
27 |
28 | flutter:
29 |
30 |
31 | uses-material-design: true
32 |
33 | assets:
34 | - assets/posenet_mv1_075_float_from_checkpoints.tflite
35 | - images/
36 |
37 |
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:align_ai/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------