Bläddra i källkod

Navigation in SignUp form

David Sokol Zelazko 3 år sedan
förälder
incheckning
ce9c773cf6

BIN
app/assets/communicate.png


BIN
app/assets/hello.png


BIN
app/assets/id-card.png


BIN
app/assets/teamlogo.png


BIN
app/assets/user.png


+ 1 - 0
app/ios/Flutter/Debug.xcconfig

@@ -1 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
 #include "Generated.xcconfig"

+ 1 - 0
app/ios/Flutter/Release.xcconfig

@@ -1 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
 #include "Generated.xcconfig"

+ 41 - 0
app/ios/Podfile

@@ -0,0 +1,41 @@
+# Uncomment this line to define a global platform for your project
+# platform :ios, '9.0'
+
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+
+project 'Runner', {
+  'Debug' => :debug,
+  'Profile' => :release,
+  'Release' => :release,
+}
+
+def flutter_root
+  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
+  unless File.exist?(generated_xcode_build_settings_path)
+    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
+  end
+
+  File.foreach(generated_xcode_build_settings_path) do |line|
+    matches = line.match(/FLUTTER_ROOT\=(.*)/)
+    return matches[1].strip if matches
+  end
+  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
+end
+
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
+target 'Runner' do
+  use_frameworks!
+  use_modular_headers!
+
+  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
+end
+
+post_install do |installer|
+  installer.pods_project.targets.each do |target|
+    flutter_additional_ios_build_settings(target)
+  end
+end

+ 65 - 0
app/ios/Podfile.lock

@@ -0,0 +1,65 @@
+PODS:
+  - Firebase/CoreOnly (8.15.0):
+    - FirebaseCore (= 8.15.0)
+  - firebase_core (1.15.0):
+    - Firebase/CoreOnly (= 8.15.0)
+    - Flutter
+  - FirebaseCore (8.15.0):
+    - FirebaseCoreDiagnostics (~> 8.0)
+    - GoogleUtilities/Environment (~> 7.7)
+    - GoogleUtilities/Logger (~> 7.7)
+  - FirebaseCoreDiagnostics (8.15.0):
+    - GoogleDataTransport (~> 9.1)
+    - GoogleUtilities/Environment (~> 7.7)
+    - GoogleUtilities/Logger (~> 7.7)
+    - nanopb (~> 2.30908.0)
+  - Flutter (1.0.0)
+  - GoogleDataTransport (9.1.4):
+    - GoogleUtilities/Environment (~> 7.7)
+    - nanopb (< 2.30910.0, >= 2.30908.0)
+    - PromisesObjC (< 3.0, >= 1.2)
+  - GoogleUtilities/Environment (7.7.0):
+    - PromisesObjC (< 3.0, >= 1.2)
+  - GoogleUtilities/Logger (7.7.0):
+    - GoogleUtilities/Environment
+  - nanopb (2.30908.0):
+    - nanopb/decode (= 2.30908.0)
+    - nanopb/encode (= 2.30908.0)
+  - nanopb/decode (2.30908.0)
+  - nanopb/encode (2.30908.0)
+  - PromisesObjC (2.1.0)
+
+DEPENDENCIES:
+  - firebase_core (from `.symlinks/plugins/firebase_core/ios`)
+  - Flutter (from `Flutter`)
+
+SPEC REPOS:
+  trunk:
+    - Firebase
+    - FirebaseCore
+    - FirebaseCoreDiagnostics
+    - GoogleDataTransport
+    - GoogleUtilities
+    - nanopb
+    - PromisesObjC
+
+EXTERNAL SOURCES:
+  firebase_core:
+    :path: ".symlinks/plugins/firebase_core/ios"
+  Flutter:
+    :path: Flutter
+
+SPEC CHECKSUMS:
+  Firebase: 5f8193dff4b5b7c5d5ef72ae54bb76c08e2b841d
+  firebase_core: fa19947d8db1c0a62d8872c45039b3113829cd2e
+  FirebaseCore: 5743c5785c074a794d35f2fff7ecc254a91e08b1
+  FirebaseCoreDiagnostics: 92e07a649aeb66352b319d43bdd2ee3942af84cb
+  Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
+  GoogleDataTransport: 5fffe35792f8b96ec8d6775f5eccd83c998d5a3b
+  GoogleUtilities: e0913149f6b0625b553d70dae12b49fc62914fd1
+  nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
+  PromisesObjC: 99b6f43f9e1044bd87a95a60beff28c2c44ddb72
+
+PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
+
+COCOAPODS: 1.11.3

+ 68 - 0
app/ios/Runner.xcodeproj/project.pbxproj

@@ -13,6 +13,7 @@
 		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 */; };
+		AEC8ADA59409895D03733F7A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14A3BA377ED9242B31B10B26 /* Pods_Runner.framework */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXCopyFilesBuildPhase section */
@@ -31,6 +32,8 @@
 /* Begin PBXFileReference section */
 		1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
 		1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
+		14A3BA377ED9242B31B10B26 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		1B1E3B130A92F3A6CC5D4508 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
 		3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
 		74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
 		74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@@ -42,6 +45,8 @@
 		97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
 		97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
 		97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+		A936D2F453AE9AAA9478C7D6 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
+		E88252A05C17DBF07881EBAB /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -49,12 +54,32 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				AEC8ADA59409895D03733F7A /* Pods_Runner.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
+		01C38152DAD16C1BC69EF05C /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				14A3BA377ED9242B31B10B26 /* Pods_Runner.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		14F2D831B115D42B82C7A7E1 /* Pods */ = {
+			isa = PBXGroup;
+			children = (
+				A936D2F453AE9AAA9478C7D6 /* Pods-Runner.debug.xcconfig */,
+				E88252A05C17DBF07881EBAB /* Pods-Runner.release.xcconfig */,
+				1B1E3B130A92F3A6CC5D4508 /* Pods-Runner.profile.xcconfig */,
+			);
+			name = Pods;
+			path = Pods;
+			sourceTree = "<group>";
+		};
 		9740EEB11CF90186004384FC /* Flutter */ = {
 			isa = PBXGroup;
 			children = (
@@ -72,6 +97,8 @@
 				9740EEB11CF90186004384FC /* Flutter */,
 				97C146F01CF9000F007C117D /* Runner */,
 				97C146EF1CF9000F007C117D /* Products */,
+				14F2D831B115D42B82C7A7E1 /* Pods */,
+				01C38152DAD16C1BC69EF05C /* Frameworks */,
 			);
 			sourceTree = "<group>";
 		};
@@ -105,12 +132,14 @@
 			isa = PBXNativeTarget;
 			buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
 			buildPhases = (
+				921990EA0522D53EB760F73A /* [CP] Check Pods Manifest.lock */,
 				9740EEB61CF901F6004384FC /* Run Script */,
 				97C146EA1CF9000F007C117D /* Sources */,
 				97C146EB1CF9000F007C117D /* Frameworks */,
 				97C146EC1CF9000F007C117D /* Resources */,
 				9705A1C41CF9048500538489 /* Embed Frameworks */,
 				3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+				A39D21FDDD6C92E2BC5C1DF1 /* [CP] Embed Pods Frameworks */,
 			);
 			buildRules = (
 			);
@@ -183,6 +212,28 @@
 			shellPath = /bin/sh;
 			shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
 		};
+		921990EA0522D53EB760F73A /* [CP] Check Pods Manifest.lock */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputFileListPaths = (
+			);
+			inputPaths = (
+				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+				"${PODS_ROOT}/Manifest.lock",
+			);
+			name = "[CP] Check Pods Manifest.lock";
+			outputFileListPaths = (
+			);
+			outputPaths = (
+				"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+			showEnvVarsInLog = 0;
+		};
 		9740EEB61CF901F6004384FC /* Run Script */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
@@ -197,6 +248,23 @@
 			shellPath = /bin/sh;
 			shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
 		};
