diff --git a/CodeHunters/.gitignore b/CodeHunters/.gitignore new file mode 100644 index 00000000..0fa6b675 --- /dev/null +++ b/CodeHunters/.gitignore @@ -0,0 +1,46 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/CodeHunters/.metadata b/CodeHunters/.metadata new file mode 100644 index 00000000..36a46146 --- /dev/null +++ b/CodeHunters/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: 63062a64432cce03315d6b5196fda7912866eb37 + channel: dev + +project_type: app diff --git a/CodeHunters/CodeHunters.docx b/CodeHunters/CodeHunters.docx new file mode 100644 index 00000000..084d75f2 Binary files /dev/null and b/CodeHunters/CodeHunters.docx differ diff --git a/CodeHunters/CodeHunters.pptx b/CodeHunters/CodeHunters.pptx new file mode 100644 index 00000000..5464689f Binary files /dev/null and b/CodeHunters/CodeHunters.pptx differ diff --git a/CodeHunters/README.md b/CodeHunters/README.md new file mode 100644 index 00000000..d114ea8c --- /dev/null +++ b/CodeHunters/README.md @@ -0,0 +1,16 @@ + Medical Assistant - MedAide + +Open the application using android studio. +Select the emulator or hardware device and run the application. + +In the first page, there is a provision for the user to login using an email id and password. +After login, the user will be directed to the home page where there are two icons. +The user can choose whether to create a profile or go on to the next screen. + +The user can create the profile by clicking the appropriate icon and entering the details and submitting that data. +The next page gives the users three options: + - search for hospitals + The user can search for hospitals near a particular location by entering the location, pressing OK and choosing the category from the given options. + - speed dial option + This will dial an emergency number(ambulance) + This facility allows users to store their medical reports diff --git a/CodeHunters/android/.gitignore b/CodeHunters/android/.gitignore new file mode 100644 index 00000000..0a741cb4 --- /dev/null +++ b/CodeHunters/android/.gitignore @@ -0,0 +1,11 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties diff --git a/CodeHunters/android/app/build.gradle b/CodeHunters/android/app/build.gradle new file mode 100644 index 00000000..ad54d145 --- /dev/null +++ b/CodeHunters/android/app/build.gradle @@ -0,0 +1,60 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion 30 + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.application.health_app" + minSdkVersion 23 + targetSdkVersion 30 + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} +apply plugin: 'com.google.gms.google-services' \ No newline at end of file diff --git a/CodeHunters/android/app/google-services.json b/CodeHunters/android/app/google-services.json new file mode 100644 index 00000000..177a79f8 --- /dev/null +++ b/CodeHunters/android/app/google-services.json @@ -0,0 +1,40 @@ +{ + "project_info": { + "project_number": "536918151183", + "project_id": "health-app-a669f", + "firebase_url": "https://health-app-a669f-default-rtdb.firebaseio.com", + "storage_bucket": "health-app-a669f.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:536918151183:android:5d46b0455999fd8347137a", + "android_client_info": { + "package_name": "com.application.health_app" + } + }, + "oauth_client": [ + { + "client_id": "536918151183-g1gi206nf1t731q2mc6uuoa414nemtal.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyCW2DmC4-XCV35C8uaDzv5xXL526PCGpyg" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "536918151183-g1gi206nf1t731q2mc6uuoa414nemtal.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/CodeHunters/android/app/src/debug/AndroidManifest.xml b/CodeHunters/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 00000000..a215540f --- /dev/null +++ b/CodeHunters/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/CodeHunters/android/app/src/main/AndroidManifest.xml b/CodeHunters/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..f8968482 --- /dev/null +++ b/CodeHunters/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + diff --git a/CodeHunters/android/app/src/main/kotlin/com/application/health_app/MainActivity.kt b/CodeHunters/android/app/src/main/kotlin/com/application/health_app/MainActivity.kt new file mode 100644 index 00000000..f8fcfb05 --- /dev/null +++ b/CodeHunters/android/app/src/main/kotlin/com/application/health_app/MainActivity.kt @@ -0,0 +1,6 @@ +package com.application.health_app + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/CodeHunters/android/app/src/main/res/drawable-v21/launch_background.xml b/CodeHunters/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 00000000..f74085f3 --- /dev/null +++ b/CodeHunters/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/CodeHunters/android/app/src/main/res/drawable/launch_background.xml b/CodeHunters/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 00000000..304732f8 --- /dev/null +++ b/CodeHunters/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/CodeHunters/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/CodeHunters/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..db77bb4b Binary files /dev/null and b/CodeHunters/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/CodeHunters/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/CodeHunters/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..17987b79 Binary files /dev/null and b/CodeHunters/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/CodeHunters/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/CodeHunters/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..09d43914 Binary files /dev/null and b/CodeHunters/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/CodeHunters/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/CodeHunters/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..d5f1c8d3 Binary files /dev/null and b/CodeHunters/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/CodeHunters/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/CodeHunters/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..4d6372ee Binary files /dev/null and b/CodeHunters/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/CodeHunters/android/app/src/main/res/values-night/styles.xml b/CodeHunters/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 00000000..449a9f93 --- /dev/null +++ b/CodeHunters/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/CodeHunters/android/app/src/main/res/values/styles.xml b/CodeHunters/android/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..d74aa35c --- /dev/null +++ b/CodeHunters/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/CodeHunters/android/app/src/profile/AndroidManifest.xml b/CodeHunters/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 00000000..a215540f --- /dev/null +++ b/CodeHunters/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/CodeHunters/android/build.gradle b/CodeHunters/android/build.gradle new file mode 100644 index 00000000..0fe17be5 --- /dev/null +++ b/CodeHunters/android/build.gradle @@ -0,0 +1,32 @@ +buildscript { + ext.kotlin_version = '1.3.50' + repositories { + google() + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:4.1.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath 'com.google.gms:google-services:4.0.1' + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/CodeHunters/android/gradle.properties b/CodeHunters/android/gradle.properties new file mode 100644 index 00000000..94adc3a3 --- /dev/null +++ b/CodeHunters/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/CodeHunters/android/gradle/wrapper/gradle-wrapper.properties b/CodeHunters/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..bc6a58af --- /dev/null +++ b/CodeHunters/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Jun 23 08:50:38 CEST 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/CodeHunters/android/settings.gradle b/CodeHunters/android/settings.gradle new file mode 100644 index 00000000..44e62bcf --- /dev/null +++ b/CodeHunters/android/settings.gradle @@ -0,0 +1,11 @@ +include ':app' + +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() + +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/CodeHunters/assets/fonts/Lobster-Regular.ttf b/CodeHunters/assets/fonts/Lobster-Regular.ttf new file mode 100644 index 00000000..921c7dde Binary files /dev/null and b/CodeHunters/assets/fonts/Lobster-Regular.ttf differ diff --git a/CodeHunters/assets/images/health1.jpeg b/CodeHunters/assets/images/health1.jpeg new file mode 100644 index 00000000..231ea169 Binary files /dev/null and b/CodeHunters/assets/images/health1.jpeg differ diff --git a/CodeHunters/assets/images/image2.jpg b/CodeHunters/assets/images/image2.jpg new file mode 100644 index 00000000..049cfb93 Binary files /dev/null and b/CodeHunters/assets/images/image2.jpg differ diff --git a/CodeHunters/integration_test/app_test.dart b/CodeHunters/integration_test/app_test.dart new file mode 100644 index 00000000..83889112 --- /dev/null +++ b/CodeHunters/integration_test/app_test.dart @@ -0,0 +1,36 @@ +// This is a basic Flutter integration test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility that Flutter provides. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; + +import 'package:health_app/main.dart' as app; + +void main() => run(_testMain); + +void _testMain() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + app.main(); + + // Trigger a frame. + await tester.pumpAndSettle(); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/CodeHunters/integration_test/driver.dart b/CodeHunters/integration_test/driver.dart new file mode 100644 index 00000000..a03bca08 --- /dev/null +++ b/CodeHunters/integration_test/driver.dart @@ -0,0 +1,8 @@ +// This file is provided as a convenience for running integration tests via the +// flutter drive command. +// +// flutter drive --driver integration_test/driver.dart --target integration_test/app_test.dart + +import 'package:integration_test/integration_test_driver.dart'; + +Future main() => integrationDriver(); diff --git a/CodeHunters/ios/.gitignore b/CodeHunters/ios/.gitignore new file mode 100644 index 00000000..e96ef602 --- /dev/null +++ b/CodeHunters/ios/.gitignore @@ -0,0 +1,32 @@ +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/CodeHunters/ios/Flutter/AppFrameworkInfo.plist b/CodeHunters/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 00000000..9367d483 --- /dev/null +++ b/CodeHunters/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 8.0 + + diff --git a/CodeHunters/ios/Flutter/Debug.xcconfig b/CodeHunters/ios/Flutter/Debug.xcconfig new file mode 100644 index 00000000..592ceee8 --- /dev/null +++ b/CodeHunters/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/CodeHunters/ios/Flutter/Release.xcconfig b/CodeHunters/ios/Flutter/Release.xcconfig new file mode 100644 index 00000000..592ceee8 --- /dev/null +++ b/CodeHunters/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/CodeHunters/ios/Runner.xcodeproj/project.pbxproj b/CodeHunters/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..c7047a01 --- /dev/null +++ b/CodeHunters/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,471 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.application.healthApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.application.healthApp; + 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; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.application.healthApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/CodeHunters/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/CodeHunters/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..1d526a16 --- /dev/null +++ b/CodeHunters/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/CodeHunters/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/CodeHunters/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/CodeHunters/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/CodeHunters/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/CodeHunters/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..f9b0d7c5 --- /dev/null +++ b/CodeHunters/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/CodeHunters/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/CodeHunters/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 00000000..a28140cf --- /dev/null +++ b/CodeHunters/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CodeHunters/ios/Runner.xcworkspace/contents.xcworkspacedata b/CodeHunters/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..1d526a16 --- /dev/null +++ b/CodeHunters/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/CodeHunters/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/CodeHunters/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/CodeHunters/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/CodeHunters/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/CodeHunters/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..f9b0d7c5 --- /dev/null +++ b/CodeHunters/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/CodeHunters/ios/Runner/AppDelegate.swift b/CodeHunters/ios/Runner/AppDelegate.swift new file mode 100644 index 00000000..70693e4a --- /dev/null +++ b/CodeHunters/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..d36b1fab --- /dev/null +++ b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 00000000..dc9ada47 Binary files /dev/null and b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 00000000..28c6bf03 Binary files /dev/null and b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 00000000..2ccbfd96 Binary files /dev/null and b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 00000000..f091b6b0 Binary files /dev/null and b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 00000000..4cde1211 Binary files /dev/null and b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 00000000..d0ef06e7 Binary files /dev/null and b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 00000000..dcdc2306 Binary files /dev/null and b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 00000000..2ccbfd96 Binary files /dev/null and b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 00000000..c8f9ed8f Binary files /dev/null and b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 00000000..a6d6b860 Binary files /dev/null and b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 00000000..a6d6b860 Binary files /dev/null and b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 00000000..75b2d164 Binary files /dev/null and b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 00000000..c4df70d3 Binary files /dev/null and b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 00000000..6a84f41e Binary files /dev/null and b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 00000000..d0e1f585 Binary files /dev/null and b/CodeHunters/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/CodeHunters/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/CodeHunters/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 00000000..0bedcf2f --- /dev/null +++ b/CodeHunters/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/CodeHunters/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/CodeHunters/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/CodeHunters/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/CodeHunters/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/CodeHunters/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/CodeHunters/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/CodeHunters/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/CodeHunters/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/CodeHunters/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/CodeHunters/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/CodeHunters/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 00000000..89c2725b --- /dev/null +++ b/CodeHunters/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/CodeHunters/ios/Runner/Base.lproj/LaunchScreen.storyboard b/CodeHunters/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..f2e259c7 --- /dev/null +++ b/CodeHunters/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CodeHunters/ios/Runner/Base.lproj/Main.storyboard b/CodeHunters/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 00000000..f3c28516 --- /dev/null +++ b/CodeHunters/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CodeHunters/ios/Runner/Info.plist b/CodeHunters/ios/Runner/Info.plist new file mode 100644 index 00000000..8fb13b9b --- /dev/null +++ b/CodeHunters/ios/Runner/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + health_app + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/CodeHunters/ios/Runner/Runner-Bridging-Header.h b/CodeHunters/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 00000000..308a2a56 --- /dev/null +++ b/CodeHunters/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/CodeHunters/lib/main.dart b/CodeHunters/lib/main.dart new file mode 100644 index 00000000..caa063aa --- /dev/null +++ b/CodeHunters/lib/main.dart @@ -0,0 +1,39 @@ +import 'package:flutter/material.dart'; +import 'package:health_app/models/user.dart'; +import 'package:health_app/screens/home/home.dart'; +import 'package:health_app/screens/home/home_screen.dart'; +import 'package:health_app/screens/pages/fixAppointment.dart'; +import 'package:health_app/screens/pages/loading.dart'; +import 'package:health_app/screens/pages/results.dart'; +import 'package:health_app/screens/pages/search.dart'; +import 'package:health_app/screens/wrapper.dart'; +import 'package:health_app/services/auth.dart'; +import 'package:provider/provider.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return StreamProvider.value( + value: AuthService().user, + child: MaterialApp( + routes: { + '/home': (context) => Home(), + '/search': (context) => Search(), + '/loading': (context) => Loading(), + '/results': (context) => Results(), + '/fixAppointment': (context) => Appointment(), + '/home_screen': (context) => HomeScreen(), + }, + home: Wrapper(), + ), + ); + } +} + + + diff --git a/CodeHunters/lib/models/user.dart b/CodeHunters/lib/models/user.dart new file mode 100644 index 00000000..1c940b72 --- /dev/null +++ b/CodeHunters/lib/models/user.dart @@ -0,0 +1,6 @@ + +class User { + final String uid; + + User({this.uid}); +} \ No newline at end of file diff --git a/CodeHunters/lib/screens/authenticate/authenticate.dart b/CodeHunters/lib/screens/authenticate/authenticate.dart new file mode 100644 index 00000000..8472ec8e --- /dev/null +++ b/CodeHunters/lib/screens/authenticate/authenticate.dart @@ -0,0 +1,16 @@ +import 'package:flutter/material.dart'; +import 'package:health_app/screens/authenticate/register.dart'; + +class Authenticate extends StatefulWidget { + @override + _AuthenticateState createState() => _AuthenticateState(); +} + +class _AuthenticateState extends State { + @override + Widget build(BuildContext context) { + return Container( + child: SignIn(), + ); + } +} diff --git a/CodeHunters/lib/screens/authenticate/register.dart b/CodeHunters/lib/screens/authenticate/register.dart new file mode 100644 index 00000000..1b68d599 --- /dev/null +++ b/CodeHunters/lib/screens/authenticate/register.dart @@ -0,0 +1,90 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import 'package:health_app/services/auth.dart'; + +class SignIn extends StatefulWidget { + @override + _SignInState createState() => _SignInState(); +} + +class _SignInState extends State { + + final AuthService _auth = AuthService(); + final _formKey = GlobalKey(); + + String email =" "; + String password =" "; + String error = " "; + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Color(0xff9ACDE0), + body:Container( + padding: EdgeInsets.symmetric(vertical: 50.0, horizontal: 40.0), + color: Color(0xff9ACDE0), + child: Form( + key: _formKey, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox(height:20.0), + Text("Email", + style: TextStyle(fontSize: 30.0,color: Colors.blueAccent[900])), + TextFormField( + style: TextStyle(fontSize: 25.0), + validator: (val) => val.isEmpty ? 'Email is mandatory': null, + onChanged: (val){ + setState(() => email = val); + }, + ), + SizedBox(height:20.0), + Text("Password", + style: TextStyle(fontSize: 30.0,color: Colors.blueAccent[900])), + TextFormField( + obscureText: true, + style: TextStyle(fontSize: 25.0), + validator: (val) => val.length < 8 ? 'Password is Invalid': null, + onChanged: (val){ + setState(() => password = val); + }, + ), + SizedBox(height:20.0), + SizedBox(height: 20.0), + RaisedButton( + color: Colors.red[500], + child: Text( + 'Register', + style: TextStyle(color: Colors.white,fontSize: 20.0), + ), + onPressed: ()async { + if(_formKey.currentState.validate()) { + dynamic result = await _auth.registerWithEmailandPassword( + email, password); + if(result == null){ + setState(() { + error = 'please supply a valid email'; + }); + } + } + }, + ), + SizedBox(height: 12.0,), + Text( + error, + style: TextStyle(color: Colors.red,fontSize: 20.0), + ) + ], + ), + ), + ), + + ); + + + + + + } + +} diff --git a/CodeHunters/lib/screens/home/home.dart b/CodeHunters/lib/screens/home/home.dart new file mode 100644 index 00000000..94883b23 --- /dev/null +++ b/CodeHunters/lib/screens/home/home.dart @@ -0,0 +1,47 @@ +import 'package:flutter/material.dart'; +import 'package:health_app/screens/home/home_screen.dart'; +import 'package:health_app/screens/home/profile.dart'; + +class Home extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Color(0xff3792cb), + body:Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Image( + image: AssetImage('assets/health1.jpeg'), + + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + IconButton( + icon: Icon(Icons.person), + iconSize: 60.0, + onPressed: (){ + Navigator.push( + context, + MaterialPageRoute(builder: (context) => ProfilePage())); + }), + + IconButton( + icon: Icon(Icons.home), + color: Colors.black, + iconSize: 60.0, + onPressed: (){ + Navigator.push( + context, + MaterialPageRoute(builder: (context) => HomeScreen())); + }), + ], + ), + ], + ), + ), + ); + + } +} diff --git a/CodeHunters/lib/screens/home/home_screen.dart b/CodeHunters/lib/screens/home/home_screen.dart new file mode 100644 index 00000000..010c6436 --- /dev/null +++ b/CodeHunters/lib/screens/home/home_screen.dart @@ -0,0 +1,109 @@ + +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:health_app/screens/pdf/pdffirst.dart'; +import 'package:marquee/marquee.dart'; +import 'package:url_launcher/url_launcher.dart'; + + +class HomeScreen extends StatelessWidget { + + @override + Widget build(BuildContext context) { + + return Scaffold( + body: Stack( + children: [ + Container( + color: Color(0xff3792cb), + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + SizedBox(height: 150.0,), + Card( + color: Colors.blue[200], + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + child: Container( + + height: 300, + width: 500, + margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 80.0) , + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox(height: 40.0), + Row( + children: [ + IconButton( + icon: Icon(Icons.search), + + iconSize: 50.0, + onPressed: (){ + Navigator.pushNamed(context,'/search'); + + }), + Text("Search Hospitals and Clinics", + style: TextStyle(fontSize: 20.0,color: Colors.blueAccent[900], + fontWeight: FontWeight.bold), + ), + ],), + + Row( + children: [ + IconButton( + onPressed:(){ launch(('tel://102'));}, + icon: Icon(Icons.call), + iconSize: 50.0, + padding: const EdgeInsets.all(5.0), + ), + Text("Emergency Ambulance Call", + style: TextStyle(fontSize: 20.0,color: Colors.blueAccent[900],fontWeight: FontWeight.bold),), + ], + ), + Row( + children: [ + IconButton( + icon: Icon(Icons.storage ), + iconSize: 50.0, + onPressed: (){ + Navigator.push( + context, + MaterialPageRoute(builder: (context) => FirstPage())); + } + ), + Text("Report Storage", + style: TextStyle(fontSize: 20.0,color: Colors.blueAccent[900],fontWeight: FontWeight.bold),), + ], + ), + ], + ), + ), + ), + SizedBox(height: 15.0,), + Expanded( + child: Marquee( + text: ' Tough times never last, but tough people do. The greatest healing therapy is friendship and love. Believe you can, and you are halfway there. ', + style: TextStyle( + fontSize: 25.0, + fontWeight: FontWeight.bold, + fontFamily: 'Lobster', + letterSpacing: 1.5, + ), + scrollAxis: Axis.horizontal, + blankSpace: 20.0, + velocity: 65.0, + ), + ), + + + ], + ), + ], + ), + ); + } +} diff --git a/CodeHunters/lib/screens/home/profile.dart b/CodeHunters/lib/screens/home/profile.dart new file mode 100644 index 00000000..ce6c9f98 --- /dev/null +++ b/CodeHunters/lib/screens/home/profile.dart @@ -0,0 +1,128 @@ +import 'package:firebase_database/firebase_database.dart'; +import 'package:flutter/material.dart'; + + +class ProfilePage extends StatefulWidget { + @override + _ProfilePageState createState() => _ProfilePageState(); +} +class _ProfilePageState extends State { + + String name = " "; + String location = " "; + String bloodgroup = " "; + String phoneno = " "; + String age = " "; + final _formKey1 = GlobalKey(); + final profile = FirebaseDatabase.instance.reference().child('Profile'); + + + @override + Widget build(BuildContext context) { + return Scaffold( + resizeToAvoidBottomPadding : false, + backgroundColor: Color(0xff3792cb), + body:Form( + key: _formKey1, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox(height: 60.0,), + TextFormField( + style: TextStyle(fontSize: 25.0), + decoration: const InputDecoration( + hintText: 'Enter your name', + labelText: 'Name', + ), + validator: (val) => val.isEmpty ? 'Name is mandatory': null, + onChanged: (val){ + setState(() => name = val);} + ), + TextFormField( + style: TextStyle(fontSize: 25.0), + decoration: const InputDecoration( + hintText: 'Enter your location', + labelText: 'Location', + ), + + validator: (val) => val.isEmpty ? 'Location is mandatory': null, + onChanged: (val){ + setState(() => location = val);} + ), + + TextFormField( + style: TextStyle(fontSize: 25.0), + decoration: const InputDecoration( + hintText: 'Enter your Bloodgroup', + labelText: 'BloodGroup', + ), + validator: (val) => val.isEmpty ? 'BloodGroup is mandatory': null, + onChanged: (val){ + setState(() => bloodgroup = val);} + ), + TextFormField( + style: TextStyle(fontSize: 25.0), + decoration: const InputDecoration( + hintText: 'Enter your Age', + labelText: 'Age', + ), + validator: (val) => val.isEmpty ? 'Age is mandatory': null, + onChanged: (val){ + setState(() => age = val);} + ), + TextFormField( + style: TextStyle(fontSize: 25.0), + decoration: const InputDecoration( + hintText: 'Enter your PhoneNo', + labelText: 'PhoneNo', + ), + validator: (val) => val.isEmpty ? 'Phoneno is mandatory': null, + onChanged: (val){ + setState(() => phoneno = val);} + ), + RaisedButton( + color: Colors.red[900], + child: Text( + 'Submit', + style: TextStyle(color: Colors.white,fontSize: 25.0), + ), + onPressed: () { + if (_formKey1.currentState.validate()) { + profile.push().set({ + "name": name, + "location": location , + "bloodgroup": bloodgroup, + "phone":phoneno, + "age":age, + }).then((_) { + showDialog( + context: context, + builder: (ctx) =>AlertDialog( + title: Text("Profile Details"), + content: Text("Data Saved"), + actions: [new FlatButton(child: new Text('OK'), + onPressed: () { + Navigator.of(context).pop();} + + ),], + + ) + ); + }).catchError((onError) { + print(onError); + }); + + + } + } + + ), + + ], + ), + ), + ); + + } +} + diff --git a/CodeHunters/lib/screens/pages/fixAppointment.dart b/CodeHunters/lib/screens/pages/fixAppointment.dart new file mode 100644 index 00000000..b3c63183 --- /dev/null +++ b/CodeHunters/lib/screens/pages/fixAppointment.dart @@ -0,0 +1,21 @@ +import 'package:flutter/material.dart'; + +class Appointment extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.blue, + body: Center( + child: Text( + 'Page under construction', + style: TextStyle( + fontSize: 20.0, + fontStyle: FontStyle.italic, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + ), + ); + } +} diff --git a/CodeHunters/lib/screens/pages/loading.dart b/CodeHunters/lib/screens/pages/loading.dart new file mode 100644 index 00000000..01874215 --- /dev/null +++ b/CodeHunters/lib/screens/pages/loading.dart @@ -0,0 +1,35 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_spinkit/flutter_spinkit.dart'; + +class Loading extends StatefulWidget { + @override + _LoadingState createState() => _LoadingState(); +} + +class _LoadingState extends State { + + void goBack() { + //Future.delayed(Duration(seconds:3), () { + Navigator.pop(context); + //}); + } + + @override + void initState() { + // TODO: implement initState + super.initState(); + goBack(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Center( + child: SpinKitThreeBounce( + color: Colors.red, + size: 50.0, + ) + ), + ); + } +} diff --git a/CodeHunters/lib/screens/pages/results.dart b/CodeHunters/lib/screens/pages/results.dart new file mode 100644 index 00000000..187b78ab --- /dev/null +++ b/CodeHunters/lib/screens/pages/results.dart @@ -0,0 +1,146 @@ +import 'package:flutter/material.dart'; + +class Results extends StatefulWidget { + @override + _ResultsState createState() => _ResultsState(); +} + +class _ResultsState extends State { + @override + Widget build(BuildContext context) { + + Map obj = ModalRoute.of(context).settings.arguments; + + Widget assignTitle(index) { + String title; + try { + if (obj['clinics'].items[index] != null) + title = ((obj['clinics'].items[index].title) != null) ? obj['clinics'] + .items[index].title : ' '; + else + title = ' '; + } + catch(e){ + title=' '; + } + return Text( + title, + style: TextStyle( + fontSize: 17.0, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ); + } + + Widget assignAddress(index) { + String address; + try { + if ((obj['clinics'].items[index] != null) && + (obj['clinics'].items[index].address != null)) + address = + ((obj['clinics'].items[index].address.label) != null) ? obj['clinics'] + .items[index].address.label : ' '; + else + address = ' '; + } + catch(e){ + address=' '; + } + return Text( + address, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 16.0, + color: Colors.white, + ), + ); + } + + Widget assignContact(index) { + + String contactNo; + try { + if ((obj['clinics'].items[index] != null) && + (obj['clinics'].items[index].contacts) != null) { + if ((obj['clinics'].items[index].contacts[0].phone) != null) { + contactNo = + ((obj['clinics'].items[index].contacts[0].phone[0].value) != null) + ? obj['clinics'].items[index].contacts[0].phone[0].value + : ' '; + } + } + else + contactNo = ' '; + } + catch(e){ + contactNo=' '; + } + return Text( + contactNo, + style: TextStyle( + fontSize: 15.0, + color: Colors.white, + ), + ); + } + + return Scaffold( + backgroundColor: Colors.grey[300], + appBar: AppBar( + title: Text(obj['specs']), + centerTitle: true, + backgroundColor: Color(0xff0e2433), + ), + body: ListView.builder( + itemCount: (obj['clinics'].items).length, + itemBuilder: (context,index) { + return Padding( + padding: const EdgeInsets.fromLTRB(10, 20 , 10, 10), + child: Container( + decoration: BoxDecoration( + color: Color(0xff1c4966), + border: Border.all( + color: Colors.black, + width: 2.0, + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox(height: 5.0), + assignTitle(index), + SizedBox(height:10.0), + assignAddress(index), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + assignContact(index), + SizedBox(width: 60.0), + FlatButton.icon( + onPressed: () { + Navigator.pushNamed(context,'/fixAppointment'); + }, + label: Text( + 'Fix Appointment', + style: TextStyle( + fontSize: 15.0, + color: Colors.white, + ), + ), + icon: Icon( + Icons.call, + color: Colors.white, + ), + ), + ], + ), + ], + ), + ), + ); + }, + ), + ); + } +} diff --git a/CodeHunters/lib/screens/pages/search.dart b/CodeHunters/lib/screens/pages/search.dart new file mode 100644 index 00000000..878d797a --- /dev/null +++ b/CodeHunters/lib/screens/pages/search.dart @@ -0,0 +1,167 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:health_app/services/clinicsData.dart'; +import 'package:health_app/services/location.dart'; + + +class Search extends StatefulWidget { + @override + _SearchState createState() => _SearchState(); +} + +class _SearchState extends State { + + final myController = TextEditingController(); + String inputValue=""; + + List specialization = [ + 'General Hospitals', + 'Cardiology Clinics', + 'Dental Clinics', + 'Dermatology Clinics', + 'ENT Clinics', + 'Eye Hospitals', + 'Orthopaedic Clinics', + 'Pediatric Centres', + ]; + + Location instance1; + + void findClinics(index) async { + + instance1= Location(location:inputValue, specs: specialization[index]); + ClinicData clinics=await instance1.searchHospitals(); + + Navigator.pushNamed(context,'/results', arguments: {'specs': specialization[index],'clinics': clinics}); + + } + + @override + void initState() { + // TODO: implement initState + super.initState(); + instance1= new Location(location:'Ernakulam', specs: specialization[0]); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text( + 'Search for clinics/hospitals', + style: TextStyle( + fontSize: 22.0, + color: Colors.white, + ), + ), + centerTitle: true, + backgroundColor: Color(0xff0e2433), + ), + body: Padding( + padding: const EdgeInsets.fromLTRB(10, 8, 10, 0), + child: SingleChildScrollView( + child: Column( + children: [ + Container( + child: Row( + children: [ + Text( + 'Location: ', + style: TextStyle( + fontSize: 19, + fontWeight: FontWeight.bold, + color: Color(0xff0e2433), + letterSpacing: 0.75, + ), + ), + SizedBox(width: 13), + Expanded( + child: TextField( + autofocus: true, + controller: myController, + decoration: InputDecoration( + hintText: 'Enter location', + hintStyle: TextStyle( + fontWeight: FontWeight.bold, + ), + ), + maxLines: 1, + minLines: 1, + ), + ), + SizedBox(width: 20), + Container( + height: 48, + width: 48, + decoration: BoxDecoration( + color: Color(0xff1c4966), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(20), + topRight: Radius.circular(20), + bottomLeft: Radius.circular(20), + bottomRight: Radius.circular(20) + ), + ), + child: FlatButton( + onPressed: () { + setState(() { + inputValue=myController.text; + }); + }, + child: Text( + 'OK', + style: TextStyle( + color: Colors.white, + fontSize: 12, + fontWeight: FontWeight.bold, + ), + ), + ), + ), + ], + ), + ), + SizedBox(height:25), + Text( + 'Choose the category from the options below: ', + style: TextStyle( + fontSize: 20, + color: Color(0xff0e2433), + fontWeight: FontWeight.bold, + ), + ), + SizedBox(height: 10), + ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: specialization.length, + itemBuilder: (context, index) { + return Card( + child: ListTile( + onTap: () { + Navigator.pushNamed(context, '/loading'); + findClinics(index); + }, + tileColor: Color(0xff1c4966), + title: Center( + child: Text( + specialization[index], + style: TextStyle( + fontSize: 18.0, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), + ), + ), + ); + } + ), + ], + ), + ), + ), + ); + + } +} diff --git a/CodeHunters/lib/screens/pdf/modal.dart b/CodeHunters/lib/screens/pdf/modal.dart new file mode 100644 index 00000000..bab780c5 --- /dev/null +++ b/CodeHunters/lib/screens/pdf/modal.dart @@ -0,0 +1,5 @@ +class Modal{ + String link; + String name; + Modal(this.link,this.name); +} \ No newline at end of file diff --git a/CodeHunters/lib/screens/pdf/pdffirst.dart b/CodeHunters/lib/screens/pdf/pdffirst.dart new file mode 100644 index 00000000..b4b09e31 --- /dev/null +++ b/CodeHunters/lib/screens/pdf/pdffirst.dart @@ -0,0 +1,146 @@ +import 'dart:convert'; +import 'dart:io'; +import 'dart:math'; +import 'package:file_picker/file_picker.dart'; +import 'package:firebase_database/firebase_database.dart'; +import 'package:firebase_storage/firebase_storage.dart'; +import 'package:flutter/material.dart'; +import 'package:health_app/screens/pdf/modal.dart'; +import 'package:health_app/screens/pdf/pdfsecond.dart'; + + +class FirstPage extends StatefulWidget { + @override + _FirstPageState createState() => _FirstPageState(); +} + +class _FirstPageState extends State { + + List itemList = []; + final mainReference = FirebaseDatabase.instance.reference().child('Database'); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + centerTitle: true, + backgroundColor: Color(0xff0e2433), + title: Text("Report Storage"), + ), + body: itemList.length ==0? Text("Loading..." ,style: TextStyle(fontSize: 20.0),) : ListView.builder( + itemCount: itemList.length, + itemBuilder: (context, index) { + return Padding( + padding: const EdgeInsets.fromLTRB(10, 0, 0, 0), + child:GestureDetector( + onTap: () { + String passData = itemList[index].link; + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => ViewPdf(), + settings: RouteSettings( + arguments: passData, + ) + ) + ); + }, + + child: Stack( + children: [ + Container( + height: 100, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage('assets/image2.jpg'), + fit: BoxFit.cover, + ), + ), + ), + Center( + child: Container( + height: 140, + child: Card( + margin: EdgeInsets.all(18), + elevation: 7.0, + child: Center( + child: Text( itemList[index].name + " " + + (index + 1).toString()), + ), + ), + ), + ), + ], + ), + ) + ); + }, + ), + floatingActionButton: FloatingActionButton( + onPressed: () { + getPdfAndUpload(); + }, + child: Icon(Icons.add, color: Colors.white,), + backgroundColor: Color(0xff0e2433), + ), + ); + } + + Future getPdfAndUpload() async { + var rng = new Random(); + String randomName = ""; + for (var i = 0; i < 20; i++) { + print(rng.nextInt(100)); + randomName += rng.nextInt(100).toString(); + } + + + File file = await FilePicker.getFile(type: FileType.CUSTOM, fileExtension:'pdf'); + String fileName = '${randomName}.pdf'; + savePdf(file.readAsBytesSync(), fileName); + } + + savePdf(List asset, String name) async { + StorageReference reference = FirebaseStorage.instance.ref().child(name); + StorageUploadTask uploadTask = reference.putData(asset); + String url = await (await uploadTask.onComplete).ref.getDownloadURL(); + documentFileUpload(url); + } + + String createCryptoRandomString([int length = 32]) { + final Random _random = Random.secure(); + var values = List.generate(length, (i) => _random.nextInt(256)); + return base64Url.encode(values); + //generate key + } + + void documentFileUpload(String str) { + var data = { + "PDF": str, + "FileName": "Report ", + }; + mainReference.child(createCryptoRandomString()).set(data).then((v) { + print("Store Successfully"); + }); + } + @override + + // ignore: must_call_super + void initState() { + mainReference.once().then((DataSnapshot snap) { + itemList.clear(); + var data = snap.value; + + data.forEach((key, value) { + Modal m = new Modal(value["PDF"], value["FileName"]); + itemList.add(m); + + }); + setState(() { + + }); + }); + } + +} + diff --git a/CodeHunters/lib/screens/pdf/pdfsecond.dart b/CodeHunters/lib/screens/pdf/pdfsecond.dart new file mode 100644 index 00000000..0535cd54 --- /dev/null +++ b/CodeHunters/lib/screens/pdf/pdfsecond.dart @@ -0,0 +1,41 @@ + +import 'package:flutter/material.dart'; +import 'package:flutter_plugin_pdf_viewer/flutter_plugin_pdf_viewer.dart'; + +class ViewPdf extends StatefulWidget { + @override + _ViewPdfState createState() => _ViewPdfState(); +} + +class _ViewPdfState extends State { + PDFDocument doc; + @override + Widget build(BuildContext context) { + String data = ModalRoute.of(context).settings.arguments; + // ignore: non_constant_identifier_names + ViewNow() async { + doc = await PDFDocument.fromURL( + data); + setState(() { + + }); + } + + // ignore: non_constant_identifier_names, missing_return + Widget Loading(){ + ViewNow(); + if(doc==null){ + return Text("loading"); + //return + } + } + return Scaffold( + appBar: AppBar( + backgroundColor: Color(0xff0e2433), + title: Text("Retrieve Report"), + centerTitle: true, + ), + body: doc==null?Loading():PDFViewer(document: doc), + ); + } +} \ No newline at end of file diff --git a/CodeHunters/lib/screens/wrapper.dart b/CodeHunters/lib/screens/wrapper.dart new file mode 100644 index 00000000..acb301c9 --- /dev/null +++ b/CodeHunters/lib/screens/wrapper.dart @@ -0,0 +1,24 @@ +import 'package:flutter/material.dart'; +import 'package:health_app/models/user.dart'; +import 'package:health_app/screens/authenticate/authenticate.dart'; +import 'package:health_app/screens/home/home.dart'; +import 'package:provider/provider.dart'; + +class Wrapper extends StatelessWidget { + @override + Widget build(BuildContext context) { + final user = Provider.of(context); + + if (user == null) { + return Authenticate(); + } + else { + return Home(); + } + + //signed in or not + + } +} + + diff --git a/CodeHunters/lib/services/auth.dart b/CodeHunters/lib/services/auth.dart new file mode 100644 index 00000000..9ad1d0a3 --- /dev/null +++ b/CodeHunters/lib/services/auth.dart @@ -0,0 +1,55 @@ +import 'package:firebase_auth/firebase_auth.dart'; +import 'package:health_app/models/user.dart'; + +class AuthService { + + final FirebaseAuth _auth = FirebaseAuth.instance; + + //create user obj based on firebase + User _userFromFirebaseUser(FirebaseUser user){ + return user != null ? User(uid: user.uid): null; + } + + // auth change using streams + Stream get user { + return _auth.onAuthStateChanged + .map(_userFromFirebaseUser); + } + //signin ano + + Future signIn() async{ + + try{ + AuthResult result = await _auth.signInAnonymously(); + FirebaseUser user = result.user; + return _userFromFirebaseUser(user); + } + catch(e){ + print(e.toString()); + return null; + } + } + +// login with email and phone + Future registerWithEmailandPassword(String email, String password) async{ + + try{ + AuthResult result = await _auth.createUserWithEmailAndPassword(email: email, password: password); + FirebaseUser user = result.user; + return _userFromFirebaseUser(user); + } + catch(e){ + print(e.toString()); + return null; + } + } + + +// register with phone + + + + + + +} \ No newline at end of file diff --git a/CodeHunters/lib/services/clinicsData.dart b/CodeHunters/lib/services/clinicsData.dart new file mode 100644 index 00000000..b275a2c2 --- /dev/null +++ b/CodeHunters/lib/services/clinicsData.dart @@ -0,0 +1,345 @@ +// To parse this JSON data, do +// +// final clinicData = clinicDataFromJson(jsonString); + +import 'dart:convert'; + +ClinicData clinicDataFromJson(String str) => ClinicData.fromJson(json.decode(str)); + +String clinicDataToJson(ClinicData data) => json.encode(data.toJson()); + +class ClinicData { + ClinicData({ + this.items, + }); + + List items; + + factory ClinicData.fromJson(Map json) => ClinicData( + items: json["items"] == null ? null : List.from(json["items"].map((x) => Item.fromJson(x))), + ); + + Map toJson() => { + "items": items == null ? null : List.from(items.map((x) => x.toJson())), + }; +} + +class Item { + Item({ + this.title, + this.id, + this.resultType, + this.address, + this.position, + this.access, + this.distance, + this.categories, + this.references, + this.contacts, + }); + + String title; + String id; + ResultType resultType; + Address address; + Position position; + List access; + int distance; + List categories; + List references; + List contacts; + + factory Item.fromJson(Map json) => Item( + title: json["title"] == null ? null : json["title"], + id: json["id"] == null ? null : json["id"], + resultType: json["resultType"] == null ? null : resultTypeValues.map[json["resultType"]], + address: json["address"] == null ? null : Address.fromJson(json["address"]), + position: json["position"] == null ? null : Position.fromJson(json["position"]), + access: json["access"] == null ? null : List.from(json["access"].map((x) => Position.fromJson(x))), + distance: json["distance"] == null ? null : json["distance"], + categories: json["categories"] == null ? null : List.from(json["categories"].map((x) => Category.fromJson(x))), + references: json["references"] == null ? null : List.from(json["references"].map((x) => Reference.fromJson(x))), + contacts: json["contacts"] == null ? null : List.from(json["contacts"].map((x) => Contact.fromJson(x))), + ); + + Map toJson() => { + "title": title == null ? null : title, + "id": id == null ? null : id, + "resultType": resultType == null ? null : resultTypeValues.reverse[resultType], + "address": address == null ? null : address.toJson(), + "position": position == null ? null : position.toJson(), + "access": access == null ? null : List.from(access.map((x) => x.toJson())), + "distance": distance == null ? null : distance, + "categories": categories == null ? null : List.from(categories.map((x) => x.toJson())), + "references": references == null ? null : List.from(references.map((x) => x.toJson())), + "contacts": contacts == null ? null : List.from(contacts.map((x) => x.toJson())), + }; +} + +class Position { + Position({ + this.lat, + this.lng, + }); + + double lat; + double lng; + + factory Position.fromJson(Map json) => Position( + lat: json["lat"] == null ? null : json["lat"].toDouble(), + lng: json["lng"] == null ? null : json["lng"].toDouble(), + ); + + Map toJson() => { + "lat": lat == null ? null : lat, + "lng": lng == null ? null : lng, + }; +} + +class Address { + Address({ + this.label, + this.countryCode, + this.countryName, + this.stateCode, + this.state, + this.county, + this.city, + this.district, + this.subdistrict, + this.street, + this.postalCode, + }); + + String label; + CountryCode countryCode; + CountryName countryName; + StateCode stateCode; + String state; + String county; + String city; + String district; + String subdistrict; + String street; + String postalCode; + + factory Address.fromJson(Map json) => Address( + label: json["label"] == null ? null : json["label"], + countryCode: json["countryCode"] == null ? null : countryCodeValues.map[json["countryCode"]], + countryName: json["countryName"] == null ? null : countryNameValues.map[json["countryName"]], + stateCode: json["stateCode"] == null ? null : stateCodeValues.map[json["stateCode"]], + state: json["state"] == null ? null : json["state"], + county: json["county"] == null ? null : json["county"], + city: json["city"] == null ? null : json["city"], + district: json["district"] == null ? null : json["district"], + subdistrict: json["subdistrict"] == null ? null : json["subdistrict"], + street: json["street"] == null ? null : json["street"], + postalCode: json["postalCode"] == null ? null : json["postalCode"], + ); + + Map toJson() => { + "label": label == null ? null : label, + "countryCode": countryCode == null ? null : countryCodeValues.reverse[countryCode], + "countryName": countryName == null ? null : countryNameValues.reverse[countryName], + "stateCode": stateCode == null ? null : stateCodeValues.reverse[stateCode], + "state": state == null ? null : state, + "county": county == null ? null : county, + "city": city == null ? null : city, + "district": district == null ? null : district, + "subdistrict": subdistrict == null ? null : subdistrict, + "street": street == null ? null : street, + "postalCode": postalCode == null ? null : postalCode, + }; +} + +enum CountryCode { IND, ZAF } + +final countryCodeValues = EnumValues({ + "IND": CountryCode.IND, + "ZAF": CountryCode.ZAF +}); + +enum CountryName { INDIA, SOUTH_AFRICA } + +final countryNameValues = EnumValues({ + "India": CountryName.INDIA, + "South Africa": CountryName.SOUTH_AFRICA +}); + +enum StateCode { KL, MH, KA, TN } + +final stateCodeValues = EnumValues({ + "KA": StateCode.KA, + "KL": StateCode.KL, + "MH": StateCode.MH, + "TN": StateCode.TN +}); + +class Category { + Category({ + this.id, + this.name, + this.primary, + }); + + PurpleId id; + Name name; + bool primary; + + factory Category.fromJson(Map json) => Category( + id: json["id"] == null ? null : purpleIdValues.map[json["id"]], + name: json["name"] == null ? null : nameValues.map[json["name"]], + primary: json["primary"] == null ? null : json["primary"], + ); + + Map toJson() => { + "id": id == null ? null : purpleIdValues.reverse[id], + "name": name == null ? null : nameValues.reverse[name], + "primary": primary == null ? null : primary, + }; +} + +enum PurpleId { THE_80080000159, THE_80080000158, THE_80080000325, THE_80080000000 } + +final purpleIdValues = EnumValues({ + "800-8000-0000": PurpleId.THE_80080000000, + "800-8000-0158": PurpleId.THE_80080000158, + "800-8000-0159": PurpleId.THE_80080000159, + "800-8000-0325": PurpleId.THE_80080000325 +}); + +enum Name { HOSPITAL, MEDICAL_SERVICES_CLINICS, HOSPITAL_EMERGENCY_ROOM, HOSPITAL_OR_HEALTH_CARE_FACILITY } + +final nameValues = EnumValues({ + "Hospital": Name.HOSPITAL, + "Hospital Emergency Room": Name.HOSPITAL_EMERGENCY_ROOM, + "Hospital or Health Care Facility": Name.HOSPITAL_OR_HEALTH_CARE_FACILITY, + "Medical Services/Clinics": Name.MEDICAL_SERVICES_CLINICS +}); + +class Contact { + Contact({ + this.phone, + this.www, + this.email, + this.tollFree, + }); + + List phone; + List www; + List email; + List tollFree; + + factory Contact.fromJson(Map json) => Contact( + phone: json["phone"] == null ? null : List.from(json["phone"].map((x) => Email.fromJson(x))), + www: json["www"] == null ? null : List.from(json["www"].map((x) => Www.fromJson(x))), + email: json["email"] == null ? null : List.from(json["email"].map((x) => Email.fromJson(x))), + tollFree: json["tollFree"] == null ? null : List.from(json["tollFree"].map((x) => Email.fromJson(x))), + ); + + Map toJson() => { + "phone": phone == null ? null : List.from(phone.map((x) => x.toJson())), + "www": www == null ? null : List.from(www.map((x) => x.toJson())), + "email": email == null ? null : List.from(email.map((x) => x.toJson())), + "tollFree": tollFree == null ? null : List.from(tollFree.map((x) => x.toJson())), + }; +} + +class Email { + Email({ + this.value, + }); + + String value; + + factory Email.fromJson(Map json) => Email( + value: json["value"] == null ? null : json["value"], + ); + + Map toJson() => { + "value": value == null ? null : value, + }; +} + +class Www { + Www({ + this.value, + this.categories, + }); + + String value; + List categories; + + factory Www.fromJson(Map json) => Www( + value: json["value"] == null ? null : json["value"], + categories: json["categories"] == null ? null : List.from(json["categories"].map((x) => Supplier.fromJson(x))), + ); + + Map toJson() => { + "value": value == null ? null : value, + "categories": categories == null ? null : List.from(categories.map((x) => x.toJson())), + }; +} + +class Supplier { + Supplier({ + this.id, + }); + + SupplierId id; + + factory Supplier.fromJson(Map json) => Supplier( + id: json["id"] == null ? null : supplierIdValues.map[json["id"]], + ); + + Map toJson() => { + "id": id == null ? null : supplierIdValues.reverse[id], + }; +} + +enum SupplierId { THE_80080000158, CORE } + +final supplierIdValues = EnumValues({ + "core": SupplierId.CORE, + "800-8000-0158": SupplierId.THE_80080000158 +}); + +class Reference { + Reference({ + this.supplier, + this.id, + }); + + Supplier supplier; + String id; + + factory Reference.fromJson(Map json) => Reference( + supplier: json["supplier"] == null ? null : Supplier.fromJson(json["supplier"]), + id: json["id"] == null ? null : json["id"], + ); + + Map toJson() => { + "supplier": supplier == null ? null : supplier.toJson(), + "id": id == null ? null : id, + }; +} + +enum ResultType { PLACE } + +final resultTypeValues = EnumValues({ + "place": ResultType.PLACE +}); + +class EnumValues { + Map map; + Map reverseMap; + + EnumValues(this.map); + + Map get reverse { + if (reverseMap == null) { + reverseMap = map.map((k, v) => new MapEntry(v, k)); + } + return reverseMap; + } +} diff --git a/CodeHunters/lib/services/location.dart b/CodeHunters/lib/services/location.dart new file mode 100644 index 00000000..fda27fd4 --- /dev/null +++ b/CodeHunters/lib/services/location.dart @@ -0,0 +1,47 @@ +import 'package:health_app/services/clinicsData.dart'; +import 'package:http/http.dart'; //to use the get function +import 'dart:convert'; //to decode the json data + + +class Location { + + double latitude; + double longitude; + String location; + String specs; + Response result; + + Location({ this.location, this.specs }); + + Future searchHospitals() async { + + try{ + + Response response = await get('https://geocode.search.hereapi.com/v1/geocode?q=$location&apiKey=iKyk0uZypECb9Ibdb5OXiM8TKpjobMkP99gIyPewDyo'); + Map data = jsonDecode(response.body); + + latitude=data['items'][0]['position']['lat']; + longitude=data['items'][0]['position']['lng']; + + List pieces=specs.split(" "); + + response = await get('https://discover.search.hereapi.com/v1/discover?at=$latitude,$longitude&q=${pieces[0]}+${pieces[1]}+hospital&lang=en-US&apiKey=iKyk0uZypECb9Ibdb5OXiM8TKpjobMkP99gIyPewDyo&limit=4'); + //data = jsonDecode(response.body); + + if(200==response.statusCode) { + + final ClinicData clinics = (clinicDataFromJson(response.body)); + //print(clinics); + return clinics; + + } + else { + print('Loading error'); + } + } + catch(e){ + print('Caught error: $e'); + } + + } +} \ No newline at end of file diff --git a/CodeHunters/pubspec.lock b/CodeHunters/pubspec.lock new file mode 100644 index 00000000..831783a8 --- /dev/null +++ b/CodeHunters/pubspec.lock @@ -0,0 +1,895 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + url: "https://pub.dartlang.org" + source: hosted + version: "12.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "0.40.6" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.13" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.0" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.5.0-nullsafety.3" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0-nullsafety.3" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.0" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.5" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.4" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.1" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "1.10.11" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.5" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.3.2" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "7.1.0" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0-nullsafety.5" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0-nullsafety.3" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + cli_util: + dependency: transitive + description: + name: cli_util + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0-nullsafety.3" + cloud_firestore: + dependency: "direct main" + description: + name: cloud_firestore + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.11" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.5.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.15.0-nullsafety.5" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + coverage: + dependency: transitive + description: + name: coverage + url: "https://pub.dartlang.org" + source: hosted + version: "0.14.2" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.5" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.10" + fading_edge_scrollview: + dependency: transitive + description: + name: fading_edge_scrollview + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0-nullsafety.3" + ffi: + dependency: transitive + description: + name: ffi + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" + file: + dependency: transitive + description: + name: file + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.0-nullsafety.4" + file_picker: + dependency: "direct main" + description: + name: file_picker + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.3+2" + firebase: + dependency: transitive + description: + name: firebase + url: "https://pub.dartlang.org" + source: hosted + version: "7.3.3" + firebase_analytics: + dependency: "direct main" + description: + name: firebase_analytics + url: "https://pub.dartlang.org" + source: hosted + version: "5.0.16" + firebase_analytics_platform_interface: + dependency: transitive + description: + name: firebase_analytics_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + firebase_analytics_web: + dependency: transitive + description: + name: firebase_analytics_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1" + firebase_auth: + dependency: "direct main" + description: + name: firebase_auth + url: "https://pub.dartlang.org" + source: hosted + version: "0.14.0+9" + firebase_core: + dependency: "direct main" + description: + name: firebase_core + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.5" + firebase_core_platform_interface: + dependency: transitive + description: + name: firebase_core_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + firebase_core_web: + dependency: transitive + description: + name: firebase_core_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+2" + firebase_database: + dependency: "direct main" + description: + name: firebase_database + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.6" + firebase_storage: + dependency: "direct main" + description: + name: firebase_storage + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.6" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.11" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_advanced_networkimage: + dependency: transitive + description: + name: flutter_advanced_networkimage + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.0" + flutter_cache_manager: + dependency: transitive + description: + name: flutter_cache_manager + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.3" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_plugin_pdf_viewer: + dependency: "direct main" + description: + name: flutter_plugin_pdf_viewer + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.7" + flutter_spinkit: + dependency: "direct main" + description: + name: flutter_spinkit + url: "https://pub.dartlang.org" + source: hosted + version: "4.1.2+1" + flutter_svg: + dependency: transitive + description: + name: flutter_svg + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.1" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + http: + dependency: "direct main" + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.4" + infinite_listview: + dependency: transitive + description: + name: infinite_listview + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1+1" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.9.2+2" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.4" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.3-nullsafety.3" + json_annotation: + dependency: "direct main" + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.1" + json_rpc_2: + dependency: transitive + description: + name: json_rpc_2 + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.2" + json_serializable: + dependency: "direct dev" + description: + name: json_serializable + url: "https://pub.dartlang.org" + source: hosted + version: "3.5.1" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.4" + marquee: + dependency: "direct main" + description: + name: marquee + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.1" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.10-nullsafety.3" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0-nullsafety.6" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7" + node_interop: + dependency: transitive + description: + name: node_interop + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.1" + node_io: + dependency: transitive + description: + name: node_io + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + numberpicker: + dependency: transitive + description: + name: numberpicker + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.0-nullsafety.3" + path_drawing: + dependency: transitive + description: + name: path_drawing + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.1+1" + path_parsing: + dependency: transitive + description: + name: path_parsing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + path_provider: + dependency: transitive + description: + name: path_provider + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.24" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.1+2" + path_provider_macos: + dependency: transitive + description: + name: path_provider_macos + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.4+6" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.4+3" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.10.0-nullsafety.3" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + platform: + dependency: transitive + description: + name: platform + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0-nullsafety.4" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.0-nullsafety.3" + process: + dependency: transitive + description: + name: process + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.0-nullsafety.4" + provider: + dependency: "direct main" + description: + name: provider + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.7" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.5" + rxdart: + dependency: transitive + description: + name: rxdart + url: "https://pub.dartlang.org" + source: hosted + version: "0.21.0" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.9" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.10+1" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0-nullsafety.4" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.10-nullsafety.3" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.0-nullsafety.4" + sqflite: + dependency: transitive + description: + name: sqflite + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.2+1" + sqflite_common: + dependency: transitive + description: + name: sqflite_common + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2+1" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.10.0-nullsafety.6" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0-nullsafety.3" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0-nullsafety.3" + sync_http: + dependency: transitive + description: + name: sync_http + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + synchronized: + dependency: transitive + description: + name: synchronized + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0+2" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0-nullsafety.3" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.19-nullsafety.6" + test_core: + dependency: transitive + description: + name: test_core + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.12-nullsafety.9" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+3" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0-nullsafety.5" + url_launcher: + dependency: "direct main" + description: + name: url_launcher + url: "https://pub.dartlang.org" + source: hosted + version: "5.7.10" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.1+4" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.1+9" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.9" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.5+1" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.1+3" + uuid: + dependency: transitive + description: + name: uuid + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.2" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0-nullsafety.5" + vm_service: + dependency: transitive + description: + name: vm_service + url: "https://pub.dartlang.org" + source: hosted + version: "5.5.0" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+15" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + webdriver: + dependency: transitive + description: + name: webdriver + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.2" + win32: + dependency: transitive + description: + name: win32 + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.4" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.2" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "3.7.0" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.1" +sdks: + dart: ">=2.12.0-0.0 <3.0.0" + flutter: ">=1.22.2 <2.0.0" diff --git a/CodeHunters/pubspec.yaml b/CodeHunters/pubspec.yaml new file mode 100644 index 00000000..65ad1ea5 --- /dev/null +++ b/CodeHunters/pubspec.yaml @@ -0,0 +1,89 @@ +name: health_app +description: A new Flutter application. + +# The following line prevents the package from being accidentally published to +# pub.dev using `pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +version: 1.0.0+1 + +environment: + sdk: ">=2.7.0 <3.0.0" + +dependencies: + flutter: + sdk: flutter + url_launcher: ^5.0.2 + flutter_plugin_pdf_viewer: ^1.0.7 + file_picker: 1.4.3+2 + firebase_storage: ^3.1.6 + firebase_database: ^3.1.1 + firebase_core: ^0.4.5 + firebase_analytics: ^5.0.2 + http: ^0.12.2 + flutter_spinkit: ^4.1.2 + json_annotation: ^3.1.1 + + + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.1 + firebase_auth: ^0.14.0+5 + cloud_firestore: ^0.12.9+4 + provider: ^3.1.0 + marquee: ^1.6.1 + +dev_dependencies: + flutter_test: + sdk: flutter + build_runner: ^1.10.11 + json_serializable: ^3.5.1 + integration_test: + sdk: flutter + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + assets: + - assets/health1.jpeg + - assets/image2.jpg + + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware. + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + fonts: + - family: Lobster + fonts: + - asset: assets/fonts/Lobster-Regular.ttf + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/CodeHunters/test/widget_test.dart b/CodeHunters/test/widget_test.dart new file mode 100644 index 00000000..8107c08a --- /dev/null +++ b/CodeHunters/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility that Flutter provides. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:health_app/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +}