├── ios
├── 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
├── .DS_Store
├── Flutter
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── AppFrameworkInfo.plist
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── WorkspaceSettings.xcsettings
│ │ └── IDEWorkspaceChecks.plist
├── Runner.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ └── project.pbxproj
├── .gitignore
└── Podfile
├── assets
├── images
│ └── medicine.png
└── fonts
│ ├── AirbnbCereal-Bold.ttf
│ └── LexendDeca-Regular.ttf
├── 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
│ │ │ │ └── values
│ │ │ │ │ └── styles.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── soochit
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── AndroidManifest.xml
│ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── google-services.json
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── .gitignore
├── settings.gradle
├── build.gradle
└── soochit_android.iml
├── lib
├── pages
│ ├── authentication
│ │ ├── signout-function.dart
│ │ ├── splashScreen.dart
│ │ ├── enterOTP.dart
│ │ └── register.dart
│ ├── login.dart
│ ├── patient-specific
│ │ ├── prescriptionHistory.dart
│ │ ├── homePatient.dart
│ │ ├── medicineDeadlines.dart
│ │ └── patientRegistration.dart
│ ├── doctor-specific
│ │ ├── homeDoctor.dart
│ │ ├── samplePatientProfile.dart
│ │ ├── patientHistory.dart
│ │ ├── doctorRegistration.dart
│ │ ├── doctorProfile.dart
│ │ └── prescription.dart
│ └── welcome.dart
├── widgets
│ ├── snackbar.dart
│ ├── prescriptionHistoryCard.dart
│ ├── loaderHud.dart
│ ├── medicineDeadlineReminder.dart
│ ├── previousPatientCard.dart
│ ├── addPatientDialog.dart
│ └── addMedicineDialog.dart
├── functions
│ ├── notificationScreen.dart
│ └── notificationPlugin.dart
├── global
│ ├── myColors.dart
│ ├── mySpaces.dart
│ ├── myDimens.dart
│ └── myStrings.dart
├── main.dart
└── stores
│ ├── login_store.g.dart
│ └── login_store.dart
├── .github
├── pull_request_template
└── issue_template.md
├── .gitignore
├── soochit.iml
├── test
└── widget_test.dart
├── screenshots.md
├── .all-contributorsrc
├── pubspec.yaml
├── setup-instructions.md
├── README.md
└── code_of_conduct.md
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/ios/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MLH-Fellowship/soochit/HEAD/ios/.DS_Store
--------------------------------------------------------------------------------
/assets/images/medicine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MLH-Fellowship/soochit/HEAD/assets/images/medicine.png
--------------------------------------------------------------------------------
/assets/fonts/AirbnbCereal-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MLH-Fellowship/soochit/HEAD/assets/fonts/AirbnbCereal-Bold.ttf
--------------------------------------------------------------------------------
/assets/fonts/LexendDeca-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MLH-Fellowship/soochit/HEAD/assets/fonts/LexendDeca-Regular.ttf
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MLH-Fellowship/soochit/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/MLH-Fellowship/soochit/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/MLH-Fellowship/soochit/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MLH-Fellowship/soochit/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/MLH-Fellowship/soochit/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MLH-Fellowship/soochit/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MLH-Fellowship/soochit/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/MLH-Fellowship/soochit/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/MLH-Fellowship/soochit/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/MLH-Fellowship/soochit/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/MLH-Fellowship/soochit/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/MLH-Fellowship/soochit/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/MLH-Fellowship/soochit/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/MLH-Fellowship/soochit/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/MLH-Fellowship/soochit/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/MLH-Fellowship/soochit/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/MLH-Fellowship/soochit/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/MLH-Fellowship/soochit/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/MLH-Fellowship/soochit/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MLH-Fellowship/soochit/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MLH-Fellowship/soochit/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MLH-Fellowship/soochit/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/MLH-Fellowship/soochit/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/soochit/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.soochit
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
6 |
--------------------------------------------------------------------------------
/lib/pages/authentication/signout-function.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 |
3 | class Auth {
4 |
5 | static final auth = FirebaseAuth.instance;
6 |
7 | static Future logout() async {
8 | await auth.signOut();
9 | }
10 |
11 | }
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/.github/pull_request_template:
--------------------------------------------------------------------------------
1 | ## Issue Fix
2 | Fixes #Issue_Number
3 |
4 | ## Screenshots
5 |
6 |
7 | ## Description
8 |
9 |
10 | ## Reviewers
11 |
12 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/lib/pages/login.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class Login extends StatefulWidget {
4 | static String id = "login";
5 | @override
6 | _LoginState createState() => _LoginState();
7 | }
8 |
9 | class _LoginState extends State {
10 | @override
11 | Widget build(BuildContext context) {
12 | return Container();
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/widgets/snackbar.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:soochit/global/myColors.dart';
3 |
4 | Widget getSnackBar(BuildContext context, String text) {
5 | return SnackBar(
6 | behavior: SnackBarBehavior.floating,
7 | backgroundColor: MyColors.white,
8 | content: Text(
9 | text,
10 | style: Theme.of(context).textTheme.bodyText1.copyWith(
11 | color: MyColors.primaryColor, fontFamily: 'lexenddeca'),
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 |
--------------------------------------------------------------------------------
/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/functions/notificationScreen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class NotificationScreen extends StatefulWidget {
4 | //
5 | final String payload;
6 |
7 | NotificationScreen({this.payload});
8 |
9 | @override
10 | _NotificationScreenState createState() => _NotificationScreenState();
11 | }
12 |
13 | class _NotificationScreenState extends State {
14 | @override
15 | Widget build(BuildContext context) {
16 | return Scaffold(
17 | appBar: AppBar(
18 | title: Text('Notifications Screen'),
19 | ),
20 | body: Center(
21 | child: Text(widget.payload),
22 | ),
23 | );
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lib/global/myColors.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class MyColors {
4 | static const Color black = Colors.black;
5 | static const Color white = Colors.white;
6 | static const Color primaryColor = Color(0xFFF7575D);
7 | static const Color accentColor = Color(0xFFFDECED);
8 | static const Color grey = Color(0xFF8D8D8D);
9 |
10 | //shades of pink
11 | static const Color lightPink = Color(0xFFF6B0B3);
12 | static const Color lighterPink = Color(0xFFFCBEC1);
13 | static const Color lightestPink = Color(0xFFFDECED);
14 |
15 | static const Color inputFieldPink = Color(0xFFF87277);
16 | static const Color inputFieldTextPink = Color(0xFFFBB5B8);
17 | }
18 |
--------------------------------------------------------------------------------
/lib/global/mySpaces.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class MySpaces {
4 | //vertical gaps
5 | static const Widget vSmallestGapInBetween = SizedBox(height: 6);
6 | static const Widget vGapInBetween = SizedBox(height: 12);
7 | static const Widget vSmallGapInBetween = SizedBox(height: 20);
8 | static const Widget vMediumGapInBetween = SizedBox(height: 30);
9 | static const Widget vLargeGapInBetween = SizedBox(height: 38);
10 |
11 | //horizontal gaps
12 | static const Widget hGapInBetween = SizedBox(width: 12);
13 | static const Widget hSmallGapInBetween = SizedBox(width: 20);
14 | static const Widget hMediumGapInBetween = SizedBox(width: 30);
15 | }
16 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Files and directories created by pub
2 | .dart_tool/
3 | .packages
4 | build/
5 | .idea/
6 | # If you're building an application, you may want to check-in your pubspec.lock
7 | pubspec.lock
8 |
9 | # Directory created by dartdoc
10 | # If you don't generate documentation locally you can remove this line.
11 | doc/api/
12 |
13 | # Avoid committing generated Javascript files:
14 | *.dart.js
15 | *.info.json # Produced by the --dump-info flag.
16 | *.js # When generated by dart2js. Don't specify *.js if your
17 | # project includes source files written in JavaScript.
18 | *.js_
19 | *.js.deps
20 | *.js.map
21 |
22 | .DS_Store
23 |
24 | .flutter-plugins
25 | .flutter-plugins-dependencies
26 |
27 | .vscode
28 |
29 | android/.idea
30 |
--------------------------------------------------------------------------------
/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.google.gms:google-services:4.3.3'
10 | classpath 'com.android.tools.build:gradle:3.5.0'
11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
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 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/.github/issue_template.md:
--------------------------------------------------------------------------------
1 | ## Summary
2 |
3 |
4 |
5 | ## Steps to reproduce
6 |
7 |
8 |
9 | ## Expected behaviour
10 |
11 |
12 |
13 | ## Observed behaviour
14 |
15 |
16 |
17 | ## Logcat for the issue
18 |
19 |
20 |
21 | ## Device and OS version
22 |
23 |
27 |
28 | ## Screenshots
29 |
30 |
31 |
--------------------------------------------------------------------------------
/soochit.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/lib/global/myDimens.dart:
--------------------------------------------------------------------------------
1 | class MyDimens {
2 | //negative numbers
3 | static const double double_negative_300 = -250;
4 | static const double double_negative_200 = -200;
5 |
6 | //positive numbers
7 | static const double double_1 = 1;
8 | static const double double_2point5 = 2.5;
9 | static const double double_4 = 4;
10 | static const double double_7 = 7;
11 | static const double double_10 = 10;
12 | static const double double_15 = 15;
13 | static const double double_17 = 17;
14 | static const double double_20 = 20;
15 | static const double double_25 = 25;
16 | static const double double_30 = 30;
17 | static const double double_35 = 35;
18 | static const double double_40 = 40;
19 | static const double double_60 = 60;
20 | static const double double_70 = 70;
21 | static const double double_100 = 100;
22 | static const double double_120 = 120;
23 | static const double double_200 = 200;
24 | static const double double_300 = 300;
25 | static const double double_400 = 400;
26 | static const double double_280 = 280;
27 | static const double double_600 = 600;
28 | }
29 |
--------------------------------------------------------------------------------
/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:soochit/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 |
--------------------------------------------------------------------------------
/screenshots.md:
--------------------------------------------------------------------------------
1 | |Welcome Screen|Add Medicine Screen|Confirm OTP Screen|
2 | |------|------|------|
3 | |
|
|
|
4 |
5 | |Previous Patients Screen|Add Patient Dialog|Medicine Deadlines Screen|
6 | |------|------|------|
7 | |
|
|
|
8 |
9 | |Prescription History Screen|
10 | |------|
11 | |
|
12 |
--------------------------------------------------------------------------------
/.all-contributorsrc:
--------------------------------------------------------------------------------
1 | {
2 | "files": [
3 | "README.md"
4 | ],
5 | "imageSize": 100,
6 | "commit": false,
7 | "contributors": [
8 | {
9 | "login": "dotrachit",
10 | "name": "Rachit Gupta",
11 | "avatar_url": "https://avatars1.githubusercontent.com/u/44428198?v=4",
12 | "profile": "http://rachitgupta.co",
13 | "contributions": [
14 | "code",
15 | "design"
16 | ]
17 | },
18 | {
19 | "login": "Imperial-lord",
20 | "name": "AB Satyaprakash",
21 | "avatar_url": "https://avatars0.githubusercontent.com/u/45942031?v=4",
22 | "profile": "https://imperial-lord.github.io/mywebsite/",
23 | "contributions": [
24 | "code"
25 | ]
26 | },
27 | {
28 | "login": "Ajitesh13",
29 | "name": "Ajitesh Panda",
30 | "avatar_url": "https://avatars0.githubusercontent.com/u/42615579?v=4",
31 | "profile": "https://bugzilla.mozilla.org/user_profile?user_id=650533",
32 | "contributions": [
33 | "code"
34 | ]
35 | }
36 | ],
37 | "contributorsPerLine": 7,
38 | "projectName": "soochit",
39 | "projectOwner": "MLH-Fellowship",
40 | "repoType": "github",
41 | "repoHost": "https://github.com",
42 | "skipCi": true
43 | }
44 |
--------------------------------------------------------------------------------
/lib/widgets/prescriptionHistoryCard.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:soochit/global/mySpaces.dart';
3 | import 'package:soochit/global/myColors.dart';
4 | import 'package:soochit/global/myDimens.dart';
5 | import 'package:soochit/global/myStrings.dart';
6 |
7 | class PrescriptionHistoryCard extends StatelessWidget {
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return Container(
12 | padding: EdgeInsets.symmetric(horizontal: MyDimens.double_30),
13 | height: MyDimens.double_70,
14 | width: MediaQuery.of(context).size.width*0.80,
15 | decoration: BoxDecoration(
16 | borderRadius: BorderRadius.circular(MyDimens.double_7),
17 | color: MyColors.lightestPink,
18 | ),
19 | child:
20 | Column(
21 | mainAxisAlignment: MainAxisAlignment.center,
22 | crossAxisAlignment: CrossAxisAlignment.start,
23 | children: [
24 | Text(
25 | MyStrings.date,style: Theme.of(context).textTheme.headline5.copyWith(color: MyColors.black, fontFamily: 'lexenddeca'),
26 | ),
27 | MySpaces.vSmallestGapInBetween,
28 | Text(
29 | MyStrings.sampleProblem,style: Theme.of(context).textTheme.bodyText2.copyWith(color: MyColors.grey, fontFamily: 'lexenddeca'),
30 | ),
31 | ],
32 | )
33 | );
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/lib/widgets/loaderHud.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:soochit/global/myColors.dart';
3 | import 'package:soochit/global/myDimens.dart';
4 |
5 | class LoaderHUD extends StatelessWidget {
6 | final bool inAsyncCall;
7 | final double opacity;
8 | final Color color;
9 | final Widget progressIndicator = Container(
10 | width: MyDimens.double_200,
11 | height: MyDimens.double_100,
12 | decoration: BoxDecoration(
13 | borderRadius: BorderRadius.all(Radius.circular(MyDimens.double_4)),
14 | color: MyColors.primaryColor.withOpacity(0.6),
15 | ),
16 | child: const Center(child: CircularProgressIndicator()),
17 | );
18 | final bool dismissible;
19 | final Widget child;
20 |
21 | LoaderHUD({
22 | Key key,
23 | @required this.inAsyncCall,
24 | this.opacity = 0.3,
25 | this.color = MyColors.lightestPink,
26 | this.dismissible = false,
27 | @required this.child,
28 | }) : assert(child != null),
29 | assert(inAsyncCall != null),
30 | super(key: key);
31 |
32 | @override
33 | Widget build(BuildContext context) {
34 | if (!inAsyncCall) return child;
35 |
36 | return Stack(
37 | children: [
38 | child,
39 | Opacity(
40 | child: ModalBarrier(dismissible: dismissible, color: color),
41 | opacity: opacity,
42 | ),
43 | Center(child: progressIndicator),
44 | ],
45 | );
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | end
36 |
37 | post_install do |installer|
38 | installer.pods_project.targets.each do |target|
39 | flutter_additional_ios_build_settings(target)
40 | end
41 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: soochit
2 | description: Not just another medicine reminder.
3 |
4 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
5 |
6 | version: 1.0.0+1
7 |
8 | environment:
9 | sdk: ">=2.7.0 <3.0.0"
10 |
11 | dependencies:
12 | flutter:
13 | sdk: flutter
14 |
15 | numeric_keyboard: ^1.0.0
16 | cupertino_icons: ^0.1.3
17 | firebase_core: ^0.4.4+3
18 | firebase_auth: ^0.15.5+3
19 | mobx: ^1.1.1
20 | flutter_mobx: ^1.1.0
21 | provider: ^4.0.4
22 | cloud_firestore: ^0.13.6
23 | firebase_storage: ^3.0.6
24 | flutter_local_notifications: ^1.4.4+1
25 | rxdart: ^0.24.1
26 | path_provider: ^1.6.11
27 | http: ^0.12.1
28 |
29 | dev_dependencies:
30 | flutter_test:
31 | sdk: flutter
32 | build_runner: ^1.8.1
33 | mobx_codegen: ^1.0.3
34 |
35 | flutter:
36 |
37 | uses-material-design: true
38 |
39 | # assets:
40 | # - images/a_dot_burr.jpeg
41 | # - images/a_dot_ham.jpeg
42 |
43 | # An image asset can refer to one or more resolution-specific "variants", see
44 | # https://flutter.dev/assets-and-images/#resolution-aware.
45 |
46 | # For details regarding adding assets from package dependencies, see
47 | # https://flutter.dev/assets-and-images/#from-packages
48 |
49 | fonts:
50 | - family: airbnb
51 | fonts:
52 | - asset: assets/fonts/AirbnbCereal-Bold.ttf
53 | weight: 800
54 |
55 | - family: lexenddeca
56 | fonts:
57 | - asset: assets/fonts/LexendDeca-Regular.ttf
58 |
59 | assets:
60 | - assets/images/
--------------------------------------------------------------------------------
/android/soochit_android.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/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 | soochit
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "88365186057",
4 | "firebase_url": "https://soochit-mlh113-team3.firebaseio.com",
5 | "project_id": "soochit-mlh113-team3",
6 | "storage_bucket": "soochit-mlh113-team3.appspot.com"
7 | },
8 | "client": [
9 | {
10 | "client_info": {
11 | "mobilesdk_app_id": "1:88365186057:android:ac423c4e205332d8600cd8",
12 | "android_client_info": {
13 | "package_name": "com.example.soochit"
14 | }
15 | },
16 | "oauth_client": [
17 | {
18 | "client_id": "88365186057-pb2tv6b3kauansoec1un0b7l54bdqrfq.apps.googleusercontent.com",
19 | "client_type": 1,
20 | "android_info": {
21 | "package_name": "com.example.soochit",
22 | "certificate_hash": "097bbd52d2016706a57590ef155257cda5af00f7"
23 | }
24 | },
25 | {
26 | "client_id": "88365186057-p84oj48uvuk60ku0n0cb2qerv4r7fcth.apps.googleusercontent.com",
27 | "client_type": 1,
28 | "android_info": {
29 | "package_name": "com.example.soochit",
30 | "certificate_hash": "b6917d7b9e3447f04ea3c5d20b6b83df827c2c9f"
31 | }
32 | },
33 | {
34 | "client_id": "88365186057-gdbs9u6c3aouep8pad8ps723ht8tifo5.apps.googleusercontent.com",
35 | "client_type": 3
36 | }
37 | ],
38 | "api_key": [
39 | {
40 | "current_key": "AIzaSyCchNMEOnCRrsn2kgMusIFXr0mD025Pzng"
41 | }
42 | ],
43 | "services": {
44 | "appinvite_service": {
45 | "other_platform_oauth_client": [
46 | {
47 | "client_id": "88365186057-gdbs9u6c3aouep8pad8ps723ht8tifo5.apps.googleusercontent.com",
48 | "client_type": 3
49 | }
50 | ]
51 | }
52 | }
53 | }
54 | ],
55 | "configuration_version": "1"
56 | }
--------------------------------------------------------------------------------
/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: 'com.google.gms.google-services'
26 | apply plugin: 'kotlin-android'
27 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
28 |
29 | android {
30 | compileSdkVersion 28
31 |
32 | sourceSets {
33 | main.java.srcDirs += 'src/main/kotlin'
34 | }
35 |
36 | lintOptions {
37 | disable 'InvalidPackage'
38 | }
39 |
40 | defaultConfig {
41 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
42 | applicationId "com.example.soochit"
43 | minSdkVersion 16
44 | targetSdkVersion 28
45 | versionCode flutterVersionCode.toInteger()
46 | versionName flutterVersionName
47 | multiDexEnabled true
48 | }
49 |
50 | buildTypes {
51 | release {
52 | // TODO: Add your own signing config for the release build.
53 | // Signing with the debug keys for now, so `flutter run --release` works.
54 | signingConfig signingConfigs.debug
55 | }
56 | }
57 | }
58 |
59 | flutter {
60 | source '../..'
61 | }
62 |
63 | dependencies {
64 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
65 | implementation 'com.google.firebase:firebase-analytics:17.5.0'
66 | }
67 |
--------------------------------------------------------------------------------
/lib/pages/patient-specific/prescriptionHistory.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:soochit/global/myColors.dart';
3 | import 'package:soochit/global/myDimens.dart';
4 | import 'package:soochit/global/mySpaces.dart';
5 | import 'package:soochit/global/myStrings.dart';
6 | import 'package:soochit/widgets/prescriptionHistoryCard.dart';
7 |
8 | class PrescriptionHistory extends StatefulWidget {
9 | static String id = "prescriptionHistory";
10 | @override
11 | _PrescriptionHistoryState createState() => _PrescriptionHistoryState();
12 | }
13 |
14 | class _PrescriptionHistoryState extends State {
15 | @override
16 | Widget build(BuildContext context) {
17 | return Scaffold(
18 | body: SafeArea(
19 | child: SingleChildScrollView(
20 | child: Container(
21 | margin: EdgeInsets.symmetric(vertical: MyDimens.double_10, horizontal: MyDimens.double_30),
22 | child: Column(
23 | children: [
24 | MySpaces.vMediumGapInBetween,
25 | Text(
26 | MyStrings.patientPrescriptionHistoryLabel, style: Theme.of(context).textTheme.headline4.copyWith(color: MyColors.primaryColor, fontFamily: 'airbnb'),
27 | ),
28 | MySpaces.vLargeGapInBetween,
29 | Column(
30 | children: [
31 | PrescriptionHistoryCard(),
32 | MySpaces.vSmallGapInBetween,
33 | PrescriptionHistoryCard(),
34 | MySpaces.vSmallGapInBetween,
35 | PrescriptionHistoryCard(),
36 | MySpaces.vSmallGapInBetween,
37 | PrescriptionHistoryCard(),
38 | MySpaces.vSmallGapInBetween,
39 | PrescriptionHistoryCard(),
40 | MySpaces.vSmallGapInBetween,
41 | PrescriptionHistoryCard(),
42 | MySpaces.vSmallGapInBetween,
43 | PrescriptionHistoryCard(),
44 | MySpaces.vSmallGapInBetween,
45 | PrescriptionHistoryCard()
46 | ],
47 | )
48 | ],
49 | ),
50 | ),
51 | ),
52 | ),
53 | );
54 | }
55 | }
56 |
57 |
--------------------------------------------------------------------------------
/lib/pages/authentication/splashScreen.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:firebase_auth/firebase_auth.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:provider/provider.dart';
5 | import 'package:soochit/global/myColors.dart';
6 | import 'package:soochit/global/myStrings.dart';
7 | import 'package:soochit/pages/authentication/register.dart';
8 | import 'package:soochit/pages/doctor-specific/homeDoctor.dart';
9 | import 'package:soochit/pages/patient-specific/homePatient.dart';
10 | import 'package:soochit/stores/login_store.dart';
11 |
12 | class SplashScreen extends StatefulWidget {
13 | static String id="splash_page";
14 | SplashScreen({Key key}) : super(key: key);
15 | @override
16 | _SplashScreenState createState() => _SplashScreenState();
17 | }
18 |
19 | class _SplashScreenState extends State {
20 |
21 | void _decideUserRole() async{
22 | var firebaseUser = await FirebaseAuth.instance.currentUser();
23 | var collectionRef = Firestore.instance.collection('Doctor');
24 | var doc = await collectionRef.document(firebaseUser.uid).get();
25 | if(doc.exists)
26 | Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute(builder: (_) => HomeDoctor()), (Route route) => false);
27 | else
28 | Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute(builder: (_) => HomePatient()), (Route route) => false);
29 | }
30 |
31 | @override
32 | void initState() {
33 | super.initState();
34 | Provider.of(context, listen: false).isAlreadyAuthenticated().then((result) {
35 | if (result) {
36 | print(result);
37 | _decideUserRole();
38 | } else {
39 | Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute(builder: (_) => Register()), (Route route) => false);
40 | }
41 | });
42 | }
43 |
44 | @override
45 | Widget build(BuildContext context) {
46 | return Scaffold(
47 | backgroundColor: Colors.white,
48 | body: Align(
49 | child: Text(
50 | MyStrings.appName, style: Theme.of(context).textTheme.headline3.copyWith(color: MyColors.primaryColor, fontWeight: FontWeight.bold),
51 | ),
52 | alignment: Alignment.center,
53 | )
54 | );
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/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/widgets/medicineDeadlineReminder.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:soochit/global/myStrings.dart';
4 | import 'package:soochit/global/myDimens.dart';
5 | import 'package:soochit/global/myColors.dart';
6 | import 'package:soochit/global/mySpaces.dart';
7 |
8 | class MedicineDeadlineReminder extends StatelessWidget {
9 | String time;
10 | List medName;
11 | MedicineDeadlineReminder({@required this.medName, @required this.time});
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Column(
16 | children: [
17 | Container(
18 | height: MyDimens.double_35,
19 | width: MediaQuery.of(context).size.width * 0.80,
20 | decoration: BoxDecoration(
21 | borderRadius: BorderRadius.only(
22 | topLeft: Radius.circular(MyDimens.double_10),
23 | topRight: Radius.circular(MyDimens.double_10)),
24 | color: MyColors.primaryColor,
25 | ),
26 | child: Align(
27 | child: Text(
28 | time,
29 | style: Theme.of(context)
30 | .textTheme
31 | .subtitle1
32 | .copyWith(color: MyColors.white, fontFamily: 'lexenddeca'),
33 | ),
34 | alignment: Alignment.center,
35 | )),
36 | Container(
37 | padding: EdgeInsets.symmetric(horizontal: MyDimens.double_35, vertical: MyDimens.double_10),
38 | width: MediaQuery.of(context).size.width * 0.80,
39 | decoration: BoxDecoration(
40 | borderRadius: BorderRadius.only(
41 | bottomLeft: Radius.circular(MyDimens.double_10),
42 | bottomRight: Radius.circular(MyDimens.double_10)),
43 | color: MyColors.lightestPink,
44 | ),
45 | child: Wrap(
46 | children: [
47 | Column(
48 | mainAxisAlignment: MainAxisAlignment.center,
49 | crossAxisAlignment: CrossAxisAlignment.start,
50 | children: [
51 | for (var i=0; i Settings -> plugins
22 | - Search for the plugin. In this case it would be Flutter and Dart. Install them if not done yet and click Apply.
23 |
24 | ## Local Development Setup
25 |
26 | This section will help you set up the project locally on your system.
27 |
28 | 1. Open the project on your IDE.
29 | 2. Run `pub get` on project level terminal to install all the required dependencies.
30 | 3. Ensure that the Flutter SDK is provided the correct path. Open File menu -> Settings -> Languages & Frameworks -> Flutter
31 | 4. In order to run a flutter project, either a virtual device needs to be setup or a physical device can be used. Remember to `enable Debugging` in **Developer Options** in the physical device.
32 | 5. Connect your physical device or setup the virtual device before you run the application. Ensure that the device is visible on top menu.
33 |
34 | ## Firebase Configurations
35 | Follow the [official firebase documentation](https://firebase.google.com/docs/flutter/setup?platform=android) to connect firebase to the app locally. The following information, however, is required to set it up successfully.
36 |
37 | * Name the firebase project `Soochit`.
38 | * Before adding apps, go to Authentication under Develop, and click on the Set up sign-in method button. Enable `Phone` sign-in provider.
39 | * Android package name: `com.example.soochit`
40 | * Be sure to enter your SHA key so that authentication can work properly.
41 |
42 | Refer to the Flutter [online documentation](https://flutter.dev/docs), which offers tutorials, samples, guidance on mobile development, and a full API reference.
43 |
44 | Huge shoutout to [AnitaB's mentorship-flutter project](https://github.com/anitab-org/mentorship-flutter) for the detailed installation guide! 🚀
45 |
--------------------------------------------------------------------------------
/lib/widgets/previousPatientCard.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:soochit/global/mySpaces.dart';
3 | import 'package:soochit/global/myColors.dart';
4 | import 'package:soochit/global/myDimens.dart';
5 | import 'package:soochit/global/myStrings.dart';
6 | import 'package:soochit/pages/doctor-specific/samplePatientProfile.dart';
7 |
8 | Widget previousPatientCard(BuildContext context, List patientDet) {
9 | // print(patientDet);
10 | return GestureDetector(
11 | onTap: () {
12 | Navigator.of(context).push(
13 | MaterialPageRoute(builder: (_) => SamplePatientProfile(patientDet: patientDet)));
14 | },
15 | child: Column(
16 | children: [
17 | Container(
18 | padding: EdgeInsets.symmetric(horizontal: MyDimens.double_30),
19 | height: MyDimens.double_70,
20 | width: MediaQuery.of(context).size.width * 0.90,
21 | decoration: BoxDecoration(
22 | borderRadius: BorderRadius.circular(MyDimens.double_7),
23 | color: MyColors.lightestPink,
24 | ),
25 | child: Row(
26 | mainAxisAlignment: MainAxisAlignment.center,
27 | children: [
28 | new Container(
29 | width: 40.0,
30 | height: 40.0,
31 | decoration: new BoxDecoration(
32 | shape: BoxShape.circle,
33 | image: new DecorationImage(
34 | fit: BoxFit.fill,
35 | image:
36 | new NetworkImage("https://github.com/dotrachit.png"),
37 | ))),
38 | MySpaces.hSmallGapInBetween,
39 | Column(
40 | mainAxisAlignment: MainAxisAlignment.center,
41 | crossAxisAlignment: CrossAxisAlignment.start,
42 | children: [
43 | Text(
44 | patientDet[1],
45 | style: Theme.of(context).textTheme.headline5.copyWith(
46 | color: MyColors.black, fontFamily: 'lexenddeca'),
47 | ),
48 | MySpaces.vSmallestGapInBetween,
49 | Text(
50 | patientDet[2] +
51 | ' • ' +
52 | MyStrings.recentAppointmentDate,
53 | style: Theme.of(context)
54 | .textTheme
55 | .bodyText2
56 | .copyWith(color: MyColors.grey, fontFamily: 'lexenddeca'),
57 | ),
58 | ],
59 | )
60 | ],
61 | ),
62 | ),
63 | MySpaces.vSmallGapInBetween,
64 | ],
65 | ),
66 | );
67 | }
68 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:provider/provider.dart';
3 | import 'package:soochit/pages/authentication/register.dart';
4 | import 'package:soochit/pages/authentication/enterOTP.dart';
5 | import 'package:soochit/pages/authentication/splashScreen.dart';
6 | import 'package:soochit/pages/doctor-specific/doctorProfile.dart';
7 | import 'package:soochit/pages/doctor-specific/doctorRegistration.dart';
8 | import 'package:soochit/pages/doctor-specific/homeDoctor.dart';
9 | import 'package:soochit/pages/doctor-specific/prescription.dart';
10 | import 'package:soochit/pages/patient-specific/homePatient.dart';
11 | import 'package:soochit/pages/patient-specific/patientRegistration.dart';
12 | import 'package:soochit/stores/login_store.dart';
13 | import 'functions/localNotificationsScreen.dart';
14 | import 'pages/welcome.dart';
15 | import 'pages/login.dart';
16 | import 'pages/doctor-specific/patientHistory.dart';
17 | import 'pages/patient-specific/medicineDeadlines.dart';
18 | import 'pages/patient-specific/prescriptionHistory.dart';
19 | import 'pages/doctor-specific/samplePatientProfile.dart';
20 |
21 |
22 | void main() {
23 | runApp(MyApp());
24 | }
25 |
26 | class MyApp extends StatefulWidget {
27 | @override
28 | _MyAppState createState() => _MyAppState();
29 | }
30 |
31 | class _MyAppState extends State {
32 | @override
33 | Widget build(BuildContext context) {
34 | // the main here will have a 'splash' as home-screen and other routes
35 | return MultiProvider(
36 | providers: [
37 | Provider(
38 | create: (_) => LoginStore(),
39 | )
40 | ],
41 | child: GestureDetector(
42 | // This ensures that the keyboard disappears as soon as the user clicks outside the text filed
43 | onTap: () {
44 | FocusScopeNode currentFocus = FocusScope.of(context);
45 | if (!currentFocus.hasPrimaryFocus &&
46 | currentFocus.focusedChild != null) {
47 | FocusManager.instance.primaryFocus.unfocus();
48 | }
49 | },
50 | child: MaterialApp(
51 | title: 'Soochit',
52 | debugShowCheckedModeBanner: false,
53 | // home: LocalNotificationScreen(),
54 | home: SplashScreen(),
55 | routes: {
56 | EnterOTP.id: (context) => EnterOTP(),
57 | Register.id: (context) => Register(),
58 | SplashScreen.id: (context) => SplashScreen(),
59 | Welcome.id: (context) => Welcome(),
60 | Login.id: (context) => Login(),
61 | PatientHistory.id: (context) => PatientHistory(),
62 | MedicineDeadlines.id: (context) => MedicineDeadlines(),
63 | PrescriptionHistory.id: (context) => PrescriptionHistory(),
64 | SamplePatientProfile.id: (context) => SamplePatientProfile(),
65 | HomePatient.id: (context) => HomePatient(),
66 | HomeDoctor.id: (context) => HomeDoctor(),
67 | DoctorProfile.id: (context) => DoctorProfile(),
68 | DoctorRegistration.id: (context) => DoctorRegistration(),
69 | PatientRegistration.id: (context) => PatientRegistration(),
70 | Prescription.id: (context) => Prescription(),
71 | },
72 | ),
73 | ),
74 | );
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](#contributors-)
2 |
3 |
4 |
5 |
6 |
7 |
8 | # Soochit 👩⚕️
9 |
10 | Not just another medicine reminder.
11 |
12 | ## Problem Statement
13 | * It's hard for people to keep a physical folder for their medical prescription history.
14 | * People (like us) are lazy enough to procrastinate setting medicine reminders primarily because they have to do the hard task of manually labelling the reminder, setting the time, and setting the frequency of the medicines.
15 |
16 | ## Solution
17 |
18 | Soochit: a fullly automated e-prescription tracker and medicine reminder.
19 |
20 | * The doctor will write digital prescriptions on our app which will be saved on user's profile.
21 | * We will send out automatical reminders for the patients to take their medicines (entirely based off what is written in the prescription.)
22 |
23 | ## Use Cases
24 |
25 | * Patients won't have to set reminders manually. Hence, there is no way for them to procrastinate.
26 | * Patients won't have to keep a physical binder to maintain their medical history.
27 | * Patients won't have to confuse themselves by reading the (mostly incomprehensible) handwriting of the doctor once they forget their medicines, dosage, or timings.
28 |
29 | ## Unique Selling Point (USP)
30 | it is a medicine reminder app, but you don't have to set reminders for your medicines. 😉
31 |
32 | ## Getting Started
33 | In order to setup the project locally, check the defined setup instructions [here](/setup-instructions.md).
34 |
35 | ## Contributors ✨
36 |
37 | Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
38 |
39 |
40 |
41 |
42 |
49 |
50 |
51 |
52 |
53 |
54 | This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
55 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
9 |
10 |
11 |
12 |
16 |
23 |
27 |
31 |
36 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
54 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/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/global/myStrings.dart:
--------------------------------------------------------------------------------
1 | class MyStrings {
2 | static const appName = "Soochit";
3 | static const tagline = "Not just another medicine reminder.";
4 |
5 | // welcome screen
6 | static const welcomeToLabel = "Welcome to";
7 | static const whoAreYouLabel = "Who are you?";
8 | static const doctorLabel = "Doctor";
9 | static const patientLabel = "Patient";
10 |
11 | // loginAuth screen
12 | static const buttonLabel = "Send Security Code";
13 | static const phoneRequest = "Enter your mobile number to get an OTP";
14 | static const placeholderLoginAuth = 'Phone Number (include +91)';
15 |
16 | // otpAuth screen
17 | static const buttonLabel1 = "Confirm OTP";
18 | static const otpRequest = "Enter the (6 digit) OTP you have received";
19 |
20 | // snackBar messages (errors/suggestions)
21 | static const invalidPhoneNumber = 'Please enter a valid phone number';
22 | static const invalidCodeOrAuth = 'Invalid code/Invalid authentication';
23 | static const somethingGoneWrong = 'Something has gone wrong, please try later';
24 | static const invalidPhoneNumberFormat = 'The phone number format is incorrect. Please enter your number in E.164 format i.e. [+][country code][number]';
25 | static const incorrectOTP = 'Incorrect OTP. Please enter the last code received.';
26 |
27 | // dummy data
28 | static const patientName = "Rachit Gupta";
29 | static const paracetamolLabel = "Paracetamol";
30 | static const crocinLabel = "Crocin";
31 | static const time = "12:00 PM";
32 | static const date = "2nd October";
33 | static const doctorName = "Dr. Rachit Gupta";
34 | static const phoneNumber = "+91 0000000000";
35 |
36 | static const registerLabel = 'Register'; // for doc and patients both
37 | static const buttonLabel2 = 'Confirm'; // for doc and patients both
38 |
39 | // >>>>>>>>>>>>>>>>>>>> PATIENT >>>>>>>>>>>>>>>>>>>>
40 |
41 | // home
42 | static const patientMedDeadlines = "$patientName's Medical Deadlines";
43 | static const genderLabel = 'Gender';
44 | static const addressLabel = 'Address';
45 |
46 | // prescription history
47 | static const patientPrescriptionHistoryLabel =
48 | "$patientName's Prescription History";
49 |
50 | // >>>>>>>>>>>>>>>>>>>> DOCTOR >>>>>>>>>>>>>>>>>>>>
51 |
52 | // home
53 | static const doctorPreviousPatients = "'s Previous Patients";
54 | static const recentAppointmentDate = "2nd Oct";
55 |
56 | // FAB
57 | static const addAPatientLabel = "Add a patient";
58 | static const cancelLabel = "Cancel";
59 | static const confirmLabel = "Confirm";
60 |
61 | // patient's profile (doctor's pov)
62 | static const ageLabel = "Age";
63 | static const phoneNumberLabel = "Phone number";
64 | static const sampleAge = "21";
65 | static const yearsOldLabel = "years old";
66 | static const sampleProblem = "Problem: constant cough";
67 | static const searchPatientsLabel = 'Search patients';
68 |
69 | // register page
70 | static const nameLabel = 'Full name';
71 | static const hospitalNameLabel = 'Hospital name';
72 | static const hospitalAddressLabel = 'Hospital address';
73 | static const qualificationsLabel = 'Qualification';
74 | static const uploadSignatureLabel = 'Upload signature';
75 | static const signatureLabel = 'Signature';
76 |
77 | // prescription
78 | static const prescriptionLabel = "Prescription";
79 | static const problemLabel = "Problem";
80 | static const descriptionOptionalLabel = "Description (Optional)";
81 | static const sampleMedName = "Paracetamol";
82 | static const sampleMedTime = "7AM and 8PM";
83 | static const medicineNameLabel = "Medicine name";
84 | static const timingsLabel = "Timings";
85 | static const addAMedicineLabel = "Add a medicine";
86 | }
87 |
--------------------------------------------------------------------------------
/lib/pages/patient-specific/homePatient.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:soochit/global/myColors.dart';
3 | import 'package:soochit/global/myDimens.dart';
4 | import 'package:soochit/pages/authentication/signout-function.dart';
5 | import 'package:soochit/pages/authentication/splashScreen.dart';
6 | import 'package:soochit/pages/patient-specific/medicineDeadlines.dart';
7 | import 'package:soochit/pages/patient-specific/prescriptionHistory.dart';
8 | import 'package:soochit/widgets/addMedicineDialog.dart';
9 |
10 | class HomePatient extends StatefulWidget {
11 | static String id = "homePatient";
12 | @override
13 | _HomePatientState createState() => _HomePatientState();
14 | }
15 |
16 | class _HomePatientState extends State {
17 | int pageIndex = 0;
18 | int firstIconColorInt = 0;
19 | int secondIconColorInt = 1;
20 | List _currentPage = [
21 | MedicineDeadlines(), PrescriptionHistory()
22 | ];
23 | List _iconColors = [
24 | MyColors.white, MyColors.lightPink
25 | ];
26 |
27 | @override
28 | Widget build(BuildContext context) {
29 | void handleClick(String value) {
30 | switch (value) {
31 | case 'Logout':
32 | Auth.logout();
33 | Navigator.pushNamed(context, SplashScreen.id);
34 | }
35 | }
36 | return Scaffold(
37 | body: _currentPage[pageIndex],
38 | appBar: AppBar(
39 | backgroundColor: MyColors.primaryColor,
40 | actions: [
41 | Padding(
42 | padding: EdgeInsets.only(right: MyDimens.double_10),
43 | child: PopupMenuButton(
44 | onSelected: handleClick,
45 | itemBuilder: (BuildContext context) {
46 | return {'Logout'}.map((String choice) {
47 | return PopupMenuItem(
48 | value: choice,
49 | child: Text(choice),
50 | );
51 | }).toList();
52 | },
53 | ),
54 | )
55 | ],
56 | ),
57 | bottomNavigationBar: BottomAppBar(
58 | clipBehavior: Clip.antiAliasWithSaveLayer,
59 | shape: CircularNotchedRectangle(),
60 | child: Container(
61 | height: MyDimens.double_60,
62 | child: Padding(
63 | padding: EdgeInsets.symmetric(horizontal: MyDimens.double_60),
64 | child: Row(
65 | mainAxisSize: MainAxisSize.max,
66 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
67 | children: [
68 | IconButton(icon: Icon(Icons.event_note, color: _iconColors[firstIconColorInt],), onPressed: () {setState(() {
69 | pageIndex = 0;
70 | firstIconColorInt = 0;
71 | secondIconColorInt = 1;
72 | });},),
73 | IconButton(icon: Icon(Icons.folder_open, color: _iconColors[secondIconColorInt]), onPressed: () {setState(() {
74 | pageIndex = 1;
75 | firstIconColorInt = 1;
76 | secondIconColorInt = 0;
77 | });},),
78 | ],
79 | ),
80 | ),
81 | color: MyColors.primaryColor,
82 | ),
83 | ),
84 | floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
85 | floatingActionButton: FloatingActionButton(onPressed: () {
86 | showAddManualMedicineReminderDialog();
87 | }, backgroundColor: MyColors.primaryColor, child: Icon(Icons.add, size: 40),),
88 | );
89 | }
90 | Future