+		A39D21FDDD6C92E2BC5C1DF1 /* [CP] Embed Pods Frameworks */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputFileListPaths = (
+				"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
+			);
+			name = "[CP] Embed Pods Frameworks";
+			outputFileListPaths = (
+				"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
+			showEnvVarsInLog = 0;
+		};
 /* End PBXShellScriptBuildPhase section */
 
 /* Begin PBXSourcesBuildPhase section */

+ 3 - 0
app/ios/Runner.xcworkspace/contents.xcworkspacedata

@@ -4,4 +4,7 @@
    <FileRef
       location = "group:Runner.xcodeproj">
    </FileRef>
+   <FileRef
+      location = "group:Pods/Pods.xcodeproj">
+   </FileRef>
 </Workspace>

+ 255 - 0
app/lib/SignupPage.dart

@@ -0,0 +1,255 @@
+import 'package:flutter/material.dart';
+
+class SignupPage extends StatefulWidget {
+  const SignupPage({Key? key}) : super(key: key);
+
+  @override
+  State<SignupPage> createState() => _SignupPageState();
+}
+
+class _SignupPageState extends State<SignupPage> {
+  int _pageIndex = 0;
+  List<Widget> forms = [SignupForm1(title: '',), SignupForm2(title: '',), SignupForm3(title: '',)];
+
+  void _updatePageIndex(int newPageIndex) {
+    if(newPageIndex == -1) {
+      Navigator.pushNamed(context, '/');
+    } else if (newPageIndex == 3) {
+      //autentification
+      newPageIndex = 2;
+    } else {
+      setState(() {
+        _pageIndex = newPageIndex;
+      });
+    }
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      floatingActionButton: Row(
+        mainAxisAlignment: MainAxisAlignment.end,
+        children: [
+          FloatingActionButton(child: Icon(Icons.navigate_before_outlined),
+              onPressed: () => _updatePageIndex(_pageIndex - 1)
+          ),
+          SizedBox(
+            width: 25,
+          ),
+
+          FloatingActionButton(child: Icon(Icons.navigate_next_outlined),
+              onPressed: () => _updatePageIndex(_pageIndex +1 ))
+        ],
+      ),
+      body: Center(child: forms[_pageIndex]),
+    );
+  }
+}
+
+class SignupForm1 extends StatefulWidget {
+  const SignupForm1({Key? key, required this.title}) : super(key: key);
+  final String title;
+
+  @override
+  //_RegisterScreen createState() => _RegisterScreen();
+  State<SignupForm1> createState() => _SignupForm1();
+}
+
+class _SignupForm1 extends State<SignupForm1> {
+  DateTime? _dateTime;
+  String? _dateString;
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      appBar: AppBar(
+        title: const Text('Register Screen'),
+      ),
+      body: Center(
+          child: SizedBox(
+            width: 300,
+            child: Column(children: <Widget>[
+              const SizedBox(height: 30),
+              Text(
+                'Personal Information',
+                style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
+              ),
+              const SizedBox(height: 30),
+              Image.asset(
+                'assets/user.png',
+                width: 150,
+              ),
+              const SizedBox(height: 30),
+              TextField(
+                decoration: InputDecoration(
+                  hintText: 'Name',
+                ),
+              ),
+              const SizedBox(height: 10),
+              TextField(
+                decoration: InputDecoration(
+                  hintText: 'Surname',
+                ),
+              ),
+
+              const SizedBox(height: 10),
+              Row(children: <Widget>[
+                Text(_dateString == null
+                    ? 'Select birthday date :'
+                    : _dateString.toString()),
+                const SizedBox(width: 49),
+                ElevatedButton(
+                  onPressed: () {
+                    showDatePicker(
+                        context: context,
+                        initialDate: DateTime.now(),
+                        firstDate: DateTime(1900),
+                        lastDate: DateTime(2222))
+                        .then((date) {
+                      setState(() {
+                        _dateTime = date!;
+                        _dateString = "${date.day}/${date.month}/${date.year}";
+                      });
+                    });
+                  },
+                  child: const Text('Select date'),
+                ),
+              ]),
+              const SizedBox(height: 10),
+
+            ]),
+          )),
+    );
+  }
+}
+
+class SignupForm2 extends StatefulWidget {
+  const SignupForm2({Key? key, required this.title}) : super(key: key);
+  final String title;
+
+  @override
+  //_RegisterScreen createState() => _RegisterScreen();
+  State<SignupForm2> createState() => _SignupForm2();
+}
+
+class _SignupForm2 extends State<SignupForm2> {
+  bool isChecked = false;
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      appBar: AppBar(
+        title: const Text('Register Screen'),
+      ),
+      body: Center(
+          child: SizedBox(
+            width: 300,
+            child: Column(children: <Widget>[
+              const SizedBox(height: 30),
+              Text(
+                'Contact Details',
+                style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
+              ),
+              const SizedBox(height: 30),
+              Image.asset(
+                'assets/communicate.png',
+                width: 150,
+              ),
+              const SizedBox(height: 30),
+              TextField(
+                decoration: InputDecoration(
+                  hintText: 'Mail',
+                ),
+              ),
+              const SizedBox(height: 10),
+              TextField(
+                decoration: InputDecoration(
+                  hintText: 'Phone Number',
+                ),
+              ),
+              const SizedBox(height: 10),
+              TextField(
+                decoration: InputDecoration(
+                  hintText: 'Home Adress..',
+                ),
+              ),
+              const SizedBox(height: 10),
+              Row(children: <Widget>[
+                Text('Anonymous'),
+                Checkbox(
+
+                  checkColor: Colors.white,
+                  value: isChecked,
+                  onChanged: (bool? value) {
+                    setState(() {
+                      isChecked = value!;
+                    });
+                  },),
+              ]),
+
+              const SizedBox(height: 10),
+
+
+            ]),
+          )),
+    );
+  }
+
+}
+
+class SignupForm3 extends StatefulWidget {
+  const SignupForm3({Key? key, required this.title}) : super(key: key);
+  final String title;
+
+  @override
+  //_RegisterScreen createState() => _RegisterScreen();
+  State<SignupForm3> createState() => _SignupForm3();
+}
+
+class _SignupForm3 extends State<SignupForm3> {
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      appBar: AppBar(
+        title: const Text('Register Screen'),
+      ),
+      body: Center(
+          child: SizedBox(
+            width: 300,
+            child: Column(children: <Widget>[
+              const SizedBox(height: 30),
+              Text(
+                'User details',
+                style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
+              ),
+              const SizedBox(height: 30),
+              Image.asset(
+                'assets/id-card.png',
+                width: 150,
+              ),
+              const SizedBox(height: 30),
+              TextField(
+                decoration: InputDecoration(
+                  hintText: 'Username',
+                ),
+              ),
+              const SizedBox(height: 10),
+              TextField(
+                decoration: InputDecoration(
+                  hintText: 'Password',
+                ),
+              ),
+              const SizedBox(height: 10),
+              TextField(
+                decoration: InputDecoration(
+                  hintText: 'Repeat password',
+                ),
+              ),
+              const SizedBox(height: 10),
+
+            ]),
+          )),
+    );
+  }
+
+}

