diff --git a/android/app/build.gradle b/android/app/build.gradle index cc19d7a..7fb27d7 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -24,6 +24,7 @@ if (flutterVersionName == null) { apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" +apply plugin: 'com.google.gms.google-services' android { compileSdkVersion 28 @@ -60,4 +61,5 @@ flutter { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation 'com.google.firebase:firebase-analytics:17.2.2' } diff --git a/android/app/google-services.json b/android/app/google-services.json new file mode 100644 index 0000000..778839c --- /dev/null +++ b/android/app/google-services.json @@ -0,0 +1,40 @@ +{ + "project_info": { + "project_number": "926782702216", + "firebase_url": "https://aitrainer-af0ec.firebaseio.com", + "project_id": "aitrainer-af0ec", + "storage_bucket": "aitrainer-af0ec.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:926782702216:android:94700653fb91484add953d", + "android_client_info": { + "package_name": "com.aitrainer.aitrainer_app" + } + }, + "oauth_client": [ + { + "client_id": "926782702216-al3vjap51m6pgpa066d1oni0bdjpu7pr.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyDOTAvDONK1PB_fPFDxSZp4X-jr0Cf57Yk" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "926782702216-al3vjap51m6pgpa066d1oni0bdjpu7pr.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 066fc3f..55aec36 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -5,6 +5,7 @@ In most cases you can leave this as-is, but you if you want to provide additional functionality it is fine to subclass or reimplement FlutterApplication and put your custom class here. --> + + + + + diff --git a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png new file mode 100644 index 0000000..d2eafe9 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png new file mode 100644 index 0000000..0469334 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png new file mode 100644 index 0000000..f52be7d Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png new file mode 100644 index 0000000..da7894f Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png new file mode 100644 index 0000000..f3cf9c2 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png differ diff --git a/android/build.gradle b/android/build.gradle index 3100ad2..2297a56 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,13 +1,14 @@ buildscript { - ext.kotlin_version = '1.3.50' + ext.kotlin_version = '1.3.72' repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath "com.android.tools.build:gradle:3.5.0" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath "com.google.gms:google-services:4.3.3" } } diff --git a/asset/image/WT_gain_muscle.png b/asset/image/WT_gain_muscle.png index c6c6c82..9111e70 100644 Binary files a/asset/image/WT_gain_muscle.png and b/asset/image/WT_gain_muscle.png differ diff --git a/asset/image/WT_weight_loss.png b/asset/image/WT_weight_loss.png index 9506018..3e751d4 100644 Binary files a/asset/image/WT_weight_loss.png and b/asset/image/WT_weight_loss.png differ diff --git a/asset/menu/1.1.aerob.png b/asset/menu/1.1.aerob.png index 326672b..9af89c2 100644 Binary files a/asset/menu/1.1.aerob.png and b/asset/menu/1.1.aerob.png differ diff --git a/asset/menu/1.2.1.300m.png b/asset/menu/1.2.1.300m.png index 509b604..51a6310 100644 Binary files a/asset/menu/1.2.1.300m.png and b/asset/menu/1.2.1.300m.png differ diff --git a/asset/menu/1.2.anaerob.png b/asset/menu/1.2.anaerob.png index 2f6566a..8270594 100644 Binary files a/asset/menu/1.2.anaerob.png and b/asset/menu/1.2.anaerob.png differ diff --git a/asset/menu/1.cardio.png b/asset/menu/1.cardio.png index 9098704..ced7393 100644 Binary files a/asset/menu/1.cardio.png and b/asset/menu/1.cardio.png differ diff --git a/asset/menu/2.1.3.sit-ups.png b/asset/menu/2.1.3.sit-ups.png index aa3dfe6..702ae9e 100644 Binary files a/asset/menu/2.1.3.sit-ups.png and b/asset/menu/2.1.3.sit-ups.png differ diff --git a/asset/menu/2.1.4.squats.png b/asset/menu/2.1.4.squats.png index fbfe705..f85d191 100644 Binary files a/asset/menu/2.1.4.squats.png and b/asset/menu/2.1.4.squats.png differ diff --git a/asset/menu/2.1.endurance.png b/asset/menu/2.1.endurance.png index 0e59701..2b5f06b 100644 Binary files a/asset/menu/2.1.endurance.png and b/asset/menu/2.1.endurance.png differ diff --git a/asset/menu/3.1.BMI.png b/asset/menu/3.1.BMI.png index 473fd39..fe01be1 100644 Binary files a/asset/menu/3.1.BMI.png and b/asset/menu/3.1.BMI.png differ diff --git a/asset/menu/3.2.BMR.png b/asset/menu/3.2.BMR.png index 93b6e83..45dd52e 100644 Binary files a/asset/menu/3.2.BMR.png and b/asset/menu/3.2.BMR.png differ diff --git a/i18n/en.json b/i18n/en.json index 106f883..7644033 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -22,6 +22,9 @@ "Selected Language": "Selected Language", "gdpr_text": "Kik vagyunk\nA weboldalunk a https://andio.biz (blogbejegyzések) és https://natur-haztartas.hu webáruház.\n\nCélunk a természetes és natúr életmód népszerűsítése, hogy az vásárlóinkat és érdeklődőinket segítsünk a vegyszermentes és natúr életmód felé vezető úton.\n\nMelyek azok a személyes adatok amiket gyűjtünk, és milyen céllal gyűjtjük azokat\nVásárlás\nMegrendelés esetén elkérjük a következő adatokat:\n\na nevet: hogy azonosítsunk csomagszállítás esetén, illetve a számlára is rákerül a vásárló neve\nemail címet: megrendelés visszaigazoláshoz, a csomag állapotának a közléséhez. Emellett, ha engedélyt kapunk, hírleveleket is küldünk natúr életmód tippekről, ajánlatokról. Ezekről a levelekről bármikor, egy kattintással le tudsz iratkozni, a levél alján.\ncímet: A csomag szállításához fontos a pontos cím. A számlára is ez a cím kerül, de lehetőséged van itt egy másik, csak számlázási címet megadni.\ntelefonszámot: SMS értesítőt küldünk a csomag kiszállítása előtt egy munkanappal. Ha valamilyen más probléma merül fel a csomag összeállításakor, akkor lehetséges, hogy telefonon megkeresünk és tisztázzuk a problémákat (pl. áruhiány, rosszul megadott adatok kijavítása, stb).\nHozzászólások\nHozzászólás beküldésekor a hozzászólási űrlapban megadottakon kívül begyűjtésre kerül a hozzászóló IP címe és a böngészőazonosító karakterlánc a kéretlen tartalmak kiszűrése céljából.\n\nEgy személytelenített, az e-mail címből előállított karakterlánc (hashnek szokás nevezni) kerül továbbításra a Gravatar szolgáltatás felé, ha ez az oldalon használatban van. A Gravatar szolgáltatás feltételei az alábbi címen tekinthetőek meg: https://automattic.com/privacy/. A hozzászólás elfogadása után, a hozzászólásunk tartalma és a profil képünk is megjelenik nyilvánosan.\n\nKapcsolatfelvételi űrlapok\nAmennyiben szeretnél, feliratkozhatsz hírlevelünkre weboldalunkon az ott található regisztrációs űrlap kitöltésével. (pl: https://natur-haztartas.hu/login?back=my-account)\n\nHa kitöltöd a regisztrációs űrlapot és rendelkezésünkre bocsátod személyes adataidat vagy a vevőként történő regisztrációjakor hozzájárultál ahhoz, hogy hírlevelet küldjünk az számodra, e-mailt fogsz kapni tőlünk a megadott e-mail címre.\n\nA regisztrációs űrlapon megadott személyes adatok kezelésére kizárólag a hírlevélnek az e-mail címre történő küldése céljából kerül.\n\nA hírleveleinkben található linkek nyomon követési információkat tartalmaznak, melyek segítségével megállapíthatjuk, hogy különösen mely linkek érdekeltek téged, amelyekre rákattintottál.\n\nA nyomon követési link segítségével a következő adatok tárolása történik a hírlevélkezelő rendszerünkbe: e-mail cím, hírlevél, link, dátum és idő. Az személyes adataidat csak addig tároljuk, amíg a „leiratkozás” linkre kattintva le nem iratkozol a hírlevélről. E link megtalálható minden egyes tőlünk kapott hírlevél alján. Amennyiben leiratkozol személyes adataid késedelem nélkül törlésre kerülnek. Felhívjuk a figyelmed arra, hogy személyes adatok törlését követően nem fogsz tőlünk több hírlevelet vagy kupont kapni.\n\nHa üzenetet küldesz az Andió Facebook messengerére, akkor jogosultak vagyunk az Andió által viszontüzenetet küldeni a Te messengeredre. Ezekről az üzeneteket bármikor leállíthatod, ha a messengerbe beírod a STOP szót és utána megnyomod a „leiratkozok” gombot.\n\nSütik és nyomon követés\nHozzászólás írása után a honlap a megadott nevet, e-mail és web címet sütiben eltárolja. A tárolás csak kényelmi célokat szolgál, hogy a következő hozzászóláskor ne kelljen automatikusan kitölteni. A sütik lejárati ideje 1 év.\n\nHa rendelkezel felhasználói fiókkal és be is vagy jelentkezve erre a honlapra, akkor átmeneti sütiket állítunk be, annak érdekében, hogy megállapítsuk, hogy a böngésző elfogadja-e a sütiket. Ezek a sütik nem tartalmaznak személyes információt, és törlődnek, ahogy bezárjuk a böngészőt.\n\nA honlapra történő bejelentkezéskor több sütit hozunk létre, amely elmenti a bejelentkezési információt és a szerkesztőfelület megjelenítési opcióit. A bejelentkezési sütik két napig érvényesek, a szerkesztőfelület megjelenítési opcióit tároló süti egy évig. Amennyiben az “Emlékezz rám” opciót bejelöljük, a bejelentkezés két hétig folytatódik. Kijelentkezéskor a bejelentkezési sütik eltávolításra kerülnek.\n\nHa a webáruházban jársz, akkor a kosarad tartalmát és a bejelentkezési állapotodat is a süti tartalmazza. Így ha kikapcsolod a sütiket a böngésződben, akkor nem tudsz a honlapon rendelni, így azt ímélen vagy telefonon tudod megtenni.\n\nA Google Inc. („Google”) által biztosított Google Analytics internetes elemző szolgáltatást is igénybe vesszük. A Google Analytics szintén sütiket használ. A sütik által a weboldalhasználattal kapcsolatban létrehozott információk általában egy USA-beli Google-szerverre kerülnek, és ott tárolják őket. Ezt megelőzően a Google lerövidíti az IP-címedet az Európai Unió tagállamain és az Európai Gazdasági Térségről szóló megállapodás részes államain belül. Teljes IP-címet csak kivételes esetekben továbbítanak lerövidítés céljából a Google USA-ban található szervereire. A Google a weboldal üzemeltetője megbízásából ezen információk alapján értékeli az weboldalhasználatod, és weboldalaktivitással kapcsolatos jelentéseket készít, valamint további weboldal- és internethasználattal kapcsolatos szolgáltatásokat nyújt a weboldal üzemeltetője számára. Az böngésződ által a Google Analytics szolgáltatása révén továbbított IP-címet nem kapcsolják össze a Google más adataival. A böngésződ megfelelő beállításainak kiválasztásával elutasíthatod a sütik használatát. Megtilthatod azt is, hogy a Google gyűjtse és feldolgozza a sütik által létrehozott és a weboldalhasználatodra vonatkozó adatokat (beleértve az IP-címet). Ehhez töltsd le és telepítse a következő linken található beépülő böngészőmodult: https://tools.google.com/dlpage/gaoptout?hl=en\n\nA Facebook által biztosított adatelemzést és követést is használjuk. Így ha a honlapon jársz, később találkozhatsz egy hirdetéssel, amely a meglátogatott honlap oldalról szól, mert feltételezzük, hogy érdekel Téged a téma, és még többet szeretnél megtudni róla.\n\nVásárlás után véleményt kérünk a vásárolt termékről a Yotpo.com szolgáltatásán keresztül. Itt megírhatod a véleményed, amely kikerül a termék weboldalára esetleg az Andió facebook oldalára is. A vásárlás után kb. 2 héttel egy emailt kapsz, hogy írd meg a véleményed. Erről a véleménykérő emailről is leiratkozhatsz a levél alján látható leiratkozási linkkel.\n\nNéhány weboldalunkat elemezzük, hogy minél jobban követhető, olvasható és használható legyen. Ez az elemzés a Hotjar.com szolgáltatásával személyes adatok gyűjtése és felhasználása nélkül rögzíti a tevékenységedet az oldalon és a sok látogató össztevékenységét összevetve tudjuk az oldal minőségét javítani.\n\nMás honlapokról származó beágyazott tartalmak\nA honlapon elérhető bejegyzések külső forrásból származó beágyazott tartalmakat (pl. videók, képek, cikkek stb.) használhatnak. A külső forrásból származó beágyazott tartalmak pontosan úgy viselkednek, mintha meglátogattunk volna egy másik honlapot.\n\nEzek a webhelyek lehetséges, hogy adatot gyűjtenek a látogatókról, sütiket vagy harmadik féltől származó követőkódot használnak, figyelik a beágyazott tartalommal kapcsolatos felhasználói viselkedést, ha rendelkezünk felhasználói fiókkal és be vagyunk jelentkezve az oldalra.\n\nKivel osztjuk meg és hová továbbítjuk a felhasználói adatokat\nAz elkért és tárolt adatokat a webtárhelyen adatbázisban őrizzük. A webtárhely tulajdonosa a Magyar Hosting Kft (Székhely: 1132 Budapest, Victor Hugo u. 18, Postacím: ua. Telefon: (1) 700 2323 Web: https://www.mhosting.hu/ )\n\nA nevet és a címet csomagszállítás esetén továbbítjuk a futárszolgálat felé, amely kiszállítja a címedre a csomagot.\n\nBelföldi szállítás esetén: Complexpress Logisztika Kft.,1033 Budapest, Szentendrei út 89-95. Telefon: 06-1-203-4681\n\nKülföldi szállítás esetén: GLS General Logistics Systems Hungary Csomag-Logisztikai Kft. 2351 Alsónémedi GLS Európa u. 2. info@gls-hungary.com.\n\nA vásárláshoz minden esetben számlát adunk ki, amelyet bármikor letölthetsz a webáruház felhasználó fiókodból: https://natur-haztartas.hu/ugyfelfiok. A számlán levő adatokat (név és cím) elküldjük a könyvelőirodának, amelyet törvényi kötelezettségünk 8 évig megőrizni.\n\nA könyvelőiroda: Adókalkulátor Kft. Cím: Budapest, Szigligeti u. 44, 1205 Telefon: (20) 292 1072\n\nMennyi ideig őrizzük a személyes adatot\nHa hozzászólsz egy blogbejegyzéshez, hozzászólás és annak metaadatai nem meghatározható ideig a rendszerben maradnak. Ennek célja, hogy az összes ezt követő bármely hozzászólás általunk megismertté és jóváhagyottá váljon, azaz ne kerüljön fel a moderálandó hozzászólások listájára.\n\nA honlapon regisztrált felhasználók személyes adatai a felhasználói profiljukban is tárolásra kerülnek. (https://natur-haztartas.hu/ugyfelfiok)\n\nA vásárláskor megadott adatokat a törvény szerint 8 év őrizzük.\n\nA hírlevél feliratkozáskor ill. kapcsolati űrlapon megadott adatokat nem töröljük, csak kérésre. Ezt egy kattintással megteheted minden hírlevél alján, ill. az ügyfelszolgálati email címen is kérheted a törlést.\n\nMilyen jogokkal rendelkezik a felhasználó a saját adatai kapcsán\nA weboldalon regisztrált fiók vagy hozzászólás írása esetén kérhető a személyes adatok export fájlban történő megküldése, amely bármilyen adatot tartalmaz, amit korábban a felhasználó rendelkezésünkre bocsátott.\n\nKérhető továbbá, hogy bármilyen korábban megadott személyes adatot töröljük. Ezt megteheted minden hírlevél alján levő leiratkozás gombbal, vagy ügyfélszolgálati elérhetőségeink egyikén. A törlés nem vonatkozik azokra az adatokra, amelyeket adminisztrációs, jogi vagy biztonsági okokból kötelező megőriznünk.\n\nAdathelyesbítés: ha pontatlanok az adataid (név, email cím, szállítási cím), megteheted az ugyfelszolgalat@andio.biz email címen keresztül\n\nKapcsolati adatok\nÜgyfélszolgálat:\n\nemail: ugyfelszolgalat@andio.biz\n\ntelefon munkaidőben: +36 30 580 0499", + "Please log in": "Please log in", + "Customer does not exist or the password is wrong": "Customer does not exist or the password is wrong", + "Customer exists": "The email address has been registered already", "Please select an exercise": "Please select an exercise", "Cardio": "Cardio", "400m": "400m", @@ -75,6 +78,20 @@ "Next": "Next", "Select a gender": "Select a gender", - "Goal Settings": "Goal Settings" - + "Set Your Goals": "Set Your Goals", + "Gain Muscle": "Gain Muscle", + "Loose Weight": "Loose Weight", + "Your Fitness State": "Your Fitness State", + "Beginner": "Beginner", + "I am beginner": "I am beginner", + "Intermediate": "Intermediate", + "I am intermediate": "1-3 times a week", + "Advanced": "Advanced", + "I am advanced": "4+ times a week", + "Professional": "Professional", + "I am professional": "I am a professional", + "Your Body Type": "Your Body Type", + "Ectomorph": "Ectomorph", + "Endomorph": "Endomorph", + "Mesomorph": "Mesomorph" } \ No newline at end of file diff --git a/i18n/hu.json b/i18n/hu.json index 9f4ab34..2c1ea6a 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -22,7 +22,10 @@ "Selected Language": "Választott nyelv", "gdpr_text": "", + "Please log in": "Kérlek jelentkezz be", + "Customer does not exist or the password is wrong": "A felhasználónév nem létezik vagy a jelszó rossz.", "Please select an exercise": "Válassz ki egy gyakorlatot", + "Customer exists": "Ez az email cím már regisztrálva van", "Cardio": "Kardió", "400m": "400m", "300m": "300m", @@ -75,6 +78,21 @@ "Next": "Tovább", "Select a gender": "Válaszd ki a nemet", - "Goal Settings": "Cél" + "Set Your Goals": "Mi a célod?", + "Gain Muscle": "Izomépítés", + "Loose Weight": "Fogyás", + "Your Fitness State": "Milyen a fizikai állapotod?", + "Beginner": "Kezdő", + "I am beginner": "Kezdő / Újrakezdő vagyok", + "Intermediate": "Középhaladó", + "I am intermediate": "1-3-szor mozgok egy héten", + "Advanced": "Haladó", + "I am advanced": "4+ alkalommal sportolok egy héten", + "Professional": "Professzionális", + "I am professional": "Professzionális sportoló vagyok", + "Your Body Type": "Milyen a testtípusod?", + "Ectomorph": "Ectomorf", + "Endomorph":"Endomorf", + "Mezomorph":"Mezomorf" } \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..3cb33da Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..a1a3575 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..aec39af Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..7cd87f1 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..15fe571 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..9311f2b Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..a9273cd Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..aec39af Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..08116cf Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..785807d Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png new file mode 100644 index 0000000..2f7e662 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png new file mode 100644 index 0000000..0874827 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png new file mode 100644 index 0000000..3373cfe Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png new file mode 100644 index 0000000..147d922 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..785807d Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..6d5458c Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png new file mode 100644 index 0000000..d2eafe9 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png new file mode 100644 index 0000000..da7894f Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..32a9e13 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..ca9b141 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..cd6601c Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/.xcodeproj/project.pbxproj b/ios/.xcodeproj/project.pbxproj new file mode 100644 index 0000000..068e99e --- /dev/null +++ b/ios/.xcodeproj/project.pbxproj @@ -0,0 +1,513 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 97C146F11CF9000F007C117D /* Supporting Files */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; + 97C146F11CF9000F007C117D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject " " */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.aitrainer.aitrainer_app; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.aitrainer.aitrainer_app; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.aitrainer.aitrainer_app; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject " " */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/ios/.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/ios/.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/.xcodeproj/xcshareddata/xcschemes/Runner 1.xcscheme b/ios/.xcodeproj/xcshareddata/xcschemes/Runner 1.xcscheme new file mode 100644 index 0000000..2458de4 --- /dev/null +++ b/ios/.xcodeproj/xcshareddata/xcschemes/Runner 1.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..a28140c --- /dev/null +++ b/ios/.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/push_notifications.dart b/lib/push_notifications.dart new file mode 100644 index 0000000..4128f5c --- /dev/null +++ b/lib/push_notifications.dart @@ -0,0 +1,27 @@ +import 'package:firebase_messaging/firebase_messaging.dart'; + +class PushNotificationsManager { + + PushNotificationsManager._(); + + factory PushNotificationsManager() => _instance; + + static final PushNotificationsManager _instance = PushNotificationsManager._(); + + final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); + bool _initialized = false; + + Future init() async { + if (!_initialized) { + // For iOS request permission first. + _firebaseMessaging.requestNotificationPermissions(); + _firebaseMessaging.configure(); + + // For testing purposes print the Firebase Messaging token + String token = await _firebaseMessaging.getToken(); + print("FirebaseMessaging token: $token"); + + _initialized = true; + } + } +} \ No newline at end of file diff --git a/lib/service/api.dart b/lib/service/api.dart index 1779944..d9c72a8 100644 --- a/lib/service/api.dart +++ b/lib/service/api.dart @@ -1,4 +1,5 @@ import 'dart:convert'; +import 'package:aitrainer_app/util/common.dart'; import 'package:flutter/cupertino.dart'; import 'package:http/http.dart' as http; import 'package:aitrainer_app/model/auth.dart'; @@ -39,16 +40,18 @@ class APIClient extends ChangeNotifier { ); authToken = responseJson['token']; } + final response = await http.post(url, headers: { - 'Content-Type': 'application/json', + 'Content-Type': 'application/json; charset=UTF-8', 'Authorization' : "Bearer " + authToken }, - body: body + body: body, ); - print(" ------------ response: " + response.body.toString()); + String decodedResponse = Common.utf8convert(response.body); + print(" ------------ response: " + decodedResponse); notifyListeners(); - return response.body; + return decodedResponse; } static dynamic authenticateUser(String email, String password) async { diff --git a/lib/service/customer_service.dart b/lib/service/customer_service.dart index ed981c0..f0b154c 100644 --- a/lib/service/customer_service.dart +++ b/lib/service/customer_service.dart @@ -37,8 +37,13 @@ class CustomerApi { final String responseBody = await _client.post( "registration", body); - Customer customer = Customer.fromJson(jsonDecode(responseBody)); - Auth().afterRegistration(customer); + Customer customer; + try { + customer = Customer.fromJson(jsonDecode(responseBody)); + Auth().afterRegistration(customer); + } on FormatException catch(exception) { + throw new Exception(responseBody); + } } @@ -48,10 +53,16 @@ class CustomerApi { final String responseBody = await _client.post( "login", body); - Customer customer = Customer.fromJson(jsonDecode(responseBody)); - Auth().afterRegistration(customer); + Customer customer; + try { + customer = Customer.fromJson(jsonDecode(responseBody)); + Auth().afterRegistration(customer); + } on FormatException catch(exception) { + throw new Exception(responseBody); + } } + Future getCustomer(int customerId) async { String body = ""; print(" ===== get the customer by id: " + customerId.toString() ); diff --git a/lib/util/common.dart b/lib/util/common.dart index 23c4c0c..e1ec8fd 100644 --- a/lib/util/common.dart +++ b/lib/util/common.dart @@ -1,3 +1,5 @@ +import 'dart:convert'; + import 'package:aitrainer_app/localization/app_language.dart'; import 'package:aitrainer_app/model/auth.dart'; import 'package:aitrainer_app/model/exercise_type.dart'; @@ -40,4 +42,9 @@ class Common { return dateName; } + + static String utf8convert(String text) { + List bytes = text.toString().codeUnits; + return utf8.decode(bytes); + } } \ No newline at end of file diff --git a/lib/util/session.dart b/lib/util/session.dart index 14583a3..880a5b8 100644 --- a/lib/util/session.dart +++ b/lib/util/session.dart @@ -7,6 +7,8 @@ import 'package:flutter/services.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:aitrainer_app/model/auth.dart'; +import '../push_notifications.dart'; + class Session { Future _prefs = SharedPreferences.getInstance(); @@ -22,6 +24,7 @@ class Session { _fetchToken(_sharedPreferences, callback); initDeviceLocale(); appLanguage.fetchLocale(); + PushNotificationsManager().init(); } } diff --git a/lib/view/account.dart b/lib/view/account.dart index 4f7aba5..46039d9 100644 --- a/lib/view/account.dart +++ b/lib/view/account.dart @@ -1,8 +1,9 @@ - import 'package:aitrainer_app/localization/app_language.dart'; import 'package:aitrainer_app/localization/app_localization.dart'; import 'package:aitrainer_app/model/auth.dart'; import 'package:aitrainer_app/util/common.dart'; +import 'package:aitrainer_app/viewmodel/customer_changing_view_model.dart'; +import 'package:aitrainer_app/viewmodel/customer_view_model.dart'; import 'package:aitrainer_app/viewmodel/exercise_changing_view_model.dart'; import 'package:aitrainer_app/viewmodel/exercise_view_model.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -20,6 +21,10 @@ class AccountPage extends StatefulWidget{ _state = new _AccountPagePageState(); return _state; } + + State getState() { + return _state; + } } class _AccountPagePageState extends State { @@ -27,23 +32,36 @@ class _AccountPagePageState extends State { final AppLanguage appLanguage = AppLanguage(); final Future _prefs = SharedPreferences.getInstance(); final BottomNavigator bottomNav = BottomNavigator(); - bool _loggedIn = Auth().userLoggedIn != null && Auth().userLoggedIn.email.length > 0; Future> _exercises; - ExerciseChangingViewModel model; + ExerciseChangingViewModel exerciseChangingViewModel; @override void initState() { + exerciseChangingViewModel = Provider.of(context, listen: false); super.initState(); - model = Provider.of(context, listen: false); - if ( Auth().userLoggedIn != null ) { - _exercises = model.getExercisesByCustomer(Auth().userLoggedIn.customerId); - } } @override Widget build(BuildContext context) { + return Consumer( + builder: (context, model, child ) { + if ( model.customer == null ) { + CustomerViewModel customerViewModel = CustomerViewModel(); + model.customer = customerViewModel; + if ( model.customer.getCustomer() == null ) { + model.customer.setCustomer(Auth().userLoggedIn); + } + } + + if ( Auth().userLoggedIn != null ) { + _exercises = + exerciseChangingViewModel.getExercisesByCustomer( + Auth().userLoggedIn.customerId); + } + + return Scaffold( appBar: AppBar( title: Text(AppLocalizations.of(context).translate('Account')), @@ -75,18 +93,19 @@ class _AccountPagePageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text(_loggedIn ? Auth().userLoggedIn.email + " " + - Auth().userLoggedIn.name + " " + + Text(Auth().userLoggedIn != null ? + Auth().userLoggedIn.name + " " + Auth().userLoggedIn.firstname : "", style: TextStyle(color: Colors.blue)), Icon(Icons.arrow_forward_ios), ]), textColor: Colors.grey, color: Colors.white, - onPressed: () { - if (_loggedIn) { - Navigator.of(context).pushNamed('customerModifyPage'); - print("Profile"); + onPressed: () => { + if (model.customer.getCustomer() != null) { + Navigator.of(context).pushNamed( + 'customerModifyPage'), + print("Profile"), } }, ), @@ -100,22 +119,24 @@ class _AccountPagePageState extends State { subtitle: Text(AppLocalizations.of(context).translate( "Selected Language")), ), - loginOut(), - exercises( model ), + loginOut( model ), + exercises(exerciseChangingViewModel), ] ) ), - bottomNavigationBar: bottomNav.buildBottomNavigator(context, widget._state) + bottomNavigationBar: bottomNav.buildBottomNavigator( + context, widget._state) ); + }); } - ListTile loginOut() { + ListTile loginOut( CustomerChangingViewModel model ) { ListTile element = ListTile(); String text = "Logout"; Color buttonColor = Colors.orange; - if ( ! _loggedIn ) { + if ( model.customer.getCustomer() == null ) { text = "Login"; buttonColor = Colors.blue; } @@ -135,19 +156,18 @@ class _AccountPagePageState extends State { ]), textColor: buttonColor, color: Colors.white, - onPressed: () { + onPressed: () => { setState(() { - if ( ! _loggedIn) { + if ( model.customer.getCustomer() == null ) { print("Login"); - Navigator.of(context).pushNamed("login"); + Navigator.of(context).pushNamed("login", arguments: widget._state); } else { print("Logout"); - _loggedIn = false; Auth().logout(); - + model.customer.setCustomer(null); } - }); + }) }, ), ); diff --git a/lib/view/customer_bodytype_page.dart b/lib/view/customer_bodytype_page.dart index fc32759..a3dcba8 100644 --- a/lib/view/customer_bodytype_page.dart +++ b/lib/view/customer_bodytype_page.dart @@ -12,16 +12,19 @@ class CustomerBodyTypePage extends StatefulWidget{ } } -class GenderItem { - GenderItem(this.dbValue,this.name); - final String dbValue; - String name; +class BodyTypeItem { + + static String endomorph = "endomorph"; + static String ectomorph = "ectomorph"; + static String mesomorph = "mesomorph"; } class _CustomerBodyTypePageState extends State { + String selected; @override Widget build(BuildContext context) { final CustomerChangingViewModel changingViewModel = ModalRoute.of(context).settings.arguments; + final double cWidth = MediaQuery.of(context).size.width*0.75; return Scaffold( appBar: AppBar( @@ -46,36 +49,142 @@ class _CustomerBodyTypePageState extends State { alignment: Alignment.center, ), ), - child: Center( - child: Column( - children: [ - Divider(), - InkWell( - child: Text("Your Body Type", + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Divider(), + Wrap( + //runAlignment: WrapAlignment.center, + alignment: WrapAlignment.center, + children: [ + Text( + AppLocalizations.of(context).translate("Your Body Type"), + textAlign: TextAlign.center, style: TextStyle(color: Colors.orange, - fontSize: 50, fontFamily: 'Arial', - fontWeight: FontWeight.w900 ),), - highlightColor: Colors.white, - ), - - - RaisedButton( - - color: Colors.orange, - textColor: Colors.white, - child: InkWell( - child: Text(AppLocalizations.of(context).translate("Next"))), - onPressed: () => { - //changingViewModel.saveCustomer(), - Navigator.of(context).pop(), - Navigator.of(context).pushNamed("customerWelcomePage", arguments: changingViewModel) - }, - ) - ], + fontSize: 42, fontFamily: 'Arial', + fontWeight: FontWeight.w900 ),) + ] ), - ) + + + Divider(), + FlatButton( + child: Container( + width: cWidth, + child: Column( + children: [ + Text(AppLocalizations.of(context).translate("Endomorph"), + textWidthBasis: TextWidthBasis.longestLine, + style: TextStyle(color: Colors.blue, + fontSize: 32, fontFamily: 'Arial', + fontWeight: FontWeight.w900 )), + + ], + ) + ), + padding: EdgeInsets.all(10.0), + shape: getShape(changingViewModel, BodyTypeItem.endomorph ), + onPressed:() => + { + setState((){ + selected = BodyTypeItem.endomorph; + changingViewModel.customer.setBodyType(selected); + print(selected); + }), + + } + + ), + Divider(), + FlatButton( + child: Container( + width: cWidth, + child: Column( + children: [ + InkWell( + child: Text(AppLocalizations.of(context).translate("Ectomorph"), + style: TextStyle(color: Colors.blue, + fontSize: 32, fontFamily: 'Arial', + fontWeight: FontWeight.w900 ),), + highlightColor: Colors.white, + ), + + ], + ), + ), + padding: EdgeInsets.all(10.0), + shape: getShape(changingViewModel, BodyTypeItem.ectomorph ), + + onPressed:() => + { + setState((){ + selected = BodyTypeItem.ectomorph; + changingViewModel.customer.setBodyType(selected); + print(selected); + }), + + } + ), + Divider(), + FlatButton( + child: Container( + width: cWidth, + child: Column( + children: [ + InkWell( + child: Text(AppLocalizations.of(context).translate("Mesomorph"), + style: TextStyle(color: Colors.blue, + fontSize: 32, fontFamily: 'Arial', + fontWeight: FontWeight.w900 ),), + highlightColor: Colors.white, + ), + + ], + ), + ), + padding: EdgeInsets.all(10.0), + shape: getShape(changingViewModel, BodyTypeItem.mesomorph ), + onPressed:() => + { + setState((){ + selected = BodyTypeItem.mesomorph; + changingViewModel.customer.setBodyType(selected); + print(selected); + }), + + } + ), + + Divider(), + RaisedButton( + + color: Colors.orange, + textColor: Colors.white, + child: InkWell( + child: Text(AppLocalizations.of(context).translate("Next"))), + onPressed: () => { + changingViewModel.saveCustomer(), + Navigator.of(context).pop(), + Navigator.of(context).pushNamed("customerWelcomePage", arguments: changingViewModel) + }, + ) + ], + ), ), ); } + dynamic getShape( CustomerChangingViewModel changingViewModel, String fitnessLevel ) { + String selected = changingViewModel.customer.bodyType; + dynamic returnCode = ( selected == fitnessLevel ) ? + RoundedRectangleBorder( + side: BorderSide(width: 4, color: Colors.orange), + ) + : + RoundedRectangleBorder( + side: BorderSide(width: 1, color: Colors.blue), + ); + //return + return returnCode; + } } \ No newline at end of file diff --git a/lib/view/customer_fitness_page.dart b/lib/view/customer_fitness_page.dart index bdc1722..22d7156 100644 --- a/lib/view/customer_fitness_page.dart +++ b/lib/view/customer_fitness_page.dart @@ -1,6 +1,8 @@ import 'package:aitrainer_app/localization/app_localization.dart'; import 'package:aitrainer_app/viewmodel/customer_changing_view_model.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; // ignore: must_be_immutable class CustomerFitnessPage extends StatefulWidget{ @@ -12,17 +14,24 @@ class CustomerFitnessPage extends StatefulWidget{ } } -class GenderItem { - GenderItem(this.dbValue,this.name); - final String dbValue; - String name; +class FitnessItem { + static String beginner = "beginner"; + static String intermediate = "intermediate"; + static String advanced = "advanced"; + static String professional = "professional"; } +//TODO +// dropbox for professional sport + class _CustomerFitnessPageState extends State { + String selected; + @override Widget build(BuildContext context) { + final double cWidth = MediaQuery.of(context).size.width*0.75; final CustomerChangingViewModel changingViewModel = ModalRoute.of(context).settings.arguments; - + selected = changingViewModel.customer.fitnessLevel; return Scaffold( appBar: AppBar( title: Row( @@ -38,43 +47,205 @@ class _CustomerFitnessPageState extends State { ), backgroundColor: Colors.transparent, ), - body: Container( - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage('asset/image/WT_light_background.png'), - fit: BoxFit.cover, - alignment: Alignment.center, + body: SingleChildScrollView( + scrollDirection: Axis.vertical, + child: Container( + + padding: EdgeInsets.only(bottom: 200), + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage('asset/image/WT_light_background.png'), + fit: BoxFit.cover, + alignment: Alignment.center, + ), ), - ), - child: Center( child: Column( + mainAxisAlignment: MainAxisAlignment.center, children: [ Divider(), - InkWell( - child: Text("Your Fitness State", - style: TextStyle(color: Colors.orange, - fontSize: 50, fontFamily: 'Arial', - fontWeight: FontWeight.w900 ),), - highlightColor: Colors.white, + Wrap( + //runAlignment: WrapAlignment.center, + alignment: WrapAlignment.center, + children: [ + Text( + AppLocalizations.of(context).translate("Your Fitness State"), + textAlign: TextAlign.center, + style: TextStyle(color: Colors.orange, + fontSize: 42, fontFamily: 'Arial', + fontWeight: FontWeight.w900 ),) + ] ), - RaisedButton( - color: Colors.orange, - textColor: Colors.white, - child: InkWell( - child: Text(AppLocalizations.of(context).translate("Next"))), - onPressed: () => { - //changingViewModel.saveCustomer(), - Navigator.of(context).pop(), - Navigator.of(context).pushNamed("customerBodyTypePage", arguments: changingViewModel) - }, - ) - ], + Divider(), + FlatButton( + child: Container( + width: cWidth, + child: Column( + children: [ + Text(AppLocalizations.of(context).translate("Beginner"), + textWidthBasis: TextWidthBasis.longestLine, + style: TextStyle(color: Colors.blue, + fontSize: 32, fontFamily: 'Arial', + fontWeight: FontWeight.w900 )), + Text(AppLocalizations.of(context).translate("I am beginner"), + style: TextStyle(color: Colors.black, + fontSize: 20, fontFamily: 'Arial', + fontWeight: FontWeight.w100 ),), + ], + ) + ), + padding: EdgeInsets.all(10.0), + shape: getShape(changingViewModel, FitnessItem.beginner ), + onPressed:() => + { + setState((){ + selected = FitnessItem.beginner; + changingViewModel.customer.setFitnessLevel(selected); + print(selected); + }), + + } + + ), + Divider(), + FlatButton( + child: Container( + width: cWidth, + child: Column( + children: [ + InkWell( + child: Text(AppLocalizations.of(context).translate("Intermediate"), + style: TextStyle(color: Colors.blue, + fontSize: 32, fontFamily: 'Arial', + fontWeight: FontWeight.w900 ),), + highlightColor: Colors.white, + ), + InkWell( + child: Text(AppLocalizations.of(context).translate("I am intermediate"), + style: TextStyle(color: Colors.black, + fontSize: 20, fontFamily: 'Arial', + fontWeight: FontWeight.w100 ),), + highlightColor: Colors.white, + ), + ], + ), + ), + padding: EdgeInsets.all(10.0), + shape: getShape(changingViewModel, FitnessItem.intermediate ), + + onPressed:() => + { + setState((){ + selected = FitnessItem.intermediate; + changingViewModel.customer.setFitnessLevel(selected); + print(selected); + }), + + } + ), + Divider(), + FlatButton( + child: Container( + width: cWidth, + child: Column( + children: [ + InkWell( + child: Text(AppLocalizations.of(context).translate("Advanced"), + style: TextStyle(color: Colors.blue, + fontSize: 32, fontFamily: 'Arial', + fontWeight: FontWeight.w900 ),), + highlightColor: Colors.white, + ), + InkWell( + child: Text(AppLocalizations.of(context).translate("I am advanced"), + style: TextStyle(color: Colors.black, + fontSize: 20, fontFamily: 'Arial', + fontWeight: FontWeight.w100 ),), + highlightColor: Colors.white, + ), + ], + ), + ), + padding: EdgeInsets.all(10.0), + shape: getShape(changingViewModel, FitnessItem.advanced ), + onPressed:() => + { + setState((){ + selected = FitnessItem.advanced; + changingViewModel.customer.setFitnessLevel(selected); + print(selected); + }), + + } + ), + Divider(), + FlatButton( + child: Container( + width: cWidth, + child: Column( + children: [ + InkWell( + child: Text(AppLocalizations.of(context).translate("Professional"), + style: TextStyle(color: Colors.blue, + fontSize: 32, fontFamily: 'Arial', + fontWeight: FontWeight.w900 ),), + highlightColor: Colors.white, + ), + InkWell( + child: Text(AppLocalizations.of(context).translate("I am professional"), + style: TextStyle(color: Colors.black, + fontSize: 20, fontFamily: 'Arial', + fontWeight: FontWeight.w100 ),), + highlightColor: Colors.white, + ), + ], + ), + ), + padding: EdgeInsets.all(10.0), + shape: getShape(changingViewModel, FitnessItem.professional ), + onPressed:() => + { + setState((){ + selected = FitnessItem.professional; + changingViewModel.customer.setFitnessLevel(selected); + print(selected); + }), + + } + ), + Divider(), + RaisedButton( + + color: Colors.orange, + textColor: Colors.white, + child: InkWell( + child: Text(AppLocalizations.of(context).translate("Next"))), + onPressed: () => { + changingViewModel.saveCustomer(), + Navigator.of(context).pop(), + Navigator.of(context).pushNamed("customerBodyTypePage", arguments: changingViewModel) + }, + ) + ], ), - ) ), + ) ); } + dynamic getShape( CustomerChangingViewModel changingViewModel, String fitnessLevel ) { + String selected = changingViewModel.customer.fitnessLevel; + dynamic returnCode = ( selected == fitnessLevel ) ? + RoundedRectangleBorder( + side: BorderSide(width: 4, color: Colors.orange), + ) + : + RoundedRectangleBorder( + side: BorderSide(width: 1, color: Colors.blue), + ); + //return + return returnCode; + } + } \ No newline at end of file diff --git a/lib/view/customer_goal_page.dart b/lib/view/customer_goal_page.dart index 80ea9af..66ff316 100644 --- a/lib/view/customer_goal_page.dart +++ b/lib/view/customer_goal_page.dart @@ -1,5 +1,6 @@ import 'package:aitrainer_app/localization/app_localization.dart'; import 'package:aitrainer_app/viewmodel/customer_changing_view_model.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; // ignore: must_be_immutable @@ -12,17 +13,23 @@ class CustomerGoalPage extends StatefulWidget{ } } -class GenderItem { - GenderItem(this.dbValue,this.name); - final String dbValue; - String name; +class GoalsItem{ + static String muscle = "gain_muscle"; + static String weight = "weight_loss"; } class _CustomerGoalPageState extends State { + String selected; + + initState() { + super.initState(); + } + @override Widget build(BuildContext context) { + final double cWidth = MediaQuery.of(context).size.width*0.75; final CustomerChangingViewModel changingViewModel = ModalRoute.of(context).settings.arguments; - + selected = changingViewModel.customer.goal; return Scaffold( appBar: AppBar( title: Row( @@ -46,79 +53,104 @@ class _CustomerGoalPageState extends State { alignment: Alignment.center, ), ), - child: Center( - child: Column( - children: [ - Divider(), - InkWell( - child: Text("Set Your Goals", - style: TextStyle(color: Colors.orange, - fontSize: 50, fontFamily: 'Arial', - fontWeight: FontWeight.w900 ),), - highlightColor: Colors.white, - ), + child: SingleChildScrollView( + child: Center( + child: Column( + children: [ + Divider(), + InkWell( + child: Text(AppLocalizations.of(context).translate("Set Your Goals"), + style: TextStyle(color: Colors.orange, + fontSize: 50, fontFamily: 'Arial', + fontWeight: FontWeight.w900 ),), + highlightColor: Colors.white, + ), - Stack( - alignment: Alignment.bottomLeft, - overflow: Overflow.visible, - children: [ - FlatButton( - child: Image.asset("asset/image/WT_gain_muscle.png", height: 250,), - padding: EdgeInsets.all(0.0), - onPressed:() => - { - print("gain muscle"), - changingViewModel.customer.setGoal("gain_muscle"), - } - ), - InkWell( - child: Text("Gain Muscle", - style: TextStyle(color: Colors.white, - fontSize: 36, fontFamily: 'Arial', - fontWeight: FontWeight.w900 ),), - highlightColor: Colors.white, - ) - ] - ), - Stack( - alignment: Alignment.bottomLeft, - overflow: Overflow.visible, - children: [ - FlatButton( - child: Image.asset("asset/image/WT_weight_loss.png", height: 220,), + Stack( + alignment: Alignment.bottomLeft, + overflow: Overflow.visible, + children: [ + FlatButton( + child: Image.asset("asset/image/WT_gain_muscle.png", height: 180,), padding: EdgeInsets.all(0.0), + shape: getShape(changingViewModel, GoalsItem.muscle ), onPressed:() => { - print("weight_loss"), - changingViewModel.customer.setGoal("weight_loss"), + print("gain muscle"), + setState((){ + selected = GoalsItem.muscle; + changingViewModel.customer.setGoal(GoalsItem.muscle); + }), + } ), - InkWell( - child: Text("Loose Weight", - style: TextStyle(color: Colors.white, - fontSize: 36, fontFamily: 'Arial', - fontWeight: FontWeight.w900 ),), - highlightColor: Colors.white, - ) + InkWell( + child: Text(AppLocalizations.of(context).translate("Gain Muscle"), + style: TextStyle(color: Colors.white, + fontSize: 32, fontFamily: 'Arial', + fontWeight: FontWeight.w900 ),), + highlightColor: Colors.white, + ) ] - ), - RaisedButton( + ), + Divider(), + Stack( + alignment: Alignment.bottomLeft, + overflow: Overflow.visible, + children: [ + FlatButton( + child: Image.asset("asset/image/WT_weight_loss.png", height: 180,), + padding: EdgeInsets.all(0.0), + shape: getShape(changingViewModel, GoalsItem.weight ), + onPressed:() => + { + print("weight_loss"), + setState((){ + selected = GoalsItem.weight; + changingViewModel.customer.setGoal(GoalsItem.weight); + }), - color: Colors.orange, - textColor: Colors.white, - child: InkWell( - child: Text(AppLocalizations.of(context).translate("Next"))), - onPressed: () => { - //changingViewModel.saveCustomer(), - Navigator.of(context).pop(), - Navigator.of(context).pushNamed("customerFitnessPage", arguments: changingViewModel) - }, - ) - ], - ), + } + ), + InkWell( + child: Text(AppLocalizations.of(context).translate("Loose Weight"), + style: TextStyle(color: Colors.white, + fontSize: 32, fontFamily: 'Arial', + fontWeight: FontWeight.w900 ),), + highlightColor: Colors.white, + ) + ] + ), + Divider(), + RaisedButton( + + color: Colors.orange, + textColor: Colors.white, + child: InkWell( + child: Text(AppLocalizations.of(context).translate("Next"))), + onPressed: () => { + changingViewModel.saveCustomer(), + Navigator.of(context).pop(), + Navigator.of(context).pushNamed("customerFitnessPage", arguments: changingViewModel) + }, + ) + ], + ), + ) ) ), ); } + dynamic getShape( CustomerChangingViewModel changingViewModel, String goal ) { + String selectedGoal = changingViewModel.customer.goal; + dynamic returnCode = ( selectedGoal == goal ) ? + RoundedRectangleBorder( + side: BorderSide(width: 4, color: Colors.red), + ) + : null; + //return + return returnCode; + } + } \ No newline at end of file diff --git a/lib/view/customer_modify_page.dart b/lib/view/customer_modify_page.dart index 05fe88a..d2c274a 100644 --- a/lib/view/customer_modify_page.dart +++ b/lib/view/customer_modify_page.dart @@ -1,11 +1,11 @@ import 'package:aitrainer_app/localization/app_localization.dart'; -import 'package:aitrainer_app/model/auth.dart'; import 'package:aitrainer_app/viewmodel/customer_changing_view_model.dart'; -import 'package:aitrainer_app/viewmodel/customer_view_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/services.dart'; +import 'package:provider/provider.dart'; +// ignore: must_be_immutable class CustomerModifyPage extends StatefulWidget{ _CustomerModifyPageState _state; @@ -39,11 +39,12 @@ class _CustomerModifyPageState extends State { @override Widget build(BuildContext context) { - final CustomerViewModel model = CustomerViewModel(); - model.customer = Auth().userLoggedIn; - final CustomerChangingViewModel customerChangeModel = - CustomerChangingViewModel(model); - customerChangeModel.customer.customer.sex = selectedGender.dbValue; + //final CustomerViewModel model = CustomerViewModel(); + //model.customer = Auth().userLoggedIn; + //final CustomerChangingViewModel customerChangeModel = + // CustomerChangingViewModel(model); + CustomerChangingViewModel customerChangingViewModel = Provider.of(context, listen: false); + customerChangingViewModel.customer.customer.sex = selectedGender.dbValue; // we cannot initialize the translations in the initState genders.forEach((GenderItem element) { @@ -103,8 +104,8 @@ class _CustomerModifyPageState extends State { filled: true, labelText: AppLocalizations.of(context).translate('Email'), ), - initialValue: customerChangeModel.customer.customer.email, - onFieldSubmitted: (input) => customerChangeModel.customer.setEmail(input) + initialValue: customerChangingViewModel.customer.customer.email, + onFieldSubmitted: (input) => customerChangingViewModel.customer.setEmail(input) ) ) ], @@ -123,8 +124,8 @@ class _CustomerModifyPageState extends State { filled: true, labelText: AppLocalizations.of(context).translate('Password (Leave empty if you don\'t want to change)' ), ), - initialValue: customerChangeModel.customer.customer.password, - onFieldSubmitted: (input) => customerChangeModel.customer.setPassword(input) + initialValue: customerChangingViewModel.customer.customer.password, + onFieldSubmitted: (input) => customerChangingViewModel.customer.setPassword(input) ) ) ], @@ -142,8 +143,8 @@ class _CustomerModifyPageState extends State { filled: true, labelText: AppLocalizations.of(context).translate('Name'), ), - initialValue: customerChangeModel.customer.customer.name, - onFieldSubmitted: (input) => customerChangeModel.customer.setName(input) + initialValue: customerChangingViewModel.customer.customer.name, + onFieldSubmitted: (input) => customerChangingViewModel.customer.setName(input) ) ) ], @@ -163,8 +164,8 @@ class _CustomerModifyPageState extends State { labelText: AppLocalizations.of(context).translate('First Name'), ), keyboardType: TextInputType.emailAddress, - initialValue: customerChangeModel.customer.customer.firstname, - onFieldSubmitted: (input) => customerChangeModel.customer.setFirstName(input) + initialValue: customerChangingViewModel.customer.customer.firstname, + onFieldSubmitted: (input) => customerChangingViewModel.customer.setFirstName(input) ) ) ], @@ -186,8 +187,8 @@ class _CustomerModifyPageState extends State { inputFormatters: [ WhitelistingTextInputFormatter.digitsOnly ], - initialValue: customerChangeModel.customer.customer.birthYear.toString(), - onFieldSubmitted: (input) => customerChangeModel.customer.setBirthYear(int.parse(input)) + initialValue: customerChangingViewModel.customer.customer.birthYear.toString(), + onFieldSubmitted: (input) => customerChangingViewModel.customer.setBirthYear(int.parse(input)) ) ) ], @@ -208,9 +209,9 @@ class _CustomerModifyPageState extends State { inputFormatters: [ WhitelistingTextInputFormatter.digitsOnly ], - initialValue: customerChangeModel.customer.customer.weight.toString(), + initialValue: customerChangingViewModel.customer.customer.weight.toString(), keyboardType: TextInputType.number, - onFieldSubmitted: (input) => customerChangeModel.customer.setWeight(int.parse(input)), + onFieldSubmitted: (input) => customerChangingViewModel.customer.setWeight(int.parse(input)), ) ) ], @@ -236,7 +237,7 @@ class _CustomerModifyPageState extends State { onChanged:(GenderItem gender) => { setState(() { selectedGender = gender; - customerChangeModel.customer.setSex(gender.dbValue); + customerChangingViewModel.customer.setSex(gender.dbValue); print ("Gender " + gender.name); }) @@ -259,8 +260,8 @@ class _CustomerModifyPageState extends State { child: InkWell( child: Text(AppLocalizations.of(context).translate("Next"))), onPressed: () => { - customerChangeModel.saveCustomer(), - Navigator.of(context).pushNamed("customerGoalPage", arguments: customerChangeModel) + customerChangingViewModel.saveCustomer(), + Navigator.of(context).pushNamed("customerGoalPage", arguments: customerChangingViewModel) }, ) ) diff --git a/lib/view/customer_welcome_page.dart b/lib/view/customer_welcome_page.dart index d00312b..f4cfa07 100644 --- a/lib/view/customer_welcome_page.dart +++ b/lib/view/customer_welcome_page.dart @@ -1,5 +1,4 @@ import 'package:aitrainer_app/localization/app_localization.dart'; -import 'package:aitrainer_app/viewmodel/customer_changing_view_model.dart'; import 'package:flutter/material.dart'; // ignore: must_be_immutable @@ -12,16 +11,9 @@ class CustomerWelcomePage extends StatefulWidget{ } } -class GenderItem { - GenderItem(this.dbValue,this.name); - final String dbValue; - String name; -} - class _CustomerWelcomePageState extends State { @override Widget build(BuildContext context) { - final CustomerChangingViewModel changingViewModel = ModalRoute.of(context).settings.arguments; return Scaffold( appBar: AppBar( @@ -62,7 +54,7 @@ class _CustomerWelcomePageState extends State { onPressed: () => { Navigator.of(context).pop(), - Navigator.of(context).pushNamed("home", arguments: changingViewModel) + Navigator.of(context).pushNamed("home") }, ) ], diff --git a/lib/view/login.dart b/lib/view/login.dart index fd7383f..0136261 100644 --- a/lib/view/login.dart +++ b/lib/view/login.dart @@ -1,6 +1,7 @@ import 'package:aitrainer_app/localization/app_localization.dart'; import 'package:aitrainer_app/model/auth.dart'; -import 'package:aitrainer_app/viewmodel/exercise_changing_view_model.dart'; +import 'package:aitrainer_app/view/account.dart'; +import 'package:aitrainer_app/viewmodel/customer_changing_view_model.dart'; import 'package:aitrainer_app/viewmodel/user_changing_view_model.dart'; import 'package:aitrainer_app/viewmodel/user_view_model.dart'; import 'package:flutter/material.dart'; @@ -12,7 +13,8 @@ class LoginPage extends StatefulWidget{ _LoginPageState createState() => _LoginPageState(); } -class _LoginPageState extends State { +class _LoginPageState extends State { + final GlobalKey _scaffoldKey = new GlobalKey(); final UserViewModel user = UserViewModel(); final bool _obscureText = true; final _formKey = GlobalKey(); @@ -20,10 +22,13 @@ class _LoginPageState extends State { @override Widget build(BuildContext context) { UserChangingViewModel model = UserChangingViewModel(user); - ExerciseChangingViewModel exerciseModel = Provider.of(context, listen: false); + CustomerChangingViewModel customerChangingViewModel = Provider.of(context, listen: false); user.createNew(); + Future customer; + final State stateAccount = ModalRoute.of(context).settings.arguments; return Scaffold( + key: _scaffoldKey, body: Container( decoration: BoxDecoration( image: DecorationImage( @@ -100,10 +105,17 @@ class _LoginPageState extends State { { if (_formKey.currentState.validate()) { model = UserChangingViewModel(user), - model.getUser(), - exerciseModel.setCustomer( - Auth().userLoggedIn), - Navigator.pop(context), + model.getUser().then((_) => + { + if ( stateAccount != null ) { + stateAccount.setState(() { + print("update account"); + }), + }, + customerChangingViewModel.customer.setCustomer(Auth().userLoggedIn), + Navigator.pop(context), + }).catchError(( error, stackTrace )=> showInSnackBar(error) + ), } }), ]), @@ -136,4 +148,15 @@ class _LoginPageState extends State { ) ); } + + void showInSnackBar(String error) { + _scaffoldKey.currentState.showSnackBar( + SnackBar( + backgroundColor: Colors.orange, + content: Text( + AppLocalizations.of(context).translate("Customer does not exist or the password is wrong") + " " + error, + style: TextStyle(color: Colors.white)) + ) + ); + } } \ No newline at end of file diff --git a/lib/view/menu_page.dart b/lib/view/menu_page.dart index 9859e95..d8b5aa2 100644 --- a/lib/view/menu_page.dart +++ b/lib/view/menu_page.dart @@ -111,7 +111,13 @@ class _MenuPageState extends State { model.setCustomer(Auth().userLoggedIn), if ( Auth().userLoggedIn == null ) { Scaffold.of(context) - . showSnackBar(SnackBar(content: Text('Please log in'))) + . showSnackBar( + SnackBar( + backgroundColor: Colors.orange, + content: Text( + AppLocalizations.of(context).translate('Please log in'), + style: TextStyle(color: Colors.white)) + )) } else { Navigator.of(context).pushNamed('exerciseNewPage'), } diff --git a/lib/view/registration.dart b/lib/view/registration.dart index a5b40e0..70572e8 100644 --- a/lib/view/registration.dart +++ b/lib/view/registration.dart @@ -1,16 +1,19 @@ import 'package:aitrainer_app/localization/app_localization.dart'; +import 'package:aitrainer_app/model/auth.dart'; +import 'package:aitrainer_app/viewmodel/customer_changing_view_model.dart'; import 'package:aitrainer_app/viewmodel/user_changing_view_model.dart'; import 'package:aitrainer_app/viewmodel/user_view_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; -import 'package:aitrainer_app/widgets/nav_drawer.dart'; +import 'package:provider/provider.dart'; class RegistrationPage extends StatefulWidget{ _RegistrationPageState createState() => _RegistrationPageState(); } -class _RegistrationPageState extends State { +class _RegistrationPageState extends State { + final GlobalKey _scaffoldKey = new GlobalKey(); final UserViewModel user = UserViewModel(); bool _obscureText = true; @@ -19,10 +22,11 @@ class _RegistrationPageState extends State { @override Widget build(BuildContext context) { UserChangingViewModel model = UserChangingViewModel(user); + CustomerChangingViewModel customerChangingViewModel = Provider.of(context, listen: false); user.createNew(); return Scaffold( - + key: _scaffoldKey, body: Container( decoration: BoxDecoration( image: DecorationImage( @@ -91,8 +95,13 @@ class _RegistrationPageState extends State { onPressed:() => { if (_formKey.currentState.validate()) { model = UserChangingViewModel(user), - model.addUser(), - Navigator.of(context).pushNamed("customerModifyPage",) + model.addUser().then((_) => + { + Navigator.of(context).pushNamed("customerModifyPage",), + customerChangingViewModel.customer.setCustomer(Auth().userLoggedIn), + }).catchError(( error, stackTrace )=> showInSnackBar() + ), + } }), ]), @@ -119,4 +128,15 @@ class _RegistrationPageState extends State { ); } + + void showInSnackBar() { + _scaffoldKey.currentState.showSnackBar( + SnackBar( + backgroundColor: Colors.orange, + content: Text( + AppLocalizations.of(context).translate("Customer exists"), + style: TextStyle(color: Colors.white)) + ) + ); + } } \ No newline at end of file diff --git a/lib/viewmodel/customer_view_model.dart b/lib/viewmodel/customer_view_model.dart index 1ecd113..4e8546c 100644 --- a/lib/viewmodel/customer_view_model.dart +++ b/lib/viewmodel/customer_view_model.dart @@ -19,7 +19,19 @@ class CustomerViewModel { } int get birthYear { - return this.birthYear; + return this.customer.birthYear; + } + + String get goal { + return this.customer.goal; + } + + String get fitnessLevel { + return this.customer.fitnessLevel; + } + + String get bodyType { + return this.customer.bodyType; } setName(String name) { @@ -69,4 +81,8 @@ class CustomerViewModel { Customer getCustomer() { return this.customer; } + + void setCustomer ( Customer customer ) { + this.customer = customer; + } } diff --git a/lib/widgets/bottom_nav.dart b/lib/widgets/bottom_nav.dart index 7008318..31099fd 100644 --- a/lib/widgets/bottom_nav.dart +++ b/lib/widgets/bottom_nav.dart @@ -42,7 +42,7 @@ class BottomNavigator { break; case 1: - throw new StateError('This is a Dart exception on event.'); + //throw new StateError('This is a Dart exception on event.'); break; case 2: diff --git a/pubspec.lock b/pubspec.lock index ed1bbf3..9703a0e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -127,6 +127,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "5.1.0" + firebase_messaging: + dependency: "direct main" + description: + name: firebase_messaging + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.16" flutter: dependency: "direct main" description: flutter @@ -151,6 +158,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.7.5" + flutter_local_notifications: + dependency: "direct main" + description: + name: flutter_local_notifications + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + flutter_local_notifications_platform_interface: + dependency: transitive + description: + name: flutter_local_notifications_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" flutter_localizations: dependency: "direct main" description: flutter @@ -334,6 +355,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.2.1" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" pool: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 73fc99a..59d94a6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 +version: 1.1.0+1 environment: sdk: ">=2.7.0 <3.0.0" @@ -29,6 +29,8 @@ dependencies: cupertino_icons: ^0.1.3 devicelocale: ^0.3.1 sentry: ^3.0.1 + firebase_messaging: ^6.0.16 + flutter_local_notifications: 1.1.1 mockito: ^4.1.1