├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist └── .gitignore ├── lib ├── models │ ├── pharmacy_type.dart │ ├── notification.dart │ ├── article.dart │ ├── drug.dart │ └── pharmacy.dart ├── screens │ ├── search │ │ ├── about_drug_screen.dart │ │ └── search_screen.dart │ ├── wrapper_screen.dart │ ├── home │ │ ├── success_screen.dart │ │ ├── notification_screen.dart │ │ ├── result_screen.dart │ │ ├── explore_screen.dart │ │ ├── home_screen.dart │ │ └── pay_screen.dart │ └── auth │ │ ├── splash_screen.dart │ │ ├── reset_password_screen.dart │ │ ├── login_screen.dart │ │ ├── Signup_screen.dart │ │ └── option_screen.dart ├── components │ ├── custom_button.dart │ ├── look_for_pharmacies.dart │ ├── login_with_social_media.dart │ ├── option_card.dart │ ├── image_title.dart │ ├── description.dart │ ├── body.dart │ ├── custom_text_form_field.dart │ ├── bottom_nav_bar.dart │ ├── map.dart │ ├── drugcard.dart │ └── pharmacy_list.dart ├── utils │ ├── constants.dart │ └── ExploreAppBar.dart ├── main.dart └── services │ ├── auth.dart │ └── database.dart ├── .vscode ├── settings.json ├── launch.json └── google-services.json ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ └── Icon-512.png ├── manifest.json └── index.html ├── assets ├── images │ └── panadolextra.png ├── icons │ ├── facebook.svg │ ├── google.svg │ ├── twitter.svg │ └── drug.svg └── Svg │ └── client.svg ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── pharmap │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── .metadata ├── README.md ├── .gitignore ├── test └── widget_test.dart ├── pubspec.yaml └── pubspec.lock /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /lib/models/pharmacy_type.dart: -------------------------------------------------------------------------------- 1 | enum PharmacyType { night, day } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "debug.showSubSessionsInToolBar": true 3 | } -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /assets/images/panadolextra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/assets/images/panadolextra.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | android.enableR8=true -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /lib/models/notification.dart: -------------------------------------------------------------------------------- 1 | class Notif { 2 | String title; 3 | String body; 4 | Notif({ 5 | this.title, 6 | this.body, 7 | }); 8 | } 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cs-fedy/pharmap/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/pharmap/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.pharmap 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/models/article.dart: -------------------------------------------------------------------------------- 1 | class Article { 2 | String url; 3 | String image; 4 | String body; 5 | String title; 6 | 7 | Article({ 8 | this.url, 9 | this.image, 10 | this.body, 11 | this.title, 12 | }); 13 | } 14 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: cc9b78fc5c4a4d2d51316d9626523336230a89a9 8 | channel: dev 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /assets/icons/facebook.svg: -------------------------------------------------------------------------------- 1 | Facebook icon -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | 8 | { 9 | "name": "pharmap", 10 | "request": "launch", 11 | "type": "dart" 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /assets/icons/google.svg: -------------------------------------------------------------------------------- 1 | Google icon -------------------------------------------------------------------------------- /lib/models/drug.dart: -------------------------------------------------------------------------------- 1 | class Drug { 2 | String drugId; 3 | String drugImage; 4 | String drugName; 5 | String drugDescription; 6 | String drugCategory; 7 | String drugType; 8 | String drugQuantity; 9 | double drugPrice; 10 | 11 | Drug({ 12 | this.drugId, 13 | this.drugDescription, 14 | this.drugCategory, 15 | this.drugImage, 16 | this.drugName, 17 | this.drugPrice, 18 | this.drugQuantity, 19 | this.drugType, 20 | }); 21 | } 22 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /lib/models/pharmacy.dart: -------------------------------------------------------------------------------- 1 | import 'package:pharmap/models/pharmacy_type.dart'; 2 | 3 | class Pharmacy { 4 | String pharmacyName; 5 | String pharmacyOwnerId; 6 | String pharmacyOwnerName; 7 | String pharmacyPictureUrl; 8 | double pharmacyLatitude; 9 | double pharmacyLongitude; 10 | PharmacyType pharmacyType; 11 | List pharmacyDrugs; 12 | Pharmacy({ 13 | this.pharmacyName, 14 | this.pharmacyOwnerId, 15 | this.pharmacyLatitude, 16 | this.pharmacyLongitude, 17 | this.pharmacyType, 18 | this.pharmacyDrugs, 19 | }); 20 | } -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/screens/search/about_drug_screen.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:pharmap/components/body.dart'; 4 | import 'package:pharmap/models/drug.dart'; 5 | 6 | class AboutDrugScreen extends StatelessWidget { 7 | final Drug drug; 8 | static final String id = '/AboutDrugScreen'; 9 | AboutDrugScreen({Key key, this.drug}) : super(key: key); 10 | @override 11 | Widget build(BuildContext context) { 12 | return Scaffold( 13 | // each product have a color 14 | backgroundColor:Color(0xffCCF1C0), 15 | body: Body(drug: drug), 16 | ); 17 | } 18 | } -------------------------------------------------------------------------------- /assets/icons/twitter.svg: -------------------------------------------------------------------------------- 1 | Twitter icon -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pharmap", 3 | "short_name": "pharmap", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.google.gms:google-services:4.3.5' 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | jcenter() 19 | } 20 | } 21 | 22 | rootProject.buildDir = '../build' 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | } 26 | subprojects { 27 | project.evaluationDependsOn(':app') 28 | } 29 | 30 | task clean(type: Delete) { 31 | delete rootProject.buildDir 32 | } 33 | -------------------------------------------------------------------------------- /lib/screens/wrapper_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:pharmap/components/bottom_nav_bar.dart'; 4 | import 'package:pharmap/screens/auth/splash_screen.dart'; 5 | import 'package:provider/provider.dart'; 6 | import 'package:pharmap/screens/home/explore_screen.dart'; 7 | 8 | class WrapperScreen extends StatefulWidget { 9 | static final String id = '/WrapperScreen'; 10 | @override 11 | _WrapperScreenState createState() => _WrapperScreenState(); 12 | } 13 | 14 | class _WrapperScreenState extends State { 15 | @override 16 | Widget build(BuildContext context) { 17 | User user = Provider.of(context); 18 | if (user == null) { 19 | return SplashScreen(); 20 | } else { 21 | return BottomNavBar(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/components/custom_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:pharmap/utils/constants.dart'; 3 | 4 | class CustomButton extends StatelessWidget { 5 | const CustomButton({Key key, this.text, this.press, this.bgColor, this.width}) 6 | : super(key: key); 7 | final String text; 8 | final Function press; 9 | final Color bgColor; 10 | final double width; 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return SizedBox( 15 | width: width != null? width: double.infinity, 16 | height: 45, 17 | child: FlatButton( 18 | shape: RoundedRectangleBorder( 19 | borderRadius: BorderRadius.circular(20), 20 | ), 21 | color: this.bgColor, 22 | onPressed: press, 23 | child: Text( 24 | text, 25 | style: buttonTextStyle, 26 | ), 27 | ), 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pharmap 2 | 3 | - clients do not easily find the medications they need resulting in a waste of time. 4 | - This application helps the user to find a nearby pharmacy that contains the medicine they are looking for. 5 | - Functionality: 6 | 1. Authentication and authorization. 7 | 2. look for medicines. 8 | 3. publish the availability of medicines. 9 | 4. Notify Customers Every Day with Health Tips. 10 | 5. add medicines documentaries. 11 | 12 | ## Getting Started 13 | 14 | 1. clone this repo: `git clone https://github.com/cs-fedy/pharmap.git` 15 | 2. run `flutter pub get` to install all app packages. 16 | 3. setup a firebase project. 17 | 4. setup the firebase web project by adding your **firebase config** in a `firebase-config.js` file in web directory. 18 | 4. setup the firebase android project by adding your `google-services.json` file in `android/app` directory. 19 | 5. run `flutter run` to start your app. -------------------------------------------------------------------------------- /lib/components/look_for_pharmacies.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:pharmap/components/custom_button.dart'; 3 | import 'package:pharmap/models/drug.dart'; 4 | import 'package:pharmap/screens/home/result_screen.dart'; 5 | import 'package:pharmap/utils/constants.dart'; 6 | 7 | class LookForPharmacies extends StatelessWidget { 8 | LookForPharmacies({ 9 | Key key, 10 | @required this.drug, 11 | }) : super(key: key); 12 | 13 | final Drug drug; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Padding( 18 | padding: const EdgeInsets.symmetric(vertical: kDefaultPaddin), 19 | child: CustomButton( 20 | text: 'look for pharmacies', 21 | bgColor: primaryColor, 22 | press: () => Navigator.push( 23 | context, 24 | MaterialPageRoute( 25 | builder: (context) => ResultScreen( 26 | drugId: drug.drugId 27 | ), 28 | ), 29 | ), 30 | ), 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/components/login_with_social_media.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_svg/svg.dart'; 4 | import 'package:pharmap/utils/constants.dart'; 5 | 6 | class LoginWithSocialMedia extends StatelessWidget { 7 | final String assetsPath; 8 | final String label; 9 | final Function onTap; 10 | LoginWithSocialMedia({this.assetsPath, this.label, this.onTap}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return InkWell( 15 | child: Container( 16 | padding: EdgeInsets.all(10.0), 17 | margin: EdgeInsets.all(10.0), 18 | decoration: BoxDecoration( 19 | border: Border.all(width: 1, color: primaryColor), 20 | borderRadius: BorderRadius.circular(50.0), 21 | ), 22 | child: SvgPicture.asset( 23 | assetsPath, 24 | color: primaryColor, 25 | semanticsLabel: label, 26 | ), 27 | ), 28 | onTap: onTap, 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/screens/home/success_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:pharmap/components/custom_button.dart'; 4 | import 'package:pharmap/utils/constants.dart'; 5 | 6 | class SuccessScreen extends StatelessWidget { 7 | final String text; 8 | SuccessScreen({this.text}); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Scaffold( 13 | body: Center( 14 | child: Padding( 15 | padding: EdgeInsets.all(30.0), 16 | child: Column( 17 | children: [ 18 | Text(text), 19 | SizedBox( 20 | height: 15.0, 21 | ), 22 | CustomButton( 23 | text: "return to explore screen", 24 | bgColor: dangerColor, 25 | press: () => 26 | Navigator.pushReplacementNamed(context, "/ExloreScreen"), 27 | ), 28 | ], 29 | ), 30 | ), 31 | ), 32 | ); 33 | } 34 | } 35 | 36 | // 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | **/web/**/firebase-config.js 37 | # android related 38 | **/android/**/google-services.json 39 | 40 | # Symbolication related 41 | app.*.symbols 42 | 43 | # Obfuscation related 44 | app.*.map.json 45 | 46 | # Android Studio will place build artifacts here 47 | /android/app/debug 48 | /android/app/profile 49 | /android/app/release 50 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/components/option_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/svg.dart'; 3 | 4 | class OptionCard extends StatelessWidget { 5 | final Function onTap; 6 | final String label; 7 | final String assetPath; 8 | OptionCard({this.onTap, this.label, this.assetPath}); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | final Size _size = MediaQuery.of(context).size; 13 | return InkWell( 14 | onTap: onTap, 15 | child: Container( 16 | decoration: BoxDecoration( 17 | borderRadius: BorderRadius.circular(50.0), 18 | ), 19 | child: Column( 20 | children: [ 21 | Container( 22 | width: _size.width * .5, 23 | child: FittedBox( 24 | child: SvgPicture.asset( 25 | assetPath, 26 | semanticsLabel: label, 27 | ), 28 | fit: BoxFit.fill, 29 | ), 30 | ), 31 | Text(label), 32 | ], 33 | ), 34 | ), 35 | ); 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:pharmap/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /lib/components/image_title.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:pharmap/models/drug.dart'; 3 | import 'package:pharmap/utils/constants.dart'; 4 | 5 | 6 | class DrugTitleWithImage extends StatelessWidget { 7 | const DrugTitleWithImage({ 8 | Key key, 9 | @required this.drug, 10 | }) : super(key: key); 11 | 12 | final Drug drug; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Padding( 17 | padding: const EdgeInsets.symmetric(horizontal: kDefaultPaddin), 18 | child: Column( 19 | crossAxisAlignment: CrossAxisAlignment.start, 20 | children: [ 21 | 22 | 23 | SizedBox(height: kDefaultPaddin), 24 | Row( 25 | children: [ 26 | SizedBox(width: kDefaultPaddin), 27 | Expanded( 28 | child: Hero( 29 | tag: "${drug.drugId}", 30 | child: Image.network( 31 | drug.drugImage, 32 | fit: BoxFit.fill, 33 | ), 34 | ), 35 | ) 36 | ], 37 | ) 38 | ], 39 | ), 40 | ); 41 | } 42 | } -------------------------------------------------------------------------------- /lib/components/description.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:pharmap/models/drug.dart'; 3 | import 'package:pharmap/utils/constants.dart'; 4 | 5 | class Description extends StatelessWidget { 6 | const Description({ 7 | Key key, 8 | @required this.drug, 9 | }) : super(key: key); 10 | 11 | final Drug drug; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Container( 16 | padding: const EdgeInsets.symmetric(vertical: kDefaultPaddin), 17 | child: Column( 18 | crossAxisAlignment: CrossAxisAlignment.start, 19 | children: [ 20 | Text( 21 | drug.drugName, 22 | style: Theme.of(context).textTheme.headline4.copyWith( 23 | color: Color(0xff21DAA2), 24 | ), 25 | ), 26 | SizedBox(height: kDefaultPaddin / 2), 27 | Text( 28 | drug.drugCategory, 29 | style: Theme.of(context).textTheme.bodyText1, 30 | ), 31 | SizedBox(height: kDefaultPaddin / 2), 32 | Text( 33 | drug.drugQuantity, 34 | style: Theme.of(context).textTheme.bodyText1, 35 | ), 36 | SizedBox(height: kDefaultPaddin / 2), 37 | Text( 38 | drug.drugDescription, 39 | style: Theme.of(context).textTheme.bodyText1, 40 | ), 41 | ], 42 | ), 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /.vscode/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "509105445962", 4 | "project_id": "pharmap-fac0b", 5 | "storage_bucket": "pharmap-fac0b.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:509105445962:android:683cb349487f3aa6841ab3", 11 | "android_client_info": { 12 | "package_name": "com.example.pharmap" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "509105445962-c7fcnd2nork2d3m256nskb27pbhdqglj.apps.googleusercontent.com", 18 | "client_type": 1, 19 | "android_info": { 20 | "package_name": "com.example.pharmap", 21 | "certificate_hash": "66690cace96aefa776f9c7b5f1e1b6129ce08145" 22 | } 23 | }, 24 | { 25 | "client_id": "509105445962-bogr5ntnrv68qch15pluap85hklptqku.apps.googleusercontent.com", 26 | "client_type": 3 27 | } 28 | ], 29 | "api_key": [ 30 | { 31 | "current_key": "AIzaSyAHp2wENg7bPYlTV2BodFcs3lxwIB9X3Yk" 32 | } 33 | ], 34 | "services": { 35 | "appinvite_service": { 36 | "other_platform_oauth_client": [ 37 | { 38 | "client_id": "509105445962-bogr5ntnrv68qch15pluap85hklptqku.apps.googleusercontent.com", 39 | "client_type": 3 40 | } 41 | ] 42 | } 43 | } 44 | } 45 | ], 46 | "configuration_version": "1" 47 | } -------------------------------------------------------------------------------- /assets/icons/drug.svg: -------------------------------------------------------------------------------- 1 | Created by DinosoftLabfrom the Noun Project -------------------------------------------------------------------------------- /lib/utils/constants.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | 4 | //* Colors codes: 5 | final Color primaryColor = Color(0xFF2A9D8F); 6 | final Color darkPrimaryColor = Color(0xFF264653); 7 | final Color secondaryColor = Color(0xFFE76f51); 8 | final Color acsentColor = Color(0xFFF4A261); 9 | final Color lightColor = Color(0xFFE9C46A); 10 | final Color bgColor = Color(0xFFF1FAEE); 11 | final Color dangerColor = Color(0xFFE63946); 12 | const kTextColor = Color(0xFF535353); 13 | const kTextLightColor = Color(0xFFACACAC); 14 | const kDefaultPaddin = 20.0; 15 | //* Text custom theme: 16 | final TextTheme textTheme = TextTheme( 17 | headline1: GoogleFonts.poppins( 18 | textStyle: TextStyle( 19 | fontSize: 50, 20 | fontWeight: FontWeight.bold, 21 | color: primaryColor, 22 | letterSpacing: 3, 23 | ), 24 | ), 25 | headline2: GoogleFonts.poppins( 26 | textStyle: TextStyle( 27 | fontSize: 20, 28 | fontWeight: FontWeight.bold, 29 | color: secondaryColor, 30 | letterSpacing: 2, 31 | ), 32 | ), 33 | bodyText1: GoogleFonts.poppins( 34 | textStyle: TextStyle( 35 | fontSize: 16, 36 | fontWeight: FontWeight.w400, 37 | color: darkPrimaryColor, 38 | ), 39 | ), 40 | ); 41 | 42 | final TextStyle buttonTextStyle = GoogleFonts.poppins( 43 | textStyle: TextStyle( 44 | fontSize: 16, 45 | fontWeight: FontWeight.bold, 46 | color: bgColor, 47 | ), 48 | ); 49 | 50 | const String pharmacyimg = 51 | 'https://cdn.sanity.io/images/0vv8moc6/drugtopics/cdcd72c4059bf900e42c2ff60a2d33a571fe7c86-1000x667.png?fit=crop&auto=format'; 52 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | pharmap 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | NSLocationWhenInUseUsageDescription 37 | The app needs location permission 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | UIViewControllerBasedStatusBarAppearance 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /lib/components/body.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:pharmap/utils/constants.dart'; 3 | import 'image_title.dart'; 4 | import 'look_for_pharmacies.dart'; 5 | import 'description.dart'; 6 | import 'package:pharmap/models/drug.dart'; 7 | 8 | class Body extends StatelessWidget { 9 | final Drug drug; 10 | 11 | const Body({Key key, this.drug}) : super(key: key); 12 | @override 13 | Widget build(BuildContext context) { 14 | // It provide us total height and width 15 | Size size = MediaQuery.of(context).size; 16 | return SingleChildScrollView( 17 | padding: EdgeInsets.symmetric(horizontal: 30.0), 18 | child: Column( 19 | children: [ 20 | SizedBox( 21 | height: size.height, 22 | child: Stack( 23 | children: [ 24 | Container( 25 | margin: EdgeInsets.only(top: size.height * 0.4), 26 | decoration: BoxDecoration( 27 | color: Colors.white, 28 | borderRadius: BorderRadius.only( 29 | topLeft: Radius.circular(40), 30 | topRight: Radius.circular(40), 31 | ), 32 | ), 33 | child: Padding( 34 | padding: EdgeInsets.symmetric(horizontal: 30.0), 35 | child: Column( 36 | children: [ 37 | Description(drug: drug), 38 | SizedBox(height: kDefaultPaddin / 2), 39 | LookForPharmacies(drug: drug), 40 | SizedBox(height: kDefaultPaddin / 2), 41 | ], 42 | ), 43 | )), 44 | DrugTitleWithImage(drug: drug), 45 | ], 46 | ), 47 | ) 48 | ], 49 | ), 50 | ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 30 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | defaultConfig { 36 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 37 | applicationId "com.example.pharmap" 38 | minSdkVersion 21 39 | targetSdkVersion 30 40 | versionCode flutterVersionCode.toInteger() 41 | versionName flutterVersionName 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 59 | } 60 | 61 | apply plugin: 'com.google.gms.google-services' -------------------------------------------------------------------------------- /lib/screens/home/notification_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:pharmap/models/notification.dart'; 3 | import 'package:pharmap/services/database.dart'; 4 | import 'package:pharmap/utils/constants.dart'; 5 | 6 | class Notifications extends StatefulWidget { 7 | Notifications({Key key}) : super(key: key); 8 | @override 9 | _NotificationsState createState() => _NotificationsState(); 10 | } 11 | 12 | class _NotificationsState extends State { 13 | List notifications; 14 | Database db = Database(); 15 | @override 16 | void initState() { 17 | super.initState(); 18 | db 19 | .getNotifications() 20 | .then((value) => setState(() => notifications = value)); 21 | } 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | print("notifications == $notifications"); 26 | if (notifications == null || notifications.length == 0) 27 | return Scaffold( 28 | body: Center( 29 | child: Text( 30 | "No notification right now", 31 | style: 32 | Theme.of(context).textTheme.button.copyWith(color: dangerColor), 33 | ), 34 | ), 35 | ); 36 | 37 | return Scaffold( 38 | body: ListView.separated( 39 | physics: ClampingScrollPhysics(), 40 | padding: EdgeInsets.fromLTRB(0, 50, 0, 0), 41 | itemCount: notifications.length, 42 | itemBuilder: (context, index) { 43 | return ListTile( 44 | leading: Container( 45 | height: 50.0, 46 | width: 50.0, 47 | child: Image.network(pharmacyimg), 48 | ), 49 | title: Text( 50 | notifications[index].title, 51 | style: Theme.of(context).textTheme.headline2, 52 | ), 53 | subtitle: Text(notifications[index].body, 54 | style: Theme.of(context).textTheme.bodyText1), 55 | onTap: () {}, 56 | enabled: true, 57 | ); 58 | }, 59 | separatorBuilder: (context, index) { 60 | return Divider(); 61 | }, 62 | )); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /lib/screens/home/result_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:pharmap/components/map.dart'; 3 | import 'package:pharmap/components/pharmacy_list.dart'; 4 | import 'package:pharmap/models/drug.dart'; 5 | import 'package:pharmap/models/pharmacy.dart'; 6 | import 'package:pharmap/screens/search/search_screen.dart'; 7 | import 'package:pharmap/services/database.dart'; 8 | 9 | // ignore: must_be_immutable 10 | class ResultScreen extends StatefulWidget { 11 | String drugId; 12 | ResultScreen({this.drugId}); 13 | _ResultScreenState createState() => _ResultScreenState(); 14 | } 15 | 16 | class _ResultScreenState extends State { 17 | List pharmaciesList; 18 | List drugsList; 19 | Database db = Database(); 20 | 21 | @override 22 | void initState() { 23 | super.initState(); 24 | db 25 | .getPharmaciesList() 26 | .then((value) => setState(() => pharmaciesList = value)); 27 | db.getDrugs().then((value) => setState(() => drugsList = value)); 28 | } 29 | 30 | Widget buildMap() { 31 | return Container( 32 | height: MediaQuery.of(context).size.height, 33 | width: MediaQuery.of(context).size.width, 34 | child: CustomMap(pharmacies: pharmaciesList), 35 | ); 36 | } 37 | 38 | @override 39 | Widget build(BuildContext context) { 40 | return Scaffold( 41 | resizeToAvoidBottomInset: false, 42 | body: SafeArea( 43 | child: Stack( 44 | fit: StackFit.expand, 45 | children: [ 46 | buildMap(), 47 | SearchScreen(), 48 | PharmacyListWidget( 49 | pharmacies: pharmaciesList != null ? pharmaciesList : [], 50 | drugExist: pharmaciesList != null && 51 | pharmaciesList 52 | .where((element) => 53 | element.pharmacyDrugs.contains(widget.drugId)) 54 | .toList() != [], 55 | onTap: true, 56 | drugId: widget.drugId, 57 | drugs: drugsList != null ? drugsList : [], 58 | ), 59 | ], 60 | ), 61 | ), 62 | // body: buildMap(), 63 | ); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /lib/screens/home/explore_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:pharmap/components/map.dart'; 3 | import 'package:pharmap/components/pharmacy_list.dart'; 4 | import 'package:pharmap/models/drug.dart'; 5 | import 'package:pharmap/models/pharmacy.dart'; 6 | import 'package:pharmap/screens/search/search_screen.dart'; 7 | import 'package:flutter/widgets.dart'; 8 | import 'package:pharmap/services/database.dart'; 9 | import 'package:pharmap/utils/ExploreAppBar.dart'; 10 | 11 | class ExploreScreen extends StatefulWidget { 12 | static final String id = '/ExloreScreen'; 13 | _ExploreScreenState createState() => _ExploreScreenState(); 14 | } 15 | 16 | class _ExploreScreenState extends State { 17 | List pharmaciesList; 18 | List drugsList; 19 | Database db = Database(); 20 | 21 | @override 22 | void initState() { 23 | super.initState(); 24 | db.getPharmaciesList().then((value) => setState(() => pharmaciesList = value)); 25 | db.getDrugs().then((value) => setState(() => drugsList = value)); 26 | } 27 | // Widget buildCats() { 28 | // return Align( 29 | // alignment: Alignment.topLeft, 30 | // child: Container( 31 | // padding: EdgeInsets.symmetric(horizontal: 30.0, vertical: 20.0), 32 | // child: ExploreAppBar(), 33 | // ), 34 | // ); 35 | // } 36 | 37 | Widget buildMap() { 38 | return Container( 39 | height: MediaQuery.of(context).size.height, 40 | width: MediaQuery.of(context).size.width, 41 | child: CustomMap(pharmacies: pharmaciesList), 42 | ); 43 | } 44 | 45 | @override 46 | Widget build(BuildContext context) { 47 | return Scaffold( 48 | resizeToAvoidBottomInset: false, 49 | body: SafeArea( 50 | child: Stack( 51 | children: [ 52 | buildMap(), 53 | SearchScreen(), 54 | // buildCats(), 55 | PharmacyListWidget( 56 | onTap: false, 57 | pharmacies: pharmaciesList != null ? pharmaciesList : [], 58 | drugs: drugsList != null ? drugsList: [], 59 | ), 60 | ], 61 | ), 62 | ), 63 | // body: buildMap(), 64 | ); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:firebase_core/firebase_core.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:pharmap/screens/auth/Signup_screen.dart'; 5 | import 'package:pharmap/screens/auth/login_screen.dart'; 6 | import 'package:pharmap/screens/auth/option_screen.dart'; 7 | import 'package:pharmap/screens/auth/reset_password_screen.dart'; 8 | import 'package:pharmap/screens/auth/splash_screen.dart'; 9 | import 'package:pharmap/screens/home/explore_screen.dart'; 10 | import 'package:pharmap/screens/home/pay_screen.dart'; 11 | import 'package:pharmap/screens/wrapper_screen.dart'; 12 | import 'package:pharmap/services/auth.dart'; 13 | import 'package:pharmap/utils/constants.dart'; 14 | import 'package:provider/provider.dart'; 15 | import 'package:pharmap/screens/search/search_screen.dart'; 16 | import 'package:pharmap/screens/search/about_drug_screen.dart'; 17 | 18 | void main() async { 19 | WidgetsFlutterBinding.ensureInitialized(); 20 | await Firebase.initializeApp(); 21 | runApp(MyApp()); 22 | } 23 | 24 | class MyApp extends StatelessWidget { 25 | @override 26 | Widget build(BuildContext context) { 27 | return StreamProvider.value( 28 | value: AuthService().user, 29 | initialData: null, 30 | child: MaterialApp( 31 | theme: ThemeData( 32 | textTheme: textTheme, 33 | scaffoldBackgroundColor: bgColor, 34 | ), 35 | debugShowCheckedModeBanner: false, 36 | initialRoute: WrapperScreen.id, 37 | routes: { 38 | WrapperScreen.id: (BuildContext context) => WrapperScreen(), 39 | SplashScreen.id: (BuildContext context) => SplashScreen(), 40 | LoginScreen.id: (BuildContext context) => LoginScreen(), 41 | ResetPasswordScreen.id: (BuildContext context) => 42 | ResetPasswordScreen(), 43 | SignupScreen.id: (BuildContext context) => SignupScreen(), 44 | OptionScreen.id: (BuildContext context) => OptionScreen(), 45 | PayScreen.id: (BuildContext context) => PayScreen(), 46 | AboutDrugScreen.id: (BuildContext context) => AboutDrugScreen(), 47 | SearchScreen.id: (BuildContext context) => SearchScreen(), 48 | ExploreScreen.id: (BuildContext context) => ExploreScreen(), 49 | }, 50 | ), 51 | ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /lib/screens/search/search_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:material_floating_search_bar/material_floating_search_bar.dart'; 3 | import 'package:pharmap/components/drugcard.dart'; 4 | import 'package:pharmap/models/drug.dart'; 5 | import 'package:pharmap/services/database.dart'; 6 | 7 | class SearchScreen extends StatefulWidget { 8 | static final String id = '/SearchScreen'; 9 | @override 10 | _SearchScreenState createState() => _SearchScreenState(); 11 | } 12 | 13 | class _SearchScreenState extends State { 14 | List drugsList; 15 | Database db = Database(); 16 | 17 | void _getDrugs() { 18 | db.getRecentDrugs().then((value) => setState(() => drugsList = value)); 19 | } 20 | 21 | @override 22 | void initState() { 23 | super.initState(); 24 | _getDrugs(); 25 | } 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | final isPortrait = 30 | MediaQuery.of(context).orientation == Orientation.portrait; 31 | 32 | return Align( 33 | alignment: Alignment.topLeft, 34 | child: FloatingSearchBar( 35 | hint: 'Search...', 36 | scrollPadding: const EdgeInsets.only(top: 16, bottom: 56), 37 | transitionDuration: const Duration(milliseconds: 800), 38 | transitionCurve: Curves.easeInOut, 39 | physics: const BouncingScrollPhysics(), 40 | axisAlignment: isPortrait ? 0.0 : -1.0, 41 | openAxisAlignment: 0.0, 42 | width: isPortrait ? 600 : 500, 43 | debounceDelay: const Duration(milliseconds: 500), 44 | onQueryChanged: (query) { 45 | db.getFilteredDrugs(query).then((value) => setState(() => drugsList = value)); 46 | }, 47 | // Specify a custom transition to be used for 48 | // animating between opened and closed stated. 49 | transition: CircularFloatingSearchBarTransition(), 50 | actions: [ 51 | FloatingSearchBarAction.searchToClear( 52 | showIfClosed: false, 53 | ), 54 | ], 55 | builder: (context, transition) { 56 | return 57 | 58 | Column( 59 | mainAxisSize: MainAxisSize.min, 60 | children: drugsList == null? []: drugsList.map((e) => DrugCard(drug: e)).toList(), 61 | ); 62 | 63 | 64 | }, 65 | ), 66 | ); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/utils/ExploreAppBar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:pharmap/utils/constants.dart'; 3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 4 | 5 | class ExploreAppBar extends StatelessWidget { 6 | @override 7 | Widget build(BuildContext context) { 8 | return Container( 9 | margin: EdgeInsets.only(top: 6), 10 | child: _exploreOptionList(context), 11 | ); 12 | } 13 | 14 | Widget _exploreOptionList(BuildContext context) { 15 | return Container( 16 | child: SingleChildScrollView( 17 | scrollDirection: Axis.horizontal, 18 | child: Row( 19 | children: [ 20 | _exploreTiles( 21 | icon: FontAwesomeIcons.pills, 22 | title: 'Capsules', 23 | context: context, 24 | ), 25 | _exploreTiles( 26 | icon: FontAwesomeIcons.tablets, 27 | title: 'Tablet', 28 | context: context, 29 | ), 30 | _exploreTiles( 31 | title: 'Liquid', 32 | context: context, 33 | ), 34 | _exploreTiles( 35 | title: 'Injections', 36 | context: context, 37 | ), 38 | _exploreTiles( 39 | title: 'Drops', 40 | context: context, 41 | ), 42 | _exploreTiles( 43 | title: 'Inhalers', 44 | context: context, 45 | ), 46 | ], 47 | ), 48 | ), 49 | ); 50 | } 51 | 52 | Widget _exploreTiles({ 53 | IconData icon, 54 | @required String title, 55 | @required BuildContext context, 56 | }) { 57 | return Container( 58 | margin: EdgeInsets.symmetric(horizontal: 10.0), 59 | padding: EdgeInsets.symmetric(horizontal: 15.0, vertical: 5.0), 60 | decoration: BoxDecoration( 61 | color: Colors.white, 62 | borderRadius: BorderRadius.circular(5), 63 | border: Border.all(color: Colors.white), 64 | ), 65 | child: Row( 66 | mainAxisAlignment: MainAxisAlignment.center, 67 | crossAxisAlignment: CrossAxisAlignment.center, 68 | children: [ 69 | icon != null ? Icon(icon, color: secondaryColor) : SizedBox(), 70 | Text( 71 | title, 72 | style: 73 | TextStyle(color: darkPrimaryColor, fontWeight: FontWeight.bold), 74 | ), 75 | ], 76 | ), 77 | ); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/components/custom_text_form_field.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:pharmap/utils/constants.dart'; 3 | 4 | class CustomTextFormField extends FormField { 5 | CustomTextFormField( 6 | {FormFieldSetter onSaved, 7 | FormFieldValidator validator, 8 | TextInputType keyboardType = TextInputType.text, 9 | String initialValue = "", 10 | String hintText, 11 | bool isPassword = false, 12 | bool obscureText = false, 13 | bool autovalidate = false}) 14 | : super( 15 | onSaved: onSaved, 16 | validator: validator, 17 | initialValue: initialValue, 18 | autovalidate: autovalidate, 19 | builder: (FormFieldState state) { 20 | return Container( 21 | margin:EdgeInsets.symmetric(vertical:10), 22 | padding: EdgeInsets.symmetric(horizontal:20, vertical:5), 23 | decoration: BoxDecoration( 24 | color: Colors.lightGreen[100], 25 | 26 | border: Border( 27 | bottom: BorderSide( 28 | color: Colors.grey[100], 29 | ), 30 | ), 31 | 32 | ), 33 | 34 | child: TextFormField( 35 | obscureText: obscureText, 36 | keyboardType: keyboardType, 37 | cursorColor: darkPrimaryColor, 38 | decoration: InputDecoration( 39 | hintText: hintText, 40 | hintStyle: TextStyle(color: darkPrimaryColor), 41 | border: InputBorder.none, 42 | suffixIcon: isPassword 43 | ? IconButton( 44 | icon: Icon( 45 | 46 | obscureText 47 | ? Icons.visibility_off 48 | : Icons.visibility, 49 | color: darkPrimaryColor, 50 | ), 51 | onPressed: () => state.setState(() { 52 | obscureText = !obscureText; 53 | }), 54 | ) 55 | : null, 56 | ), 57 | onChanged: (String value) => state.didChange(value), 58 | 59 | 60 | ), 61 | ); 62 | }, 63 | ); 64 | } -------------------------------------------------------------------------------- /lib/services/auth.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:google_sign_in/google_sign_in.dart'; 3 | import 'package:pharmap/services/database.dart'; 4 | 5 | class AuthService { 6 | final FirebaseAuth _auth = FirebaseAuth.instance; 7 | GoogleSignIn _googleSignIn = GoogleSignIn(); 8 | final Database _db = Database(); 9 | 10 | Stream get user { 11 | return _auth.authStateChanges(); 12 | } 13 | 14 | Future checkUserExistance(String email) async {} 15 | 16 | Future signupWithEmailAndPassword(String emailAddress, String password, 17 | String fullName, int phoneNumber) async { 18 | try { 19 | UserCredential userCredential = 20 | await _auth.createUserWithEmailAndPassword( 21 | email: emailAddress, 22 | password: password, 23 | ); 24 | User createdUser = userCredential.user; 25 | await _db.addUserInfo(createdUser.uid, fullName, phoneNumber); 26 | return createdUser; 27 | } catch (signUpError) { 28 | List error = signUpError.toString().split('] '); 29 | return error.last; 30 | } 31 | } 32 | 33 | Future signInWithEmailAndPassword(String email, String password) async { 34 | try { 35 | UserCredential userCredential = await _auth.signInWithEmailAndPassword( 36 | email: email, 37 | password: password, 38 | ); 39 | return userCredential.user; 40 | } catch (signUpError) { 41 | List error = signUpError.toString().split('] '); 42 | return error.last; 43 | } 44 | } 45 | 46 | Future signInWithGoogle(String fromScreen) async { 47 | GoogleSignInAccount user = await _googleSignIn.signIn(); 48 | if (user != null) { 49 | GoogleSignInAuthentication googleAuth = await user.authentication; 50 | final credential = GoogleAuthProvider.credential( 51 | accessToken: googleAuth.accessToken, 52 | idToken: googleAuth.idToken, 53 | ); 54 | UserCredential userCredential = 55 | await _auth.signInWithCredential(credential); 56 | User createdUser = userCredential.user; 57 | if (fromScreen == 'signup') { 58 | await _db.addUserInfo(createdUser.uid, createdUser.displayName, null); 59 | } 60 | return createdUser; 61 | } 62 | return null; 63 | } 64 | 65 | Future sendVerificationEmail(String email) async { 66 | await _auth.sendPasswordResetEmail(email: email); 67 | } 68 | 69 | Future signout() async { 70 | final GoogleSignIn googleSignIn = GoogleSignIn(); 71 | if (await googleSignIn.isSignedIn()) { 72 | await googleSignIn.disconnect(); 73 | } 74 | return await _auth.signOut(); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /lib/screens/home/home_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:pharmap/models/article.dart'; 3 | import 'package:pharmap/services/database.dart'; 4 | import 'package:pharmap/utils/constants.dart'; 5 | import 'package:url_launcher/url_launcher.dart'; 6 | 7 | class HomeScreen extends StatefulWidget { 8 | static final String id = '/HomeScreen'; 9 | _HomeScreenState createState() => _HomeScreenState(); 10 | } 11 | 12 | class _HomeScreenState extends State { 13 | List
articles; 14 | Database db = Database(); 15 | @override 16 | void initState() { 17 | super.initState(); 18 | db.getArticles().then((value) => setState(() => articles = value)); 19 | } 20 | 21 | void _launchUrl(String url) async { 22 | await canLaunch(url) ? await launch(url) : throw 'Could not launch $url'; 23 | } 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | if (articles == null) 28 | return Center( 29 | child: Text("Loading..."), 30 | ); 31 | 32 | return Scaffold( 33 | body: SafeArea( 34 | child: ListView.separated( 35 | physics: ClampingScrollPhysics(), 36 | padding: EdgeInsets.fromLTRB(30, 50, 30, 50), 37 | itemCount: articles.length, 38 | itemBuilder: (context, index) { 39 | return InkWell( 40 | onTap: () => _launchUrl(articles[index].url), 41 | child: Column( 42 | crossAxisAlignment: CrossAxisAlignment.start, 43 | children: [ 44 | SizedBox(height: 15), 45 | Container( 46 | width: double.infinity, 47 | child: 48 | Image.network(articles[index].image, fit: BoxFit.fill), 49 | ), 50 | SizedBox(height: 10.0), 51 | Text( 52 | articles[index].title, 53 | style: Theme.of(context) 54 | .textTheme 55 | .button 56 | .copyWith(fontSize: 20.0, color: dangerColor), 57 | ), 58 | SizedBox(height: 15), 59 | Text( 60 | articles[index].body, 61 | style: Theme.of(context) 62 | .textTheme 63 | .bodyText1 64 | .copyWith(color: darkPrimaryColor), 65 | ), 66 | ], 67 | ), 68 | ); 69 | }, 70 | separatorBuilder: (context, index) { 71 | return Divider(); 72 | }, 73 | ), 74 | ), 75 | ); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /lib/screens/auth/splash_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/flutter_svg.dart'; 3 | import 'package:pharmap/components/custom_button.dart'; 4 | import 'package:pharmap/utils/constants.dart'; 5 | 6 | class SplashScreen extends StatelessWidget { 7 | static final String id = '/SplashScreen'; 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | final Size _size = MediaQuery.of(context).size; 12 | return Scaffold( 13 | body: SafeArea( 14 | child: Padding( 15 | padding: const EdgeInsets.symmetric( 16 | vertical: 15.0, 17 | horizontal: 30.0, 18 | ), 19 | child: SizedBox( 20 | width: _size.width, 21 | child: Column( 22 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 23 | children: [ 24 | Expanded( 25 | flex: 4, 26 | child: Container( 27 | child: SvgPicture.asset( 28 | "assets/Svg/pharmapIllustration.svg", 29 | semanticsLabel: "pharmap illustration", 30 | ), 31 | ), 32 | ), 33 | Expanded( 34 | flex: 4, 35 | child: Column( 36 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 37 | children: [ 38 | Text( 39 | 'PHARMAP', 40 | style: Theme.of(context).textTheme.headline1, 41 | ), 42 | Text( 43 | 'clients do not easily find the medications they need resulting in a waste of time. This application helps the user to find a nearby pharmacy that contains the medicine they are looking for.', 44 | style: Theme.of(context).textTheme.bodyText1, 45 | ), 46 | ], 47 | ), 48 | ), 49 | Expanded( 50 | flex: 2, 51 | child: Column( 52 | children: [ 53 | CustomButton( 54 | text: "Login", 55 | press: () => 56 | Navigator.pushNamed(context, '/LoginScreen'), 57 | bgColor: primaryColor, 58 | ), 59 | SizedBox( 60 | height: 10.0, 61 | ), 62 | CustomButton( 63 | text: "Signup", 64 | press: () => 65 | Navigator.pushNamed(context, '/SignupScreen'), 66 | bgColor: secondaryColor, 67 | ), 68 | ], 69 | ), 70 | ), 71 | ], 72 | ), 73 | ), 74 | ), 75 | ), 76 | ); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /lib/components/bottom_nav_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:persistent_bottom_nav_bar/persistent-tab-view.dart'; 3 | import 'package:pharmap/screens/home/explore_screen.dart'; 4 | import 'package:pharmap/screens/home/home_screen.dart'; 5 | import 'package:pharmap/screens/home/notification_screen.dart'; 6 | import 'package:pharmap/utils/constants.dart'; 7 | 8 | class BottomNavBar extends StatefulWidget { 9 | _BottomNavBarState createState() => _BottomNavBarState(); 10 | } 11 | 12 | class _BottomNavBarState extends State { 13 | PersistentTabController _controller = 14 | PersistentTabController(initialIndex: 0); 15 | 16 | List _buildScreens() { 17 | return [ 18 | HomeScreen(), 19 | ExploreScreen(), 20 | Notifications(), 21 | ]; 22 | } 23 | 24 | List _navBarsItems() { 25 | return [ 26 | PersistentBottomNavBarItem( 27 | icon: Icon(Icons.home), 28 | title: ("Home"), 29 | activeColorPrimary: primaryColor, 30 | inactiveColorPrimary: darkPrimaryColor, 31 | ), 32 | PersistentBottomNavBarItem( 33 | icon: Icon(Icons.search), 34 | title: ("Explore"), 35 | activeColorPrimary: primaryColor, 36 | inactiveColorPrimary: darkPrimaryColor, 37 | ), 38 | PersistentBottomNavBarItem( 39 | icon: Icon(Icons.circle_notifications), 40 | title: ("News"), 41 | activeColorPrimary: primaryColor, 42 | inactiveColorPrimary: darkPrimaryColor, 43 | ), 44 | 45 | ]; 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | return PersistentTabView( 51 | context, 52 | controller: _controller, 53 | screens: _buildScreens(), 54 | items: _navBarsItems(), 55 | confineInSafeArea: true, 56 | backgroundColor: Colors.white, // Default is Colors.white. 57 | handleAndroidBackButtonPress: true, // Default is true. 58 | resizeToAvoidBottomInset: 59 | true, // This needs to be true if you want to move up the screen when keyboard appears. Default is true. 60 | stateManagement: true, // Default is true. 61 | hideNavigationBarWhenKeyboardShows: 62 | true, // Recommended to set 'resizeToAvoidBottomInset' as true while using this argument. Default is true. 63 | decoration: NavBarDecoration( 64 | borderRadius: BorderRadius.circular(10.0), 65 | colorBehindNavBar: Colors.white, 66 | ), 67 | popAllScreensOnTapOfSelectedTab: true, 68 | popActionScreens: PopActionScreensType.all, 69 | itemAnimationProperties: ItemAnimationProperties( 70 | // Navigation Bar's items animation properties. 71 | duration: Duration(milliseconds: 200), 72 | curve: Curves.ease, 73 | ), 74 | screenTransitionAnimation: ScreenTransitionAnimation( 75 | // Screen transition animation on change of selected tab. 76 | animateTabTransition: true, 77 | curve: Curves.ease, 78 | duration: Duration(milliseconds: 200), 79 | ), 80 | navBarStyle: 81 | NavBarStyle.style6, // Choose the nav bar style with this property. 82 | ); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /lib/components/map.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:math'; 3 | 4 | import 'package:flutter/material.dart'; 5 | import 'package:geolocator/geolocator.dart'; 6 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 7 | import 'package:pharmap/models/pharmacy.dart'; 8 | 9 | // ignore: must_be_immutable 10 | class CustomMap extends StatefulWidget { 11 | List pharmacies; 12 | CustomMap({this.pharmacies}); 13 | _CustomMapState createState() => _CustomMapState(); 14 | } 15 | 16 | class _CustomMapState extends State { 17 | Completer controller; 18 | static LatLng _initialPosition; 19 | static LatLng _lastMapPosition = _initialPosition; 20 | 21 | @override 22 | void initState() { 23 | super.initState(); 24 | _getUserLocation(); 25 | if (_lastMapPosition != null) { 26 | widget.pharmacies.sort((pharA, pharB) => _getDistance( 27 | pharA.pharmacyLatitude, pharA.pharmacyLongitude) 28 | .compareTo( 29 | _getDistance(pharA.pharmacyLatitude, pharA.pharmacyLongitude))); 30 | } 31 | } 32 | 33 | double _getDistance(double lat, double long) { 34 | return sqrt(pow(_lastMapPosition.longitude - long, 2) + 35 | pow(_lastMapPosition.latitude - lat, 2)); 36 | } 37 | 38 | Set _createMarker() { 39 | int index = 0; 40 | if (widget.pharmacies == null) return {}; 41 | return widget.pharmacies.map((pharmacy) { 42 | return Marker( 43 | markerId: MarkerId("marker ${index++}"), 44 | position: LatLng(pharmacy.pharmacyLatitude, pharmacy.pharmacyLongitude), 45 | infoWindow: InfoWindow(title: "marker ${index++}"), 46 | ); 47 | }).toSet(); 48 | } 49 | 50 | Future _getUserLocation() async { 51 | Position position = await Geolocator.getCurrentPosition( 52 | desiredAccuracy: LocationAccuracy.high); 53 | setState( 54 | () => _initialPosition = LatLng(position.latitude, position.longitude)); 55 | } 56 | 57 | _onMapCreated(GoogleMapController controller) { 58 | setState(() { 59 | this.controller.complete(controller); 60 | }); 61 | } 62 | 63 | MapType _currentMapType = MapType.normal; 64 | 65 | void _onMapTypeButtonPressed() { 66 | setState(() { 67 | _currentMapType = _currentMapType == MapType.normal 68 | ? MapType.satellite 69 | : MapType.normal; 70 | }); 71 | } 72 | 73 | _onCameraMove(CameraPosition position) { 74 | _lastMapPosition = position.target; 75 | } 76 | 77 | @override 78 | Widget build(BuildContext context) { 79 | if (_initialPosition == null) 80 | return Center( 81 | child: Text("Loading..."), 82 | ); 83 | 84 | return GoogleMap( 85 | initialCameraPosition: CameraPosition( 86 | target: _initialPosition, 87 | zoom: 11.0, 88 | tilt: 0, 89 | bearing: 0, 90 | ), 91 | onMapCreated: _onMapCreated, 92 | zoomGesturesEnabled: true, 93 | onCameraMove: _onCameraMove, 94 | myLocationEnabled: true, 95 | compassEnabled: true, 96 | myLocationButtonEnabled: false, 97 | markers: _createMarker(), 98 | ); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: pharmap 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.7.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | google_fonts: ^2.0.0 27 | flutter_svg: ^0.19.3 28 | firebase_core: ^1.0.1 29 | firebase_auth: ^1.0.1 30 | google_sign_in: ^5.0.0 31 | cloud_firestore: ^1.0.1 32 | provider: ^5.0.0 33 | persistent_bottom_nav_bar: ^4.0.2 34 | google_maps_flutter: ^2.0.1 35 | geocoding: ^2.0.0 36 | geolocator: ^7.0.3 37 | cupertino_icons: ^1.0.2 38 | font_awesome_flutter: ^9.0.0 39 | flutter_staggered_grid_view: ^0.4.0 40 | flutter_icons: ^1.1.0 41 | material_floating_search_bar: 42 | url_launcher: ^6.0.4 43 | 44 | dev_dependencies: 45 | flutter_test: 46 | sdk: flutter 47 | 48 | 49 | # For information on the generic Dart part of this file, see the 50 | # following page: https://dart.dev/tools/pub/pubspec 51 | 52 | # The following section is specific to Flutter. 53 | flutter: 54 | 55 | # The following line ensures that the Material Icons font is 56 | # included with your application, so that you can use the icons in 57 | # the material Icons class. 58 | uses-material-design: true 59 | 60 | # To add assets to your application, add an assets section, like this: 61 | assets: 62 | - assets/svg/ 63 | - assets/icons/ 64 | - assets/images/ 65 | 66 | 67 | # An image asset can refer to one or more resolution-specific "variants", see 68 | # https://flutter.dev/assets-and-images/#resolution-aware. 69 | 70 | # For details regarding adding assets from package dependencies, see 71 | # https://flutter.dev/assets-and-images/#from-packages 72 | 73 | # To add custom fonts to your application, add a fonts section here, 74 | # in this "flutter" section. Each entry in this list should have a 75 | # "family" key with the font family name, and a "fonts" key with a 76 | # list giving the asset and other descriptors for the font. For 77 | # example: 78 | # fonts: 79 | # - family: Schyler 80 | # fonts: 81 | # - asset: fonts/Schyler-Regular.ttf 82 | # - asset: fonts/Schyler-Italic.ttf 83 | # style: italic 84 | # - family: Trajan Pro 85 | # fonts: 86 | # - asset: fonts/TrajanPro.ttf 87 | # - asset: fonts/TrajanPro_Bold.ttf 88 | # weight: 700 89 | # 90 | # For details regarding fonts from package dependencies, 91 | # see https://flutter.dev/custom-fonts/#from-packages 92 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /lib/components/drugcard.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:pharmap/models/drug.dart'; 3 | import 'package:pharmap/screens/search/about_drug_screen.dart'; 4 | import 'package:pharmap/services/database.dart'; 5 | import 'package:pharmap/utils/constants.dart'; 6 | 7 | class DrugCard extends StatelessWidget { 8 | DrugCard({ 9 | Key key, 10 | @required this.drug, 11 | }) : super(key: key); 12 | final Drug drug; 13 | Database db = Database(); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return InkWell( 18 | onTap: () async { 19 | await db.addDrugToRecentList(drug.drugId); 20 | Navigator.push( 21 | context, 22 | MaterialPageRoute( 23 | builder: (context) => AboutDrugScreen( 24 | drug: drug, 25 | ), 26 | ), 27 | ); 28 | }, 29 | child: Container( 30 | padding: EdgeInsets.symmetric(vertical: 10), 31 | margin: EdgeInsets.only(bottom: 15), 32 | width: MediaQuery.of(context).size.width, 33 | decoration: BoxDecoration( 34 | color: Colors.white, 35 | borderRadius: BorderRadius.circular(20), 36 | boxShadow: [ 37 | BoxShadow( 38 | color: darkPrimaryColor, 39 | offset: Offset(2, 3), 40 | blurRadius: 10, 41 | ), 42 | ], 43 | ), 44 | child: Row( 45 | children: [ 46 | Expanded( 47 | flex: 2, 48 | child: Image.network(drug.drugImage), 49 | ), 50 | Expanded( 51 | flex: 6, 52 | child: Column( 53 | crossAxisAlignment: CrossAxisAlignment.start, 54 | children: [ 55 | Text(drug.drugName, 56 | style: Theme.of(context) 57 | .textTheme 58 | .headline4 59 | .copyWith(color: dangerColor, fontSize: 20)), 60 | SizedBox(height: 10), 61 | Text(drug.drugQuantity, 62 | style: Theme.of(context) 63 | .textTheme 64 | .bodyText1 65 | .copyWith(fontSize: 10)), 66 | SizedBox(height: 5), 67 | Text(drug.drugCategory, 68 | style: Theme.of(context) 69 | .textTheme 70 | .bodyText1 71 | .copyWith(fontSize: 10)), 72 | ], 73 | ), 74 | ), 75 | SizedBox(height: 15), 76 | Expanded( 77 | flex: 2, 78 | child: Column( 79 | crossAxisAlignment: CrossAxisAlignment.start, 80 | children: [ 81 | Row( 82 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 83 | children: [ 84 | Text( 85 | drug.drugPrice.toString(), 86 | style: TextStyle( 87 | color: primaryColor, 88 | fontSize: 20, 89 | ), 90 | ), 91 | Text( 92 | 'DT', 93 | style: TextStyle( 94 | color: primaryColor, 95 | fontSize: 10, 96 | ), 97 | ), 98 | ], 99 | ), 100 | ], 101 | ), 102 | ), 103 | ], 104 | ), 105 | ), 106 | ); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /lib/screens/auth/reset_password_screen.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_svg/flutter_svg.dart'; 5 | import 'package:pharmap/components/custom_button.dart'; 6 | import 'package:pharmap/components/custom_text_form_field.dart'; 7 | import 'package:pharmap/services/auth.dart'; 8 | import 'package:pharmap/utils/constants.dart'; 9 | 10 | class ResetPasswordScreen extends StatefulWidget { 11 | static final String id = '/ResetPasswordScreen'; 12 | _ResetPasswordScreenState createState() => _ResetPasswordScreenState(); 13 | } 14 | 15 | class _ResetPasswordScreenState extends State { 16 | final GlobalKey _formKey = GlobalKey(); 17 | AuthService auth = AuthService(); 18 | String emailAddress = ''; 19 | String error = ''; 20 | bool isSigningIn = false; 21 | 22 | void _handleSubmit() async { 23 | setState(() { 24 | error = ''; 25 | isSigningIn = true; 26 | }); 27 | _formKey.currentState.save(); 28 | if (emailAddress.trim() == '') { 29 | setState(() { 30 | isSigningIn = false; 31 | error = "email is required"; 32 | }); 33 | } else { 34 | await auth.sendVerificationEmail(emailAddress); 35 | Navigator.pop(context); 36 | } 37 | } 38 | 39 | @override 40 | Widget build(BuildContext context) { 41 | return Scaffold( 42 | body: SafeArea( 43 | child: Center( 44 | child: SingleChildScrollView( 45 | padding: EdgeInsets.symmetric(horizontal: 30.0), 46 | child: Form( 47 | key: _formKey, 48 | child: Column( 49 | children: [ 50 | Text( 51 | 'Reset password', 52 | style: Theme.of(context).textTheme.headline2, 53 | ), 54 | Container( 55 | child: SvgPicture.asset("assets/Svg/Forgot password-pana.svg", 56 | semanticsLabel: "pharmap illustration", 57 | height: 360, 58 | width: 360, 59 | ), 60 | ), 61 | 62 | Text( 63 | 'Enter your email to get a verfication\ncode and reset your password', 64 | style:TextStyle( 65 | color: darkPrimaryColor, 66 | ), 67 | 68 | ), 69 | SizedBox(height: 50.0), 70 | Container( 71 | padding: EdgeInsets.all(5.0), 72 | decoration: BoxDecoration( 73 | color: bgColor, 74 | borderRadius: BorderRadius.circular(10.0), 75 | boxShadow: [ 76 | BoxShadow( 77 | color: primaryColor.withAlpha(40), 78 | blurRadius: 20.0, 79 | offset: Offset(0, 10), 80 | ), 81 | ], 82 | ), 83 | child: CustomTextFormField( 84 | hintText: "Email Address", 85 | autovalidate: false, 86 | keyboardType: TextInputType.emailAddress, 87 | onSaved: (newValue) => emailAddress = newValue, 88 | ), 89 | ), 90 | SizedBox(height: 10.0), 91 | Text( 92 | error != '' ? error : '', 93 | style: TextStyle(color: dangerColor), 94 | ), 95 | SizedBox(height: 20.0), 96 | CustomButton( 97 | text: isSigningIn ? 'loading...' : 'Get verification code', 98 | bgColor: primaryColor, 99 | press: isSigningIn ? () {} : _handleSubmit, 100 | ), 101 | ], 102 | ), 103 | ), 104 | ), 105 | ), 106 | ), 107 | ); 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | pharmap 28 | 29 | 30 | 31 | 34 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 110 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /lib/components/pharmacy_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:pharmap/components/custom_button.dart'; 3 | import 'package:pharmap/models/drug.dart'; 4 | import 'package:pharmap/models/pharmacy.dart'; 5 | import 'package:pharmap/models/pharmacy_type.dart'; 6 | import 'package:pharmap/screens/home/pay_screen.dart'; 7 | import 'package:pharmap/screens/home/success_screen.dart'; 8 | import 'package:pharmap/services/database.dart'; 9 | import 'package:pharmap/utils/constants.dart'; 10 | 11 | // ignore: must_be_immutable 12 | class PharmacyListWidget extends StatelessWidget { 13 | List pharmacies; 14 | bool onTap = false; 15 | String drugId; 16 | List drugs; 17 | bool drugExist; 18 | Database db = Database(); 19 | PharmacyListWidget( 20 | {this.pharmacies, 21 | this.onTap, 22 | this.drugId, 23 | this.drugs, 24 | this.drugExist = false}); 25 | void _orderNow(BuildContext context, String title, String drugId) async { 26 | Drug drug = await db.getDrugById(drugId); 27 | String body = "$title has accepted your order(${drug.drugName}) request"; 28 | db.pushNotif(title, body).then((value) => Navigator.push( 29 | context, 30 | MaterialPageRoute( 31 | builder: (context) => 32 | SuccessScreen(text: "order requested successfully"), 33 | ), 34 | )); 35 | } 36 | 37 | @override 38 | Widget build(BuildContext context) { 39 | if (pharmacies == []) return Center(child: Text("Loading..")); 40 | return Align( 41 | alignment: Alignment.bottomLeft, 42 | child: SingleChildScrollView( 43 | scrollDirection: Axis.horizontal, 44 | child: Row( 45 | children: pharmacies 46 | .map( 47 | (e) => Container( 48 | margin: const EdgeInsets.all(15.0), 49 | padding: const EdgeInsets.symmetric( 50 | vertical: 15.0, 51 | horizontal: 30.0, 52 | ), 53 | decoration: BoxDecoration( 54 | borderRadius: BorderRadius.circular(20), 55 | color: Colors.white, 56 | boxShadow: [ 57 | BoxShadow( 58 | color: darkPrimaryColor, 59 | offset: Offset(2, 3), 60 | blurRadius: 10, 61 | ), 62 | ], 63 | ), 64 | child: Row( 65 | crossAxisAlignment: CrossAxisAlignment.start, 66 | children: [ 67 | Column( 68 | crossAxisAlignment: CrossAxisAlignment.start, 69 | mainAxisSize: MainAxisSize.min, 70 | children: [ 71 | Text( 72 | e.pharmacyName, 73 | style: Theme.of(context).textTheme.bodyText1, 74 | ), 75 | Text( 76 | e.pharmacyType == PharmacyType.day 77 | ? 'day' 78 | : 'night', 79 | style: Theme.of(context) 80 | .textTheme 81 | .bodyText1 82 | .copyWith(fontSize: 10, color: kTextColor), 83 | ), 84 | SizedBox(height: 10.0), 85 | ShowButton( 86 | isResultScreen: onTap, 87 | onTap: drugExist 88 | ? () => Navigator.push( 89 | context, 90 | MaterialPageRoute( 91 | builder: (context) => PayScreen( 92 | drug: drugs 93 | .where((element) => 94 | element.drugId == drugId) 95 | .first, 96 | ), 97 | ), 98 | ) 99 | : () => _orderNow(context, e.pharmacyName, drugId), 100 | text: drugExist ? "pay now": "order now", 101 | ), 102 | ], 103 | ), 104 | ], 105 | ), 106 | ), 107 | ) 108 | .toList(), 109 | ), 110 | ), 111 | ); 112 | } 113 | } 114 | 115 | // ignore: must_be_immutable 116 | class ShowButton extends StatelessWidget { 117 | bool isResultScreen = true; 118 | Function onTap; 119 | String text; 120 | ShowButton({this.isResultScreen, this.onTap, this.text}); 121 | 122 | @override 123 | Widget build(BuildContext context) { 124 | if (isResultScreen) { 125 | return CustomButton( 126 | width: 200.0, 127 | bgColor: dangerColor, 128 | text: text, 129 | press: onTap, 130 | ); 131 | } 132 | 133 | return SizedBox(height: 0.0); 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /lib/services/database.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:pharmap/models/article.dart'; 3 | import 'package:pharmap/models/drug.dart'; 4 | import 'package:pharmap/models/notification.dart'; 5 | import 'package:pharmap/models/pharmacy.dart'; 6 | import 'package:pharmap/models/pharmacy_type.dart'; 7 | 8 | class Database { 9 | final CollectionReference _clientsDataCollection = 10 | FirebaseFirestore.instance.collection("clients"); 11 | final CollectionReference _pharmacyDataCollection = 12 | FirebaseFirestore.instance.collection("pharmacy"); 13 | final CollectionReference _drugsDataCollection = 14 | FirebaseFirestore.instance.collection("drugs"); 15 | final CollectionReference _reccentDrugsDataCollection = 16 | FirebaseFirestore.instance.collection("recent"); 17 | final CollectionReference _notifDataCollection = 18 | FirebaseFirestore.instance.collection("notif"); 19 | final CollectionReference _articleDataCollection = 20 | FirebaseFirestore.instance.collection("articles"); 21 | Future addUserInfo(String uid, String fullName, int phoneNumber) async { 22 | return await _clientsDataCollection.doc(uid).set({ 23 | 'fullName': fullName, 24 | 'phoneNumber': phoneNumber, 25 | }); 26 | } 27 | 28 | Future addPharmacyData( 29 | String uid, 30 | String pharmacyCode, 31 | String pharmacyName, 32 | double pharmacyLongitude, 33 | double pharmacyLatitude, 34 | String pharmacyType) async { 35 | return await _pharmacyDataCollection.doc(pharmacyCode).set({ 36 | 'pharmacyOwner': uid, 37 | 'pharmacyName': pharmacyName, 38 | 'pharmacyLongitude': pharmacyLongitude, 39 | 'pharmacyLatitude': pharmacyLatitude, 40 | 'pharmacyType': pharmacyType 41 | }); 42 | } 43 | 44 | Future getFilteredDrugs(String query) async { 45 | QuerySnapshot drugs = await _drugsDataCollection.get(); 46 | List drugsList = drugs.docs; 47 | return drugsList.where((drug) => drug["searchKeys"].contains(query)); 48 | } 49 | 50 | Future addDrugToRecentList(String drugId) async { 51 | return await _reccentDrugsDataCollection.doc(drugId).set({}); 52 | } 53 | 54 | Future> getRecentDrugs() async { 55 | QuerySnapshot recent = await _reccentDrugsDataCollection.get(); 56 | List recentList = recent.docs; 57 | List drugs = []; 58 | for (QueryDocumentSnapshot element in recentList) { 59 | Future drugFuture = 60 | _drugsDataCollection.doc(element.id).get(); 61 | drugFuture.then( 62 | (value) => drugs.add( 63 | Drug( 64 | drugCategory: value.data()["drugCategory"], 65 | drugDescription: value.data()["drugDescription"], 66 | drugId: value.id, 67 | drugImage: value.data()["drugImage"], 68 | drugName: value.data()["drugName"], 69 | drugPrice: value.data()["drugPrice"] / 1.0, 70 | drugQuantity: value.data()["drugQuantity"], 71 | drugType: value.data()["drugType"], 72 | ), 73 | ), 74 | ); 75 | } 76 | return drugs; 77 | } 78 | 79 | Future> getPharmaciesList() async { 80 | QuerySnapshot pharmacies = await _pharmacyDataCollection.get(); 81 | List list = pharmacies.docs; 82 | return list 83 | .map( 84 | (element) => Pharmacy( 85 | pharmacyName: element.data()["pharmacyName"], 86 | pharmacyOwnerId: element.data()["pharmacyOwner"], 87 | pharmacyLatitude: element.data()["pharmacyLatitude"] / 1.0, 88 | pharmacyLongitude: element.data()["pharmacyLongitude"] / 1.0, 89 | pharmacyType: element.data()["pharmacyType"] == "night" 90 | ? PharmacyType.night 91 | : PharmacyType.day, 92 | pharmacyDrugs: element.data()["pharmacyDrugs"], 93 | ), 94 | ) 95 | .toList(); 96 | } 97 | 98 | Future> getDrugs() async { 99 | QuerySnapshot drugs = await _drugsDataCollection.get(); 100 | List list = drugs.docs; 101 | return list 102 | .map( 103 | (drug) => Drug( 104 | drugCategory: drug.data()['drugCategory'], 105 | drugDescription: drug.data()["drugDescription"], 106 | drugId: drug.id, 107 | drugImage: drug.data()["drugImage"], 108 | drugName: drug.data()["drugName"], 109 | drugPrice: drug.data()["drugPrice"] / 1.0, 110 | drugQuantity: drug.data()["drugQuantity"], 111 | drugType: drug.data()["drugType"], 112 | ), 113 | ) 114 | .toList(); 115 | } 116 | 117 | Future pushNotif(String title, String body) async { 118 | await _notifDataCollection.add({"title": title, "body": body}); 119 | } 120 | 121 | Future> getNotifications() async { 122 | QuerySnapshot notifs = await _notifDataCollection.get(); 123 | List list = notifs.docs; 124 | return list 125 | .map( 126 | (notif) => Notif( 127 | title: notif.data()['title'], 128 | body: notif.data()["body"], 129 | ), 130 | ) 131 | .toList(); 132 | } 133 | 134 | Future> getArticles() async { 135 | QuerySnapshot articles = await _articleDataCollection.get(); 136 | List list = articles.docs; 137 | return list 138 | .map( 139 | (article) => Article( 140 | url: article.data()['url'], 141 | image: article.data()["image"], 142 | title: article.data()["title"], 143 | body: article.data()["body"], 144 | ), 145 | ) 146 | .toList(); 147 | } 148 | 149 | Future getDrugById(String drugId) { 150 | return _drugsDataCollection.doc(drugId).get().then( 151 | (value) => Drug( 152 | drugCategory: value['drugCategory'], 153 | drugDescription: value["drugDescription"], 154 | drugId: drugId, 155 | drugImage: value["drugImage"], 156 | drugName: value["drugName"], 157 | drugPrice: value["drugPrice"] / 1.0, 158 | drugQuantity: value["drugQuantity"], 159 | drugType: value["drugType"], 160 | ), 161 | ); 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /lib/screens/auth/login_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_svg/flutter_svg.dart'; 4 | import 'package:pharmap/components/custom_button.dart'; 5 | import 'package:pharmap/components/custom_text_form_field.dart'; 6 | import 'package:pharmap/components/login_with_social_media.dart'; 7 | import 'package:pharmap/services/auth.dart'; 8 | import 'package:pharmap/utils/constants.dart'; 9 | 10 | class LoginScreen extends StatefulWidget { 11 | static final String id = '/LoginScreen'; 12 | _LoginScreenState createState() => _LoginScreenState(); 13 | } 14 | 15 | class _LoginScreenState extends State { 16 | final GlobalKey _formKey = GlobalKey(); 17 | AuthService auth = AuthService(); 18 | String emailAddress; 19 | String password; 20 | List errors = []; 21 | bool isSigningIn = false; 22 | 23 | void _handleSubmit() async { 24 | setState(() { 25 | errors = []; 26 | isSigningIn = true; 27 | }); 28 | _formKey.currentState.save(); 29 | dynamic user = 30 | await auth.signInWithEmailAndPassword(emailAddress, password); 31 | if (user is User) { 32 | Navigator.pushReplacementNamed(context, '/WrapperScreen'); 33 | } else { 34 | setState(() { 35 | errors.add(user); 36 | isSigningIn = false; 37 | }); 38 | } 39 | } 40 | 41 | void _handleGoogleSignIn() async { 42 | setState(() => isSigningIn = true); 43 | 44 | User user = await auth.signInWithGoogle('signup'); 45 | if (user != null) { 46 | Navigator.pushReplacementNamed(context, '/WrapperScreen'); 47 | } 48 | } 49 | 50 | void _handleTwitterSignIn() async { 51 | print('sign in with twitter'); 52 | } 53 | 54 | void _handleFacebookSignIn() async { 55 | print('sign in with facebook'); 56 | } 57 | 58 | Widget build(BuildContext context) { 59 | return Scaffold( 60 | body: SafeArea( 61 | child: Center( 62 | child: SingleChildScrollView( 63 | padding: EdgeInsets.symmetric(horizontal: 30.0), 64 | child: Form( 65 | key: _formKey, 66 | child: Column( 67 | children: [ 68 | Text( 69 | 'Welcome back!\nLogin to continue', 70 | style: Theme.of(context).textTheme.headline2, 71 | ), 72 | SizedBox(height: 10.0), 73 | Container( 74 | child: SvgPicture.asset( 75 | "assets/Svg/login.svg", 76 | semanticsLabel: "pharmap illustration", 77 | ), 78 | ), 79 | Container( 80 | padding: EdgeInsets.all(5.0), 81 | decoration: BoxDecoration( 82 | color: bgColor, 83 | borderRadius: BorderRadius.circular(10.0), 84 | boxShadow: [ 85 | BoxShadow( 86 | color: primaryColor.withAlpha(40), 87 | blurRadius: 20.0, 88 | offset: Offset(0, 10), 89 | ), 90 | ], 91 | ), 92 | child: Column( 93 | children: [ 94 | CustomTextFormField( 95 | hintText: "Email Address", 96 | autovalidate: false, 97 | keyboardType: TextInputType.emailAddress, 98 | onSaved: (newValue) => emailAddress = newValue, 99 | ), 100 | CustomTextFormField( 101 | hintText: "Password", 102 | autovalidate: false, 103 | isPassword: true, 104 | obscureText: true, 105 | onSaved: (newValue) => password = newValue, 106 | ), 107 | ], 108 | ), 109 | ), 110 | Container( 111 | margin: EdgeInsets.symmetric(vertical: 10.0), 112 | child: Column( 113 | children: errors 114 | .map( 115 | (element) => Text( 116 | element, 117 | style: TextStyle(color: dangerColor), 118 | ), 119 | ) 120 | .toList(), 121 | ), 122 | ), 123 | SizedBox(height: 20.0), 124 | CustomButton( 125 | text: isSigningIn ? 'loading...' : 'Login', 126 | bgColor: primaryColor, 127 | press: isSigningIn ? () {} : _handleSubmit, 128 | ), 129 | SizedBox(height: 30.0), 130 | Row( 131 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 132 | children: [ 133 | InkWell( 134 | onTap: () => Navigator.of(context) 135 | .pushNamed('/ResetPasswordScreen'), 136 | child: Text( 137 | "Forgot Password?", 138 | style: TextStyle( 139 | color: secondaryColor, 140 | ), 141 | ), 142 | ), 143 | InkWell( 144 | onTap: () => 145 | Navigator.of(context).pushNamed('/SignupScreen'), 146 | child: Text( 147 | "You don't have an account?", 148 | style: TextStyle( 149 | color: secondaryColor, 150 | ), 151 | ), 152 | ), 153 | ], 154 | ), 155 | SizedBox(height: 100.0), 156 | Column( 157 | crossAxisAlignment: CrossAxisAlignment.center, 158 | children: [ 159 | Text("or sign in with", 160 | style: TextStyle( 161 | color: darkPrimaryColor, 162 | )), 163 | Row( 164 | mainAxisAlignment: MainAxisAlignment.center, 165 | children: [ 166 | LoginWithSocialMedia( 167 | assetsPath: 'assets/icons/google.svg', 168 | label: 'google logo', 169 | onTap: _handleGoogleSignIn, 170 | ), 171 | LoginWithSocialMedia( 172 | assetsPath: 'assets/icons/facebook.svg', 173 | label: 'facebook logo', 174 | onTap: _handleFacebookSignIn, 175 | ), 176 | LoginWithSocialMedia( 177 | assetsPath: 'assets/icons/twitter.svg', 178 | label: 'twitter logo', 179 | onTap: _handleTwitterSignIn, 180 | ), 181 | ], 182 | ), 183 | ], 184 | ), 185 | ], 186 | ), 187 | ), 188 | ), 189 | ), 190 | ), 191 | ); 192 | } 193 | } 194 | -------------------------------------------------------------------------------- /lib/screens/auth/Signup_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/rendering.dart'; 4 | import 'package:flutter_svg/flutter_svg.dart'; 5 | import 'package:pharmap/components/custom_button.dart'; 6 | import 'package:pharmap/components/custom_text_form_field.dart'; 7 | import 'package:pharmap/components/login_with_social_media.dart'; 8 | import 'package:pharmap/services/auth.dart'; 9 | import 'package:pharmap/utils/constants.dart'; 10 | 11 | class SignupScreen extends StatefulWidget { 12 | static final String id = '/SignupScreen'; 13 | _SignupScreenState createState() => _SignupScreenState(); 14 | } 15 | 16 | class _SignupScreenState extends State { 17 | final GlobalKey _formKey = GlobalKey(); 18 | AuthService auth = AuthService(); 19 | String fullName; 20 | String emailAddress; 21 | String phoneNumber; 22 | String password; 23 | List errors = []; 24 | bool isSigningIn = false; 25 | 26 | List checkUserInputValidity() { 27 | List errors = []; 28 | if (phoneNumber.trim() == '') { 29 | errors.add('phone number must be provided'); 30 | } 31 | 32 | if (fullName.trim() == '') { 33 | errors.add('full name must be provided'); 34 | } 35 | return errors; 36 | } 37 | 38 | void _handleSubmit() async { 39 | setState(() { 40 | errors = []; 41 | isSigningIn = true; 42 | }); 43 | _formKey.currentState.save(); 44 | List userInputState = checkUserInputValidity(); 45 | if (userInputState.isNotEmpty) { 46 | setState(() => errors.addAll(userInputState)); 47 | return; 48 | } 49 | 50 | dynamic user = await auth.signupWithEmailAndPassword( 51 | emailAddress, password, fullName, int.parse(phoneNumber)); 52 | if (user is User) { 53 | Navigator.pushNamed(context, '/OptionScreen'); 54 | } else { 55 | setState(() { 56 | errors.add(user); 57 | isSigningIn = false; 58 | }); 59 | } 60 | } 61 | 62 | void _handleGoogleSignIn() async { 63 | setState(() => isSigningIn = true); 64 | User user = await auth.signInWithGoogle('signup'); 65 | if (user != null) { 66 | Navigator.pushNamed(context, '/OptionScreen'); 67 | } 68 | } 69 | 70 | void _handleTwitterSignIn() async { 71 | print('sign in with twitter'); 72 | } 73 | 74 | void _handleFacebookSignIn() async { 75 | print('sign in with facebook'); 76 | } 77 | 78 | @override 79 | Widget build(BuildContext context) { 80 | return Scaffold( 81 | body: SafeArea( 82 | child: Center( 83 | child: SingleChildScrollView( 84 | padding: EdgeInsets.symmetric(horizontal: 30.0), 85 | child: Form( 86 | key: _formKey, 87 | child: Column( 88 | children: [ 89 | Text( 90 | 'REGISTER TO GET STARTED!', 91 | style: Theme.of(context).textTheme.headline2, 92 | ), 93 | Container( 94 | child: SvgPicture.asset("assets/Svg/signup.svg", 95 | semanticsLabel: "pharmap illustration", 96 | height: 360, 97 | width: 360, 98 | ), 99 | ), 100 | 101 | SizedBox(height: 50.0), 102 | Container( 103 | padding: EdgeInsets.all(5.0), 104 | decoration: BoxDecoration( 105 | color: bgColor, 106 | borderRadius: BorderRadius.circular(10.0), 107 | boxShadow: [ 108 | BoxShadow( 109 | color: primaryColor.withAlpha(40), 110 | blurRadius: 20.0, 111 | offset: Offset(0, 10), 112 | ), 113 | ], 114 | ), 115 | child: Column( 116 | children: [ 117 | CustomTextFormField( 118 | hintText: "Full Name", 119 | autovalidate: false, 120 | onSaved: (newValue) => fullName = newValue, 121 | ), 122 | CustomTextFormField( 123 | hintText: "Email Address", 124 | autovalidate: false, 125 | keyboardType: TextInputType.emailAddress, 126 | onSaved: (newValue) => emailAddress = newValue, 127 | ), 128 | CustomTextFormField( 129 | hintText: "Phone number", 130 | autovalidate: false, 131 | onSaved: (newValue) => phoneNumber = newValue, 132 | ), 133 | CustomTextFormField( 134 | hintText: "Password", 135 | autovalidate: false, 136 | isPassword: true, 137 | obscureText: true, 138 | onSaved: (newValue) => password = newValue, 139 | ), 140 | ], 141 | ), 142 | ), 143 | Container( 144 | margin: EdgeInsets.symmetric(vertical: 10.0), 145 | child: Column( 146 | children: errors 147 | .map( 148 | (element) => Text( 149 | element, 150 | style: TextStyle(color: dangerColor), 151 | ), 152 | ) 153 | .toList(), 154 | ), 155 | ), 156 | SizedBox(height: 10.0), 157 | CustomButton( 158 | text: isSigningIn ? 'loading...' : 'Continue', 159 | bgColor: primaryColor, 160 | press: isSigningIn ? () {} : _handleSubmit, 161 | ), 162 | SizedBox(height: 30.0), 163 | InkWell( 164 | onTap: () => 165 | Navigator.of(context).pushNamed('/LoginScreen'), 166 | child: Text( 167 | "Already have an account?", 168 | style: TextStyle( 169 | color: secondaryColor, 170 | ), 171 | ), 172 | ), 173 | SizedBox(height: 100.0), 174 | Column( 175 | crossAxisAlignment: CrossAxisAlignment.center, 176 | children: [ 177 | Text('or sign up with'), 178 | Row( 179 | mainAxisAlignment: MainAxisAlignment.center, 180 | children: [ 181 | LoginWithSocialMedia( 182 | assetsPath: 'assets/icons/google.svg', 183 | label: 'google logo', 184 | onTap: _handleGoogleSignIn, 185 | ), 186 | LoginWithSocialMedia( 187 | assetsPath: 'assets/icons/facebook.svg', 188 | label: 'facebook logo', 189 | onTap: _handleFacebookSignIn, 190 | ), 191 | LoginWithSocialMedia( 192 | assetsPath: 'assets/icons/twitter.svg', 193 | label: 'twitter logo', 194 | onTap: _handleTwitterSignIn, 195 | ), 196 | ], 197 | ), 198 | ], 199 | ), 200 | ], 201 | ), 202 | ), 203 | ), 204 | ), 205 | ), 206 | ); 207 | } 208 | } 209 | -------------------------------------------------------------------------------- /lib/screens/home/pay_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:pharmap/components/custom_button.dart'; 3 | import 'package:pharmap/components/drugcard.dart'; 4 | import 'package:pharmap/models/drug.dart'; 5 | import 'package:pharmap/screens/home/success_screen.dart'; 6 | import 'package:pharmap/utils/constants.dart'; 7 | 8 | // ignore: must_be_immutable 9 | class PayScreen extends StatefulWidget { 10 | static final String id = "/PayScreen"; 11 | Drug drug; 12 | PayScreen({this.drug}); 13 | @override 14 | _PayScreenState createState() => _PayScreenState(); 15 | } 16 | 17 | class _PayScreenState extends State { 18 | TextEditingController cardNumber = TextEditingController(); 19 | TextEditingController year = TextEditingController(); 20 | TextEditingController month = TextEditingController(); 21 | TextEditingController cvc = TextEditingController(); 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | Widget addThisCard = CustomButton( 26 | text: "order now", 27 | press: () => Navigator.push( 28 | context, 29 | MaterialPageRoute( 30 | builder: (context) => 31 | SuccessScreen(text: "order requested successfully"), 32 | ), 33 | ), 34 | bgColor: primaryColor, 35 | ); 36 | 37 | return Scaffold( 38 | backgroundColor: Colors.white, 39 | body: SafeArea( 40 | child: SingleChildScrollView( 41 | child: Container( 42 | margin: const EdgeInsets.only(top: kToolbarHeight), 43 | padding: EdgeInsets.symmetric(horizontal: 16.0), 44 | child: Column( 45 | children: [ 46 | Text( 47 | 'Fill the form to proceed the payement', 48 | style: Theme.of(context).textTheme.headline2, 49 | ), 50 | SizedBox(height: 10.0), 51 | DrugCard(drug: widget.drug), 52 | SizedBox(height: 10.0), 53 | Container( 54 | padding: EdgeInsets.all(16.0), 55 | height: 250, 56 | width: MediaQuery.of(context).size.width, 57 | decoration: BoxDecoration( 58 | color: Colors.white60, 59 | borderRadius: BorderRadius.only( 60 | bottomRight: Radius.circular(10), 61 | bottomLeft: Radius.circular(10))), 62 | child: Column( 63 | mainAxisAlignment: MainAxisAlignment.spaceAround, 64 | children: [ 65 | Container( 66 | padding: EdgeInsets.only(left: 16.0), 67 | decoration: BoxDecoration( 68 | borderRadius: BorderRadius.all(Radius.circular(5)), 69 | color: Colors.grey[200], 70 | ), 71 | child: TextField( 72 | // inputFormatters: [ 73 | // LengthLimitingTextInputFormatter(16) 74 | // ], 75 | controller: cardNumber, 76 | onChanged: (val) { 77 | setState(() {}); 78 | }, 79 | decoration: InputDecoration( 80 | border: InputBorder.none, 81 | hintText: 'Card Number'), 82 | ), 83 | ), 84 | Row( 85 | children: [ 86 | Flexible( 87 | child: Container( 88 | padding: EdgeInsets.only(left: 16.0), 89 | decoration: BoxDecoration( 90 | borderRadius: 91 | BorderRadius.all(Radius.circular(5)), 92 | color: Colors.grey[200], 93 | ), 94 | child: TextField( 95 | // inputFormatters: [ 96 | // LengthLimitingTextInputFormatter(2) 97 | // ], 98 | controller: month, 99 | decoration: InputDecoration( 100 | border: InputBorder.none, 101 | hintText: 'Month'), 102 | onChanged: (val) { 103 | setState(() {}); 104 | }, 105 | ), 106 | ), 107 | ), 108 | SizedBox( 109 | width: 8.0, 110 | ), 111 | Flexible( 112 | child: Container( 113 | padding: EdgeInsets.only(left: 16.0), 114 | decoration: BoxDecoration( 115 | borderRadius: 116 | BorderRadius.all(Radius.circular(5)), 117 | color: Colors.grey[200], 118 | ), 119 | child: TextField( 120 | // inputFormatters: [ 121 | // LengthLimitingTextInputFormatter(2) 122 | // ], 123 | controller: year, 124 | decoration: InputDecoration( 125 | border: InputBorder.none, hintText: 'Year'), 126 | onChanged: (val) { 127 | setState(() {}); 128 | }, 129 | ), 130 | ), 131 | ), 132 | SizedBox( 133 | width: 8.0, 134 | ), 135 | Flexible( 136 | child: Container( 137 | padding: EdgeInsets.only(left: 16.0), 138 | decoration: BoxDecoration( 139 | borderRadius: 140 | BorderRadius.all(Radius.circular(5)), 141 | color: Colors.grey[200], 142 | ), 143 | child: TextField( 144 | controller: cvc, 145 | decoration: InputDecoration( 146 | border: InputBorder.none, hintText: 'CVC'), 147 | onChanged: (val) { 148 | setState(() {}); 149 | }, 150 | ), 151 | ), 152 | ) 153 | ], 154 | ), 155 | Container( 156 | padding: EdgeInsets.only(left: 16.0), 157 | decoration: BoxDecoration( 158 | borderRadius: BorderRadius.all(Radius.circular(5)), 159 | color: Colors.grey[200], 160 | ), 161 | child: TextField( 162 | decoration: InputDecoration( 163 | border: InputBorder.none, 164 | hintText: 'Name on card'), 165 | onChanged: (val) { 166 | setState(() {}); 167 | }, 168 | ), 169 | ), 170 | ], 171 | ), 172 | ), 173 | SizedBox(height: 20.0), 174 | Center( 175 | child: Padding( 176 | padding: EdgeInsets.only(bottom: 20), 177 | child: addThisCard, 178 | )) 179 | ], 180 | ), 181 | ), 182 | ), 183 | ), 184 | ); 185 | } 186 | } 187 | -------------------------------------------------------------------------------- /lib/screens/auth/option_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:pharmap/components/custom_button.dart'; 4 | import 'package:pharmap/components/custom_text_form_field.dart'; 5 | import 'package:pharmap/components/option_card.dart'; 6 | import 'package:pharmap/models/pharmacy_type.dart'; 7 | import 'package:pharmap/utils/constants.dart'; 8 | import 'package:provider/provider.dart'; 9 | import 'package:pharmap/services/database.dart'; 10 | 11 | enum ScreenState { choose, fillPharmacy } 12 | 13 | class OptionScreen extends StatefulWidget { 14 | static final String id = '/OptionScreen'; 15 | _OptionScreenState createState() => _OptionScreenState(); 16 | } 17 | 18 | class _OptionScreenState extends State { 19 | ScreenState _screenState = ScreenState.choose; 20 | final GlobalKey _formKey = GlobalKey(); 21 | String pharmacyCode; 22 | String pharmacyName; 23 | String pharmacyLongitude; 24 | String pharmacyLatitude; 25 | PharmacyType pharmacyType; 26 | List errors = []; 27 | bool isSigningIn = false; 28 | 29 | List checkUserInputValidity() { 30 | List errors = []; 31 | if (pharmacyCode.trim() == '') { 32 | errors.add('pharmacy code must be provided'); 33 | } 34 | 35 | if (pharmacyName.trim() == '') { 36 | errors.add('pharmacy name must be provided'); 37 | } 38 | 39 | if (pharmacyLongitude.trim() == '') { 40 | errors.add('pharmacy longitude must be provided'); 41 | } 42 | 43 | if (pharmacyLatitude.trim() == '') { 44 | errors.add('pharmacy latitude must be provided'); 45 | } 46 | 47 | if (pharmacyType == null) { 48 | errors.add('pharmacy type must be provided'); 49 | } 50 | return errors; 51 | } 52 | 53 | void _handleSubmit() async { 54 | setState(() { 55 | errors = []; 56 | isSigningIn = true; 57 | }); 58 | User user = Provider.of(context, listen: false); 59 | _formKey.currentState.save(); 60 | Database db = Database(); 61 | 62 | List userInputState = checkUserInputValidity(); 63 | if (userInputState.isNotEmpty) { 64 | setState(() { 65 | errors.addAll(userInputState); 66 | isSigningIn = false; 67 | }); 68 | return; 69 | } 70 | 71 | await db.addPharmacyData( 72 | user.uid, 73 | pharmacyCode, 74 | pharmacyName, 75 | double.parse(pharmacyLongitude), 76 | double.parse(pharmacyLatitude), 77 | pharmacyType == PharmacyType.day ? 'day' : 'night'); 78 | Navigator.pushReplacementNamed(context, '/WrapperScreen'); 79 | } 80 | 81 | Widget _chooseWidget() { 82 | final Size _size = MediaQuery.of(context).size; 83 | return Scaffold( 84 | body: SafeArea( 85 | child: Padding( 86 | padding: EdgeInsets.symmetric( 87 | horizontal: 30.0, 88 | vertical: 15.0, 89 | ), 90 | child: SizedBox( 91 | width: _size.width, 92 | height: _size.height, 93 | child: Column( 94 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 95 | children: [ 96 | Expanded( 97 | flex: 5, 98 | child: OptionCard( 99 | onTap: () => Navigator.pushReplacementNamed( 100 | context, '/WrapperScreen'), 101 | label: 'CLIENT', 102 | assetPath: "assets/Svg/client.svg", 103 | ), 104 | ), 105 | Expanded( 106 | flex: 5, 107 | child: OptionCard( 108 | onTap: () => 109 | setState(() => _screenState = ScreenState.fillPharmacy), 110 | label: 'PHARMACIST', 111 | assetPath: "assets/Svg/pharmacist.svg", 112 | ), 113 | ), 114 | ], 115 | ), 116 | ), 117 | ), 118 | ), 119 | ); 120 | } 121 | 122 | Widget _fillPharmacyDataWidget() { 123 | return Scaffold( 124 | body: SafeArea( 125 | child: Center( 126 | child: SingleChildScrollView( 127 | padding: EdgeInsets.symmetric(horizontal: 30.0), 128 | child: Form( 129 | key: _formKey, 130 | child: Column( 131 | crossAxisAlignment: CrossAxisAlignment.start, 132 | children: [ 133 | Text( 134 | 'Fill your pharmacy\nData to get started', 135 | style: Theme.of(context).textTheme.headline2, 136 | ), 137 | SizedBox(height: 50.0), 138 | Container( 139 | padding: EdgeInsets.all(5.0), 140 | decoration: BoxDecoration( 141 | color: bgColor, 142 | borderRadius: BorderRadius.circular(10.0), 143 | boxShadow: [ 144 | BoxShadow( 145 | color: primaryColor.withAlpha(40), 146 | blurRadius: 20.0, 147 | offset: Offset(0, 10), 148 | ), 149 | ], 150 | ), 151 | child: Column( 152 | children: [ 153 | CustomTextFormField( 154 | autovalidate: false, 155 | hintText: "Pharmacy Code", 156 | onSaved: (String newValue) => pharmacyCode = newValue, 157 | ), 158 | CustomTextFormField( 159 | autovalidate: false, 160 | hintText: "Pharmacy Name", 161 | onSaved: (String newValue) => pharmacyName = newValue, 162 | ), 163 | CustomTextFormField( 164 | autovalidate: false, 165 | hintText: "Pharmacy Longitude", 166 | onSaved: (String newValue) => 167 | pharmacyLongitude = newValue, 168 | ), 169 | CustomTextFormField( 170 | autovalidate: false, 171 | hintText: "Pharmacy Latitude", 172 | onSaved: (String newValue) => 173 | pharmacyLatitude = newValue, 174 | ), 175 | ], 176 | ), 177 | ), 178 | SizedBox(height: 30.0), 179 | Text('Pharmacy type'), 180 | ListTile( 181 | title: const Text('night'), 182 | leading: Radio( 183 | value: PharmacyType.night, 184 | groupValue: pharmacyType, 185 | onChanged: (PharmacyType value) { 186 | setState(() { 187 | pharmacyType = value; 188 | }); 189 | }, 190 | ), 191 | ), 192 | ListTile( 193 | title: const Text('day'), 194 | leading: Radio( 195 | value: PharmacyType.day, 196 | groupValue: pharmacyType, 197 | onChanged: (PharmacyType value) { 198 | setState(() { 199 | pharmacyType = value; 200 | }); 201 | }, 202 | ), 203 | ), 204 | Container( 205 | margin: EdgeInsets.symmetric(vertical: 10.0), 206 | child: Column( 207 | children: errors 208 | .map( 209 | (element) => Text( 210 | element, 211 | style: TextStyle(color: dangerColor), 212 | ), 213 | ) 214 | .toList(), 215 | ), 216 | ), 217 | SizedBox(height: 10.0), 218 | CustomButton( 219 | text: isSigningIn? 'loading...': 'Save data', 220 | bgColor: primaryColor, 221 | press: isSigningIn? (){}: _handleSubmit, 222 | ), 223 | ], 224 | ), 225 | ), 226 | ), 227 | ), 228 | ), 229 | ); 230 | } 231 | 232 | @override 233 | Widget build(BuildContext context) { 234 | if (_screenState == ScreenState.fillPharmacy) { 235 | return _fillPharmacyDataWidget(); 236 | } 237 | return _chooseWidget(); 238 | } 239 | } 240 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.5.0" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.1.0" 18 | characters: 19 | dependency: transitive 20 | description: 21 | name: characters 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.1.0" 25 | charcode: 26 | dependency: transitive 27 | description: 28 | name: charcode 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.2.0" 32 | clock: 33 | dependency: transitive 34 | description: 35 | name: clock 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.0" 39 | cloud_firestore: 40 | dependency: "direct main" 41 | description: 42 | name: cloud_firestore 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.0.7" 46 | cloud_firestore_platform_interface: 47 | dependency: transitive 48 | description: 49 | name: cloud_firestore_platform_interface 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "4.0.3" 53 | cloud_firestore_web: 54 | dependency: transitive 55 | description: 56 | name: cloud_firestore_web 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.0.7" 60 | collection: 61 | dependency: transitive 62 | description: 63 | name: collection 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.15.0" 67 | convert: 68 | dependency: transitive 69 | description: 70 | name: convert 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "2.1.1" 74 | crypto: 75 | dependency: transitive 76 | description: 77 | name: crypto 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "3.0.1" 81 | cupertino_icons: 82 | dependency: "direct main" 83 | description: 84 | name: cupertino_icons 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "1.0.2" 88 | fake_async: 89 | dependency: transitive 90 | description: 91 | name: fake_async 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "1.2.0" 95 | ffi: 96 | dependency: transitive 97 | description: 98 | name: ffi 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "1.0.0" 102 | file: 103 | dependency: transitive 104 | description: 105 | name: file 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "6.1.0" 109 | firebase_auth: 110 | dependency: "direct main" 111 | description: 112 | name: firebase_auth 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "1.1.2" 116 | firebase_auth_platform_interface: 117 | dependency: transitive 118 | description: 119 | name: firebase_auth_platform_interface 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "4.2.0" 123 | firebase_auth_web: 124 | dependency: transitive 125 | description: 126 | name: firebase_auth_web 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "1.1.0" 130 | firebase_core: 131 | dependency: "direct main" 132 | description: 133 | name: firebase_core 134 | url: "https://pub.dartlang.org" 135 | source: hosted 136 | version: "1.1.0" 137 | firebase_core_platform_interface: 138 | dependency: transitive 139 | description: 140 | name: firebase_core_platform_interface 141 | url: "https://pub.dartlang.org" 142 | source: hosted 143 | version: "4.0.0" 144 | firebase_core_web: 145 | dependency: transitive 146 | description: 147 | name: firebase_core_web 148 | url: "https://pub.dartlang.org" 149 | source: hosted 150 | version: "1.0.2" 151 | flutter: 152 | dependency: "direct main" 153 | description: flutter 154 | source: sdk 155 | version: "0.0.0" 156 | flutter_icons: 157 | dependency: "direct main" 158 | description: 159 | name: flutter_icons 160 | url: "https://pub.dartlang.org" 161 | source: hosted 162 | version: "1.1.0" 163 | flutter_plugin_android_lifecycle: 164 | dependency: transitive 165 | description: 166 | name: flutter_plugin_android_lifecycle 167 | url: "https://pub.dartlang.org" 168 | source: hosted 169 | version: "2.0.1" 170 | flutter_staggered_grid_view: 171 | dependency: "direct main" 172 | description: 173 | name: flutter_staggered_grid_view 174 | url: "https://pub.dartlang.org" 175 | source: hosted 176 | version: "0.4.0" 177 | flutter_svg: 178 | dependency: "direct main" 179 | description: 180 | name: flutter_svg 181 | url: "https://pub.dartlang.org" 182 | source: hosted 183 | version: "0.19.3" 184 | flutter_test: 185 | dependency: "direct dev" 186 | description: flutter 187 | source: sdk 188 | version: "0.0.0" 189 | flutter_web_plugins: 190 | dependency: transitive 191 | description: flutter 192 | source: sdk 193 | version: "0.0.0" 194 | font_awesome_flutter: 195 | dependency: "direct main" 196 | description: 197 | name: font_awesome_flutter 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "9.0.0" 201 | geocoding: 202 | dependency: "direct main" 203 | description: 204 | name: geocoding 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "2.0.0" 208 | geocoding_platform_interface: 209 | dependency: transitive 210 | description: 211 | name: geocoding_platform_interface 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "2.0.0" 215 | geolocator: 216 | dependency: "direct main" 217 | description: 218 | name: geolocator 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "7.0.3" 222 | geolocator_platform_interface: 223 | dependency: transitive 224 | description: 225 | name: geolocator_platform_interface 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "2.0.2" 229 | geolocator_web: 230 | dependency: transitive 231 | description: 232 | name: geolocator_web 233 | url: "https://pub.dartlang.org" 234 | source: hosted 235 | version: "2.0.3" 236 | google_fonts: 237 | dependency: "direct main" 238 | description: 239 | name: google_fonts 240 | url: "https://pub.dartlang.org" 241 | source: hosted 242 | version: "2.0.0" 243 | google_maps_flutter: 244 | dependency: "direct main" 245 | description: 246 | name: google_maps_flutter 247 | url: "https://pub.dartlang.org" 248 | source: hosted 249 | version: "2.0.3" 250 | google_maps_flutter_platform_interface: 251 | dependency: transitive 252 | description: 253 | name: google_maps_flutter_platform_interface 254 | url: "https://pub.dartlang.org" 255 | source: hosted 256 | version: "2.0.4" 257 | google_sign_in: 258 | dependency: "direct main" 259 | description: 260 | name: google_sign_in 261 | url: "https://pub.dartlang.org" 262 | source: hosted 263 | version: "5.0.2" 264 | google_sign_in_platform_interface: 265 | dependency: transitive 266 | description: 267 | name: google_sign_in_platform_interface 268 | url: "https://pub.dartlang.org" 269 | source: hosted 270 | version: "2.0.1" 271 | google_sign_in_web: 272 | dependency: transitive 273 | description: 274 | name: google_sign_in_web 275 | url: "https://pub.dartlang.org" 276 | source: hosted 277 | version: "0.10.0" 278 | http: 279 | dependency: transitive 280 | description: 281 | name: http 282 | url: "https://pub.dartlang.org" 283 | source: hosted 284 | version: "0.13.2" 285 | http_parser: 286 | dependency: transitive 287 | description: 288 | name: http_parser 289 | url: "https://pub.dartlang.org" 290 | source: hosted 291 | version: "4.0.0" 292 | intl: 293 | dependency: transitive 294 | description: 295 | name: intl 296 | url: "https://pub.dartlang.org" 297 | source: hosted 298 | version: "0.17.0" 299 | js: 300 | dependency: transitive 301 | description: 302 | name: js 303 | url: "https://pub.dartlang.org" 304 | source: hosted 305 | version: "0.6.3" 306 | matcher: 307 | dependency: transitive 308 | description: 309 | name: matcher 310 | url: "https://pub.dartlang.org" 311 | source: hosted 312 | version: "0.12.10" 313 | material_floating_search_bar: 314 | dependency: "direct main" 315 | description: 316 | name: material_floating_search_bar 317 | url: "https://pub.dartlang.org" 318 | source: hosted 319 | version: "0.3.3" 320 | meta: 321 | dependency: transitive 322 | description: 323 | name: meta 324 | url: "https://pub.dartlang.org" 325 | source: hosted 326 | version: "1.3.0" 327 | nested: 328 | dependency: transitive 329 | description: 330 | name: nested 331 | url: "https://pub.dartlang.org" 332 | source: hosted 333 | version: "1.0.0" 334 | path: 335 | dependency: transitive 336 | description: 337 | name: path 338 | url: "https://pub.dartlang.org" 339 | source: hosted 340 | version: "1.8.0" 341 | path_drawing: 342 | dependency: transitive 343 | description: 344 | name: path_drawing 345 | url: "https://pub.dartlang.org" 346 | source: hosted 347 | version: "0.4.1+1" 348 | path_parsing: 349 | dependency: transitive 350 | description: 351 | name: path_parsing 352 | url: "https://pub.dartlang.org" 353 | source: hosted 354 | version: "0.1.4" 355 | path_provider: 356 | dependency: transitive 357 | description: 358 | name: path_provider 359 | url: "https://pub.dartlang.org" 360 | source: hosted 361 | version: "2.0.1" 362 | path_provider_linux: 363 | dependency: transitive 364 | description: 365 | name: path_provider_linux 366 | url: "https://pub.dartlang.org" 367 | source: hosted 368 | version: "2.0.0" 369 | path_provider_macos: 370 | dependency: transitive 371 | description: 372 | name: path_provider_macos 373 | url: "https://pub.dartlang.org" 374 | source: hosted 375 | version: "2.0.0" 376 | path_provider_platform_interface: 377 | dependency: transitive 378 | description: 379 | name: path_provider_platform_interface 380 | url: "https://pub.dartlang.org" 381 | source: hosted 382 | version: "2.0.1" 383 | path_provider_windows: 384 | dependency: transitive 385 | description: 386 | name: path_provider_windows 387 | url: "https://pub.dartlang.org" 388 | source: hosted 389 | version: "2.0.1" 390 | pedantic: 391 | dependency: transitive 392 | description: 393 | name: pedantic 394 | url: "https://pub.dartlang.org" 395 | source: hosted 396 | version: "1.11.0" 397 | persistent_bottom_nav_bar: 398 | dependency: "direct main" 399 | description: 400 | name: persistent_bottom_nav_bar 401 | url: "https://pub.dartlang.org" 402 | source: hosted 403 | version: "4.0.2" 404 | petitparser: 405 | dependency: transitive 406 | description: 407 | name: petitparser 408 | url: "https://pub.dartlang.org" 409 | source: hosted 410 | version: "3.1.0" 411 | platform: 412 | dependency: transitive 413 | description: 414 | name: platform 415 | url: "https://pub.dartlang.org" 416 | source: hosted 417 | version: "3.0.0" 418 | plugin_platform_interface: 419 | dependency: transitive 420 | description: 421 | name: plugin_platform_interface 422 | url: "https://pub.dartlang.org" 423 | source: hosted 424 | version: "2.0.0" 425 | process: 426 | dependency: transitive 427 | description: 428 | name: process 429 | url: "https://pub.dartlang.org" 430 | source: hosted 431 | version: "4.2.1" 432 | provider: 433 | dependency: "direct main" 434 | description: 435 | name: provider 436 | url: "https://pub.dartlang.org" 437 | source: hosted 438 | version: "5.0.0" 439 | quiver: 440 | dependency: transitive 441 | description: 442 | name: quiver 443 | url: "https://pub.dartlang.org" 444 | source: hosted 445 | version: "3.0.1" 446 | sky_engine: 447 | dependency: transitive 448 | description: flutter 449 | source: sdk 450 | version: "0.0.99" 451 | source_span: 452 | dependency: transitive 453 | description: 454 | name: source_span 455 | url: "https://pub.dartlang.org" 456 | source: hosted 457 | version: "1.8.0" 458 | stack_trace: 459 | dependency: transitive 460 | description: 461 | name: stack_trace 462 | url: "https://pub.dartlang.org" 463 | source: hosted 464 | version: "1.10.0" 465 | stream_channel: 466 | dependency: transitive 467 | description: 468 | name: stream_channel 469 | url: "https://pub.dartlang.org" 470 | source: hosted 471 | version: "2.1.0" 472 | stream_transform: 473 | dependency: transitive 474 | description: 475 | name: stream_transform 476 | url: "https://pub.dartlang.org" 477 | source: hosted 478 | version: "2.0.0" 479 | string_scanner: 480 | dependency: transitive 481 | description: 482 | name: string_scanner 483 | url: "https://pub.dartlang.org" 484 | source: hosted 485 | version: "1.1.0" 486 | term_glyph: 487 | dependency: transitive 488 | description: 489 | name: term_glyph 490 | url: "https://pub.dartlang.org" 491 | source: hosted 492 | version: "1.2.0" 493 | test_api: 494 | dependency: transitive 495 | description: 496 | name: test_api 497 | url: "https://pub.dartlang.org" 498 | source: hosted 499 | version: "0.2.19" 500 | typed_data: 501 | dependency: transitive 502 | description: 503 | name: typed_data 504 | url: "https://pub.dartlang.org" 505 | source: hosted 506 | version: "1.3.0" 507 | url_launcher: 508 | dependency: "direct main" 509 | description: 510 | name: url_launcher 511 | url: "https://pub.dartlang.org" 512 | source: hosted 513 | version: "6.0.4" 514 | url_launcher_linux: 515 | dependency: transitive 516 | description: 517 | name: url_launcher_linux 518 | url: "https://pub.dartlang.org" 519 | source: hosted 520 | version: "2.0.0" 521 | url_launcher_macos: 522 | dependency: transitive 523 | description: 524 | name: url_launcher_macos 525 | url: "https://pub.dartlang.org" 526 | source: hosted 527 | version: "2.0.0" 528 | url_launcher_platform_interface: 529 | dependency: transitive 530 | description: 531 | name: url_launcher_platform_interface 532 | url: "https://pub.dartlang.org" 533 | source: hosted 534 | version: "2.0.3" 535 | url_launcher_web: 536 | dependency: transitive 537 | description: 538 | name: url_launcher_web 539 | url: "https://pub.dartlang.org" 540 | source: hosted 541 | version: "2.0.0" 542 | url_launcher_windows: 543 | dependency: transitive 544 | description: 545 | name: url_launcher_windows 546 | url: "https://pub.dartlang.org" 547 | source: hosted 548 | version: "2.0.0" 549 | vector_math: 550 | dependency: transitive 551 | description: 552 | name: vector_math 553 | url: "https://pub.dartlang.org" 554 | source: hosted 555 | version: "2.1.0" 556 | win32: 557 | dependency: transitive 558 | description: 559 | name: win32 560 | url: "https://pub.dartlang.org" 561 | source: hosted 562 | version: "2.0.5" 563 | xdg_directories: 564 | dependency: transitive 565 | description: 566 | name: xdg_directories 567 | url: "https://pub.dartlang.org" 568 | source: hosted 569 | version: "0.2.0" 570 | xml: 571 | dependency: transitive 572 | description: 573 | name: xml 574 | url: "https://pub.dartlang.org" 575 | source: hosted 576 | version: "4.5.1" 577 | sdks: 578 | dart: ">=2.12.0 <3.0.0" 579 | flutter: ">=1.24.0-10.1.pre" 580 | -------------------------------------------------------------------------------- /assets/Svg/client.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 97 | ); 98 | path = Runner; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXNativeTarget section */ 104 | 97C146ED1CF9000F007C117D /* Runner */ = { 105 | isa = PBXNativeTarget; 106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 107 | buildPhases = ( 108 | 9740EEB61CF901F6004384FC /* Run Script */, 109 | 97C146EA1CF9000F007C117D /* Sources */, 110 | 97C146EB1CF9000F007C117D /* Frameworks */, 111 | 97C146EC1CF9000F007C117D /* Resources */, 112 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 114 | ); 115 | buildRules = ( 116 | ); 117 | dependencies = ( 118 | ); 119 | name = Runner; 120 | productName = Runner; 121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 122 | productType = "com.apple.product-type.application"; 123 | }; 124 | /* End PBXNativeTarget section */ 125 | 126 | /* Begin PBXProject section */ 127 | 97C146E61CF9000F007C117D /* Project object */ = { 128 | isa = PBXProject; 129 | attributes = { 130 | LastUpgradeCheck = 1020; 131 | ORGANIZATIONNAME = ""; 132 | TargetAttributes = { 133 | 97C146ED1CF9000F007C117D = { 134 | CreatedOnToolsVersion = 7.3.1; 135 | LastSwiftMigration = 1100; 136 | }; 137 | }; 138 | }; 139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 140 | compatibilityVersion = "Xcode 9.3"; 141 | developmentRegion = en; 142 | hasScannedForEncodings = 0; 143 | knownRegions = ( 144 | en, 145 | Base, 146 | ); 147 | mainGroup = 97C146E51CF9000F007C117D; 148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 97C146ED1CF9000F007C117D /* Runner */, 153 | ); 154 | }; 155 | /* End PBXProject section */ 156 | 157 | /* Begin PBXResourcesBuildPhase section */ 158 | 97C146EC1CF9000F007C117D /* Resources */ = { 159 | isa = PBXResourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXShellScriptBuildPhase section */ 172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 173 | isa = PBXShellScriptBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | ); 177 | inputPaths = ( 178 | ); 179 | name = "Thin Binary"; 180 | outputPaths = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | shellPath = /bin/sh; 184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 185 | }; 186 | 9740EEB61CF901F6004384FC /* Run Script */ = { 187 | isa = PBXShellScriptBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | ); 191 | inputPaths = ( 192 | ); 193 | name = "Run Script"; 194 | outputPaths = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | shellPath = /bin/sh; 198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 199 | }; 200 | /* End PBXShellScriptBuildPhase section */ 201 | 202 | /* Begin PBXSourcesBuildPhase section */ 203 | 97C146EA1CF9000F007C117D /* Sources */ = { 204 | isa = PBXSourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXSourcesBuildPhase section */ 213 | 214 | /* Begin PBXVariantGroup section */ 215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 216 | isa = PBXVariantGroup; 217 | children = ( 218 | 97C146FB1CF9000F007C117D /* Base */, 219 | ); 220 | name = Main.storyboard; 221 | sourceTree = ""; 222 | }; 223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C147001CF9000F007C117D /* Base */, 227 | ); 228 | name = LaunchScreen.storyboard; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXVariantGroup section */ 232 | 233 | /* Begin XCBuildConfiguration section */ 234 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_ANALYZER_NONNULL = YES; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 244 | CLANG_WARN_BOOL_CONVERSION = YES; 245 | CLANG_WARN_COMMA = YES; 246 | CLANG_WARN_CONSTANT_CONVERSION = YES; 247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 249 | CLANG_WARN_EMPTY_BODY = YES; 250 | CLANG_WARN_ENUM_CONVERSION = YES; 251 | CLANG_WARN_INFINITE_RECURSION = YES; 252 | CLANG_WARN_INT_CONVERSION = YES; 253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNREACHABLE_CODE = YES; 261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu99; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | SDKROOT = iphoneos; 278 | SUPPORTED_PLATFORMS = iphoneos; 279 | TARGETED_DEVICE_FAMILY = "1,2"; 280 | VALIDATE_PRODUCT = YES; 281 | }; 282 | name = Profile; 283 | }; 284 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 285 | isa = XCBuildConfiguration; 286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 287 | buildSettings = { 288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 289 | CLANG_ENABLE_MODULES = YES; 290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 291 | ENABLE_BITCODE = NO; 292 | INFOPLIST_FILE = Runner/Info.plist; 293 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 294 | PRODUCT_BUNDLE_IDENTIFIER = com.example.pharmap; 295 | PRODUCT_NAME = "$(TARGET_NAME)"; 296 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 297 | SWIFT_VERSION = 5.0; 298 | VERSIONING_SYSTEM = "apple-generic"; 299 | }; 300 | name = Profile; 301 | }; 302 | 97C147031CF9000F007C117D /* Debug */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | ALWAYS_SEARCH_USER_PATHS = NO; 306 | CLANG_ANALYZER_NONNULL = YES; 307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 308 | CLANG_CXX_LIBRARY = "libc++"; 309 | CLANG_ENABLE_MODULES = YES; 310 | CLANG_ENABLE_OBJC_ARC = YES; 311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 312 | CLANG_WARN_BOOL_CONVERSION = YES; 313 | CLANG_WARN_COMMA = YES; 314 | CLANG_WARN_CONSTANT_CONVERSION = YES; 315 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 317 | CLANG_WARN_EMPTY_BODY = YES; 318 | CLANG_WARN_ENUM_CONVERSION = YES; 319 | CLANG_WARN_INFINITE_RECURSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 326 | CLANG_WARN_STRICT_PROTOTYPES = YES; 327 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 328 | CLANG_WARN_UNREACHABLE_CODE = YES; 329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 330 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 331 | COPY_PHASE_STRIP = NO; 332 | DEBUG_INFORMATION_FORMAT = dwarf; 333 | ENABLE_STRICT_OBJC_MSGSEND = YES; 334 | ENABLE_TESTABILITY = YES; 335 | GCC_C_LANGUAGE_STANDARD = gnu99; 336 | GCC_DYNAMIC_NO_PIC = NO; 337 | GCC_NO_COMMON_BLOCKS = YES; 338 | GCC_OPTIMIZATION_LEVEL = 0; 339 | GCC_PREPROCESSOR_DEFINITIONS = ( 340 | "DEBUG=1", 341 | "$(inherited)", 342 | ); 343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 345 | GCC_WARN_UNDECLARED_SELECTOR = YES; 346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 347 | GCC_WARN_UNUSED_FUNCTION = YES; 348 | GCC_WARN_UNUSED_VARIABLE = YES; 349 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 350 | MTL_ENABLE_DEBUG_INFO = YES; 351 | ONLY_ACTIVE_ARCH = YES; 352 | SDKROOT = iphoneos; 353 | TARGETED_DEVICE_FAMILY = "1,2"; 354 | }; 355 | name = Debug; 356 | }; 357 | 97C147041CF9000F007C117D /* Release */ = { 358 | isa = XCBuildConfiguration; 359 | buildSettings = { 360 | ALWAYS_SEARCH_USER_PATHS = NO; 361 | CLANG_ANALYZER_NONNULL = YES; 362 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 363 | CLANG_CXX_LIBRARY = "libc++"; 364 | CLANG_ENABLE_MODULES = YES; 365 | CLANG_ENABLE_OBJC_ARC = YES; 366 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 367 | CLANG_WARN_BOOL_CONVERSION = YES; 368 | CLANG_WARN_COMMA = YES; 369 | CLANG_WARN_CONSTANT_CONVERSION = YES; 370 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 371 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 372 | CLANG_WARN_EMPTY_BODY = YES; 373 | CLANG_WARN_ENUM_CONVERSION = YES; 374 | CLANG_WARN_INFINITE_RECURSION = YES; 375 | CLANG_WARN_INT_CONVERSION = YES; 376 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 377 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 378 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 379 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 380 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 381 | CLANG_WARN_STRICT_PROTOTYPES = YES; 382 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 383 | CLANG_WARN_UNREACHABLE_CODE = YES; 384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 385 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 386 | COPY_PHASE_STRIP = NO; 387 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 388 | ENABLE_NS_ASSERTIONS = NO; 389 | ENABLE_STRICT_OBJC_MSGSEND = YES; 390 | GCC_C_LANGUAGE_STANDARD = gnu99; 391 | GCC_NO_COMMON_BLOCKS = YES; 392 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 393 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 394 | GCC_WARN_UNDECLARED_SELECTOR = YES; 395 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 396 | GCC_WARN_UNUSED_FUNCTION = YES; 397 | GCC_WARN_UNUSED_VARIABLE = YES; 398 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 399 | MTL_ENABLE_DEBUG_INFO = NO; 400 | SDKROOT = iphoneos; 401 | SUPPORTED_PLATFORMS = iphoneos; 402 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 403 | TARGETED_DEVICE_FAMILY = "1,2"; 404 | VALIDATE_PRODUCT = YES; 405 | }; 406 | name = Release; 407 | }; 408 | 97C147061CF9000F007C117D /* Debug */ = { 409 | isa = XCBuildConfiguration; 410 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 411 | buildSettings = { 412 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 413 | CLANG_ENABLE_MODULES = YES; 414 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 415 | ENABLE_BITCODE = NO; 416 | INFOPLIST_FILE = Runner/Info.plist; 417 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 418 | PRODUCT_BUNDLE_IDENTIFIER = com.example.pharmap; 419 | PRODUCT_NAME = "$(TARGET_NAME)"; 420 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 421 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 422 | SWIFT_VERSION = 5.0; 423 | VERSIONING_SYSTEM = "apple-generic"; 424 | }; 425 | name = Debug; 426 | }; 427 | 97C147071CF9000F007C117D /* Release */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 430 | buildSettings = { 431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 432 | CLANG_ENABLE_MODULES = YES; 433 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 434 | ENABLE_BITCODE = NO; 435 | INFOPLIST_FILE = Runner/Info.plist; 436 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 437 | PRODUCT_BUNDLE_IDENTIFIER = com.example.pharmap; 438 | PRODUCT_NAME = "$(TARGET_NAME)"; 439 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 440 | SWIFT_VERSION = 5.0; 441 | VERSIONING_SYSTEM = "apple-generic"; 442 | }; 443 | name = Release; 444 | }; 445 | /* End XCBuildConfiguration section */ 446 | 447 | /* Begin XCConfigurationList section */ 448 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 449 | isa = XCConfigurationList; 450 | buildConfigurations = ( 451 | 97C147031CF9000F007C117D /* Debug */, 452 | 97C147041CF9000F007C117D /* Release */, 453 | 249021D3217E4FDB00AE95B9 /* Profile */, 454 | ); 455 | defaultConfigurationIsVisible = 0; 456 | defaultConfigurationName = Release; 457 | }; 458 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 459 | isa = XCConfigurationList; 460 | buildConfigurations = ( 461 | 97C147061CF9000F007C117D /* Debug */, 462 | 97C147071CF9000F007C117D /* Release */, 463 | 249021D4217E4FDB00AE95B9 /* Profile */, 464 | ); 465 | defaultConfigurationIsVisible = 0; 466 | defaultConfigurationName = Release; 467 | }; 468 | /* End XCConfigurationList section */ 469 | }; 470 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 471 | } 472 | --------------------------------------------------------------------------------