+ 59 - 0
app/lib/logIn.dart

@@ -0,0 +1,59 @@
+import 'package:flutter/material.dart';
+
+class LogIn extends StatefulWidget {
+  const LogIn({Key? key, required this.title}) : super(key: key);
+  final String title;
+
+  @override
+  //_RegisterScreen createState() => _RegisterScreen();
+  State<LogIn> createState() => _LogIn();
+}
+
+class _LogIn extends State<LogIn> {
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      appBar: AppBar(
+        title: const Text('Login Screen'),
+      ),
+      body: Center(
+          child: SizedBox(
+            width: 300,
+            child: Column(children: <Widget>[
+              const SizedBox(height: 30),
+              Text(
+                'Welcome back!',
+                style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
+              ),
+              const SizedBox(height: 30),
+              Image.asset(
+                'assets/hello.png',
+                width: 150,
+              ),
+              const SizedBox(height: 30),
+              TextField(
+                decoration: InputDecoration(
+                  hintText: 'Mail or mobile phone',
+                ),
+              ),
+              const SizedBox(height: 10),
+              TextField(
+                decoration: InputDecoration(
+                  hintText: 'Password',
+                ),
+              ),
+              const SizedBox(height: 10),
+              ElevatedButton(
+                onPressed: () {
+
+                },
+                child: const Text('Log In'),
+              ),
+
+
+            ]),
+          )),
+    );
+  }
+}

+ 7 - 363
app/lib/main.dart

@@ -1,12 +1,11 @@
 import 'package:firebase_core/firebase_core.dart';
 import 'package:flutter/material.dart';
-import 'package:latlong2/latlong.dart';
-import 'package:physigo/exercises/exercises_page.dart';
-import 'package:physigo/friends/friends_page.dart';
-import 'navigation/navigation_page.dart';
 
 import 'firebase_options.dart';
 import 'push_notifications_initializer.dart';
+import 'package:physigo/logIn.dart';
+import 'package:physigo/SignupPage.dart';
+import 'package:physigo/welcomeScreen.dart';
 
 void main() async {
   WidgetsFlutterBinding.ensureInitialized();
@@ -29,368 +28,13 @@ class PhysiGo extends StatelessWidget {
       ),
       initialRoute: '/',
       routes: {
-        '/': (context) => MyHomePage(
-              title: '',
-            ),
-        '/register': (context) => RegisterScreen(
-              title: '',
-            ),
-        '/register2': (context) => RegisterScreen2(title: ''),
-        '/register3': (context) => RegisterScreen3(title: ''),
+        '/': (context) => MyHomePage(title: '',),
+        '/register': (context) => SignupPage(),
+        //'/register2': (context) => RegisterScreen2(title: ''),
+        //'/register3': (context) => RegisterScreen3(title: ''),
         '/login': (context) => LogIn(title: '')
       },
       //home: const MyHomePage(title: 'Flutter Demo Home Page'),
     );
   }
 }
-
-class MyHomePage extends StatefulWidget {
-  const MyHomePage({Key? key, required this.title}) : super(key: key);
-  final String title;
-
-  @override
-  State<MyHomePage> createState() => _MyHomePageState();
-}
-
-class _MyHomePageState extends State<MyHomePage> {
-  @override
-  Widget build(BuildContext context) {
-    return SafeArea(
-      child: Scaffold(
-        body: Column(
-          mainAxisAlignment: MainAxisAlignment.center,
-          children: [
-            Center(
-              child: TextButton(
-                  onPressed: () {
-                    Navigator.push(
-                      context,
-                      MaterialPageRoute(
-                        // Example on how to use NavigationPage
-                        builder: (context) => NavigationPage(
-                          destination: LatLng(51.78036111980833, 19.451262207821234),
-                        ),
-                      ),
-                    );
-                  },
-                  child: const Text('Navigation')),
-            ),
-            Center(
-              child: TextButton(
-                onPressed: () {
-                  Navigator.push(
-                    context,
-                    MaterialPageRoute(
-                      builder: (context) => const ExercisesPage(),
-                    ),
-                  );
-                },
-                child: const Text('Exercises'),
-              ),
-            ),
-            Center(
-              child: TextButton(
-                onPressed: () {
-                  Navigator.push(
-                    context,
-                    MaterialPageRoute(
-                      builder: (context) => const FriendsPage(),
-                    ),
-                  );
-                },
-                child: const Text('Friends'),
-              ),
-            ),
-            const SizedBox(height: 30),
-            Image.asset(
-              'assets/teamlogo.png',
-              width: 260,
-            ),
-            const SizedBox(height: 30),
-            ElevatedButton(
-              // Within the `FirstScreen` widget
-              onPressed: () {
-                // Navigate to the second screen using a named route.
-                Navigator.pushNamed(context, '/register');
-              },
-              child: Text('Register'),
-            ),
-            ElevatedButton(
-              onPressed: () {
-                Navigator.pushNamed(context, '/login');
-              },
-              child: const Text('Log In'),
-            )
-          ],
-        ),
-      ),
-    );
-  }
-}
-
-class RegisterScreen extends StatefulWidget {
-  const RegisterScreen({Key? key, required this.title}) : super(key: key);
-  final String title;
-
-  @override
-  //_RegisterScreen createState() => _RegisterScreen();
-  State<RegisterScreen> createState() => _RegisterScreen();
-}
-
-class _RegisterScreen extends State<RegisterScreen> {
-  DateTime? _dateTime;
-  String? _dateString;
-
-  @override
-  Widget build(BuildContext context) {
-    return Scaffold(
-      appBar: AppBar(
-        title: const Text('Register Screen'),
-      ),
-      body: Center(
-          child: SizedBox(
-        width: 300,
-        child: Column(children: <Widget>[
-          const SizedBox(height: 30),
-          Text(
-            'Personal Information',
-            style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
-          ),
-          const SizedBox(height: 30),
-          Image.asset(
-            'assets/user.png',
-            width: 150,
-          ),
-          const SizedBox(height: 30),
-          TextField(
-            decoration: InputDecoration(
-              hintText: 'Name',
-            ),
-          ),
-          const SizedBox(height: 10),
-          TextField(
-            decoration: InputDecoration(
-              hintText: 'Surname',
-            ),
-          ),
-          const SizedBox(height: 10),
-          Row(children: <Widget>[
-            Text(_dateString == null ? 'Select birthday date :' : _dateString.toString()),
-            const SizedBox(width: 49),
-            ElevatedButton(
-              onPressed: () {
-                showDatePicker(
-                        context: context,
-                        initialDate: DateTime.now(),
-                        firstDate: DateTime(1900),
-                        lastDate: DateTime(2222))
-                    .then((date) {
-                  setState(() {
-                    _dateTime = date!;
-                    _dateString = "${date.day}/${date.month}/${date.year}";
-                  });
-                });
-              },
-              child: const Text('Select date'),
-            ),
-          ]),
-          const SizedBox(height: 10),
-          ElevatedButton(
-            onPressed: () {
-              Navigator.pushNamed(context, '/register2');
-            },
-            child: const Text('Next Page'),
-          ),
-        ]),
-      )),
-    );
-  }
-}
-
-class RegisterScreen2 extends StatefulWidget {
-  const RegisterScreen2({Key? key, required this.title}) : super(key: key);
-  final String title;
-
-  @override
-  //_RegisterScreen createState() => _RegisterScreen();
-  State<RegisterScreen2> createState() => _RegisterScreen2();
-}
-
-class _RegisterScreen2 extends State<RegisterScreen2> {
-  bool isChecked = false;
-  @override
-  Widget build(BuildContext context) {
-    return Scaffold(
-      appBar: AppBar(
-        title: const Text('Register Screen'),
-      ),
-      body: Center(
-          child: SizedBox(
-        width: 300,
-        child: Column(children: <Widget>[
-          const SizedBox(height: 30),
-          Text(
-            'Contact Details',
-            style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
-          ),
-          const SizedBox(height: 30),
-          Image.asset(
-            'assets/communicate.png',
-            width: 150,
-          ),
-          const SizedBox(height: 30),
-          TextField(
-            decoration: InputDecoration(
-              hintText: 'Mail',
-            ),
-          ),
-          const SizedBox(height: 10),
-          TextField(
-            decoration: InputDecoration(
-              hintText: 'Phone Number',
-            ),
-          ),
-          const SizedBox(height: 10),
-          TextField(
-            decoration: InputDecoration(
-              hintText: 'Home Adress..',
-            ),
-          ),
-          const SizedBox(height: 10),
-          Row(children: <Widget>[
-            Text('Anonymous'),
-            Checkbox(
-              checkColor: Colors.white,
-              value: isChecked,
-              onChanged: (bool? value) {
-                setState(() {
-                  isChecked = value!;
-                });
-              },
-            ),
-          ]),
-          const SizedBox(height: 10),
-          ElevatedButton(
-            onPressed: () {
-              Navigator.pushNamed(context, '/register3');
-            },
-            child: const Text('Next Page'),
-          ),
-        ]),
-      )),
-    );
-  }
-}
-
-class RegisterScreen3 extends StatefulWidget {
-  const RegisterScreen3({Key? key, required this.title}) : super(key: key);
-  final String title;
-
-  @override
-  //_RegisterScreen createState() => _RegisterScreen();
-  State<RegisterScreen3> createState() => _RegisterScreen3();
-}
-
-class _RegisterScreen3 extends State<RegisterScreen3> {
-  @override
-  Widget build(BuildContext context) {
-    return Scaffold(
-      appBar: AppBar(
-        title: const Text('Register Screen'),
-      ),
-      body: Center(
-          child: SizedBox(
-        width: 300,
-        child: Column(children: <Widget>[
-          const SizedBox(height: 30),
-          Text(
-            'User details',
-            style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
-          ),
-          const SizedBox(height: 30),
-          Image.asset(
-            'assets/id-card.png',
-            width: 150,
-          ),
-          const SizedBox(height: 30),
-          TextField(
-            decoration: InputDecoration(
-              hintText: 'Username',
-            ),
-          ),
-          const SizedBox(height: 10),
-          TextField(
-            decoration: InputDecoration(
-              hintText: 'Password',
-            ),
-          ),
-          const SizedBox(height: 10),
-          TextField(
-            decoration: InputDecoration(
-              hintText: 'Repeat password',
-            ),
-          ),
-          const SizedBox(height: 10),
-          const SizedBox(height: 10),
-          ElevatedButton(
-            onPressed: () {},
-            child: const Text('Finish'),
-          ),
-        ]),
-      )),
-    );
-  }
-}
-
-class LogIn extends StatefulWidget {
-  const LogIn({Key? key, required this.title}) : super(key: key);
-  final String title;
-
-  @override
-  //_RegisterScreen createState() => _RegisterScreen();
-  State<LogIn> createState() => _LogIn();
-}
-
-class _LogIn extends State<LogIn> {
-  @override
-  Widget build(BuildContext context) {
-    return Scaffold(
-      appBar: AppBar(
-        title: const Text('Login Screen'),
-      ),
-      body: Center(
-          child: SizedBox(
-        width: 300,
-        child: Column(children: <Widget>[
-          const SizedBox(height: 30),
-          Text(
-            'Welcome back!',
-            style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
-          ),
-          const SizedBox(height: 30),
-          Image.asset(
-            'assets/hello.png',
-            width: 150,
-          ),
-          const SizedBox(height: 30),
-          TextField(
-            decoration: InputDecoration(
-              hintText: 'Mail or mobile phone',
-            ),
-          ),
-          const SizedBox(height: 10),
-          TextField(
-            decoration: InputDecoration(
-              hintText: 'Password',
-            ),
-          ),
-          const SizedBox(height: 10),
-          ElevatedButton(
-            onPressed: () {},
-            child: const Text('Log In'),
-          ),
-        ]),
-      )),
-    );
-  }
-}

+ 0 - 0
app/lib/test.dart


+ 48 - 0
app/lib/welcomeScreen.dart

@@ -0,0 +1,48 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter/widgets.dart';
+
+class MyHomePage extends StatefulWidget {
+  const MyHomePage({Key? key, required this.title}) : super(key: key);
+  final String title;
+
+  @override
+  State<MyHomePage> createState() => _MyHomePageState();
+}
+
+class _MyHomePageState extends State<MyHomePage> {
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      appBar: AppBar(
+        title: const Text('Welcome to PhysiGo'),
+      ),
+      body: Center(
+        child: Column(
+          children: <Widget>[
+            const SizedBox(height: 30),
+            Image.asset(
+              'assets/teamlogo.png',
+              width: 260,
+            ),
+            const SizedBox(height: 30),
+            ElevatedButton(
+              // Within the `FirstScreen` widget
+              onPressed: () {
+                // Navigate to the second screen using a named route.
+                Navigator.pushNamed(context, '/register');
+              },
+              child: Text('Register'),
+            ),
+            ElevatedButton(
+              onPressed: () {
+                Navigator.pushNamed(context, '/login');
+              },
+              child: const Text('Log In'),
+            )
+          ],
+        ),
+      ),
+    );
+  }
+}

+ 81 - 18
app/pubspec.lock

@@ -8,6 +8,20 @@ packages:
       url: "https://pub.dartlang.org"
     source: hosted
     version: "2.8.2"
+  awesome_notifications:
+    dependency: "direct main"
+    description:
+      name: awesome_notifications
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "0.6.21"
+  body_detection:
+    dependency: "direct main"
+    description:
+      name: body_detection
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "0.0.3"
   boolean_selector:
     dependency: transitive
     description:
@@ -78,48 +92,48 @@ packages:
       url: "https://pub.dartlang.org"
     source: hosted
     version: "1.2.0"
-  firebase_auth:
+  firebase_core:
     dependency: "direct main"
     description:
-      name: firebase_auth
+      name: firebase_core
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "3.3.18"
-  firebase_auth_platform_interface:
+    version: "1.17.0"
+  firebase_core_platform_interface:
     dependency: transitive
     description:
-      name: firebase_auth_platform_interface
+      name: firebase_core_platform_interface
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "6.2.6"
-  firebase_auth_web:
+    version: "4.4.0"
+  firebase_core_web:
     dependency: transitive
     description:
-      name: firebase_auth_web
+      name: firebase_core_web
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "3.3.15"
-  firebase_core:
+    version: "1.6.4"
+  firebase_messaging:
     dependency: "direct main"
     description:
-      name: firebase_core
+      name: firebase_messaging
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.17.0"
-  firebase_core_platform_interface:
+    version: "11.4.0"
+  firebase_messaging_platform_interface:
     dependency: transitive
     description:
-      name: firebase_core_platform_interface
+      name: firebase_messaging_platform_interface
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "4.4.0"
-  firebase_core_web:
+    version: "3.5.0"
+  firebase_messaging_web:
     dependency: transitive
     description:
-      name: firebase_core_web
+      name: firebase_messaging_web
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.6.4"
+    version: "2.4.0"
   flutter:
     dependency: "direct main"
     description: flutter
@@ -289,6 +303,48 @@ packages:
       url: "https://pub.dartlang.org"
     source: hosted
     version: "1.8.0"
+  permission_handler:
+    dependency: "direct main"
+    description:
+      name: permission_handler
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "9.2.0"
+  permission_handler_android:
+    dependency: transitive
+    description:
+      name: permission_handler_android
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "9.0.2+1"
+  permission_handler_apple:
+    dependency: transitive
+    description:
+      name: permission_handler_apple
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "9.0.4"
+  permission_handler_platform_interface:
+    dependency: transitive
+    description:
+      name: permission_handler_platform_interface
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "3.7.0"
+  permission_handler_windows:
+    dependency: transitive
+    description:
+      name: permission_handler_windows
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "0.1.0"
+  platform:
+    dependency: transitive
+    description:
+      name: platform
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "3.1.0"
   plugin_platform_interface:
     dependency: transitive
     description:
@@ -317,6 +373,13 @@ packages:
       url: "https://pub.dartlang.org"
     source: hosted
     version: "3.0.1+1"
+  rxdart:
+    dependency: "direct main"
+    description:
+      name: rxdart
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "0.27.3"
   sky_engine:
     dependency: transitive
     description: flutter

+ 6 - 0
app/pubspec.yaml

@@ -71,6 +71,12 @@ flutter:
   # assets:
   #   - images/a_dot_burr.jpeg
   #   - images/a_dot_ham.jpeg
+  assets:
+    - assets/teamlogo.png
+    - assets/user.png
+    - assets/communicate.png
+    - assets/id-card.png
+    - assets/hello.png
 
   # An image asset can refer to one or more resolution-specific "variants", see
   # https://flutter.dev/assets-and-images/#resolution-aware.