diff --git a/medcify.zip b/medcify.zip
new file mode 100644
index 0000000..56eaca6
Binary files /dev/null and b/medcify.zip differ
diff --git a/medcify/README.md b/medcify/README.md
new file mode 100644
index 0000000..8f3abf0
--- /dev/null
+++ b/medcify/README.md
@@ -0,0 +1,17 @@
+# medcify
+
+A new Flutter project.
+
+## Getting Started
+
+This project is a starting point for a Flutter application.
+
+A few resources to get you started if this is your first Flutter project:
+
+- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
+- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
+
+For help getting started with Flutter development, view the
+[online documentation](https://docs.flutter.dev/), which offers tutorials,
+samples, guidance on mobile development, and a full API reference.
+# medcify
diff --git a/medcify/__MACOSX/android/._.gitignore b/medcify/__MACOSX/android/._.gitignore
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/android/._.gitignore differ
diff --git a/medcify/__MACOSX/android/._settings.gradle b/medcify/__MACOSX/android/._settings.gradle
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/android/._settings.gradle differ
diff --git a/medcify/__MACOSX/ios/._.gitignore b/medcify/__MACOSX/ios/._.gitignore
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/._.gitignore differ
diff --git a/medcify/__MACOSX/ios/._Podfile b/medcify/__MACOSX/ios/._Podfile
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/._Podfile differ
diff --git a/medcify/__MACOSX/ios/Flutter/._AppFrameworkInfo.plist b/medcify/__MACOSX/ios/Flutter/._AppFrameworkInfo.plist
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Flutter/._AppFrameworkInfo.plist differ
diff --git a/medcify/__MACOSX/ios/Flutter/._Debug.xcconfig b/medcify/__MACOSX/ios/Flutter/._Debug.xcconfig
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Flutter/._Debug.xcconfig differ
diff --git a/medcify/__MACOSX/ios/Flutter/._Release.xcconfig b/medcify/__MACOSX/ios/Flutter/._Release.xcconfig
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Flutter/._Release.xcconfig differ
diff --git a/medcify/__MACOSX/ios/Runner.xcodeproj/project.xcworkspace/._contents.xcworkspacedata b/medcify/__MACOSX/ios/Runner.xcodeproj/project.xcworkspace/._contents.xcworkspacedata
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner.xcodeproj/project.xcworkspace/._contents.xcworkspacedata differ
diff --git a/medcify/__MACOSX/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/._IDEWorkspaceChecks.plist b/medcify/__MACOSX/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/._IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/._IDEWorkspaceChecks.plist differ
diff --git a/medcify/__MACOSX/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/._WorkspaceSettings.xcsettings b/medcify/__MACOSX/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/._WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/._WorkspaceSettings.xcsettings differ
diff --git a/medcify/__MACOSX/ios/Runner.xcodeproj/xcshareddata/xcschemes/._Runner.xcscheme b/medcify/__MACOSX/ios/Runner.xcodeproj/xcshareddata/xcschemes/._Runner.xcscheme
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner.xcodeproj/xcshareddata/xcschemes/._Runner.xcscheme differ
diff --git a/medcify/__MACOSX/ios/Runner.xcworkspace/._contents.xcworkspacedata b/medcify/__MACOSX/ios/Runner.xcworkspace/._contents.xcworkspacedata
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner.xcworkspace/._contents.xcworkspacedata differ
diff --git a/medcify/__MACOSX/ios/Runner.xcworkspace/xcshareddata/._IDEWorkspaceChecks.plist b/medcify/__MACOSX/ios/Runner.xcworkspace/xcshareddata/._IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner.xcworkspace/xcshareddata/._IDEWorkspaceChecks.plist differ
diff --git a/medcify/__MACOSX/ios/Runner.xcworkspace/xcshareddata/._WorkspaceSettings.xcsettings b/medcify/__MACOSX/ios/Runner.xcworkspace/xcshareddata/._WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner.xcworkspace/xcshareddata/._WorkspaceSettings.xcsettings differ
diff --git a/medcify/__MACOSX/ios/Runner/._AppDelegate.swift b/medcify/__MACOSX/ios/Runner/._AppDelegate.swift
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/._AppDelegate.swift differ
diff --git a/medcify/__MACOSX/ios/Runner/._Runner-Bridging-Header.h b/medcify/__MACOSX/ios/Runner/._Runner-Bridging-Header.h
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/._Runner-Bridging-Header.h differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Contents.json b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Contents.json
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Contents.json differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-1024x1024@1x.png b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-1024x1024@1x.png
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-1024x1024@1x.png differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-20x20@1x.png b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-20x20@1x.png
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-20x20@1x.png differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-20x20@2x.png b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-20x20@2x.png
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-20x20@2x.png differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-20x20@3x.png b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-20x20@3x.png
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-20x20@3x.png differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-29x29@1x.png b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-29x29@1x.png
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-29x29@1x.png differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-29x29@2x.png b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-29x29@2x.png
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-29x29@2x.png differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-29x29@3x.png b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-29x29@3x.png
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-29x29@3x.png differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-40x40@1x.png b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-40x40@1x.png
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-40x40@1x.png differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-40x40@2x.png b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-40x40@2x.png
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-40x40@2x.png differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-40x40@3x.png b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-40x40@3x.png
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-40x40@3x.png differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-60x60@2x.png b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-60x60@2x.png
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-60x60@2x.png differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-60x60@3x.png b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-60x60@3x.png
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-60x60@3x.png differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-76x76@1x.png b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-76x76@1x.png
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-76x76@1x.png differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-76x76@2x.png b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-76x76@2x.png
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-76x76@2x.png differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-83.5x83.5@2x.png b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-83.5x83.5@2x.png
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/AppIcon.appiconset/._Icon-App-83.5x83.5@2x.png differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/LaunchImage.imageset/._Contents.json b/medcify/__MACOSX/ios/Runner/Assets.xcassets/LaunchImage.imageset/._Contents.json
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/LaunchImage.imageset/._Contents.json differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/LaunchImage.imageset/._LaunchImage.png b/medcify/__MACOSX/ios/Runner/Assets.xcassets/LaunchImage.imageset/._LaunchImage.png
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/LaunchImage.imageset/._LaunchImage.png differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/LaunchImage.imageset/._LaunchImage@2x.png b/medcify/__MACOSX/ios/Runner/Assets.xcassets/LaunchImage.imageset/._LaunchImage@2x.png
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/LaunchImage.imageset/._LaunchImage@2x.png differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/LaunchImage.imageset/._LaunchImage@3x.png b/medcify/__MACOSX/ios/Runner/Assets.xcassets/LaunchImage.imageset/._LaunchImage@3x.png
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/LaunchImage.imageset/._LaunchImage@3x.png differ
diff --git a/medcify/__MACOSX/ios/Runner/Assets.xcassets/LaunchImage.imageset/._README.md b/medcify/__MACOSX/ios/Runner/Assets.xcassets/LaunchImage.imageset/._README.md
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Assets.xcassets/LaunchImage.imageset/._README.md differ
diff --git a/medcify/__MACOSX/ios/Runner/Base.lproj/._LaunchScreen.storyboard b/medcify/__MACOSX/ios/Runner/Base.lproj/._LaunchScreen.storyboard
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Base.lproj/._LaunchScreen.storyboard differ
diff --git a/medcify/__MACOSX/ios/Runner/Base.lproj/._Main.storyboard b/medcify/__MACOSX/ios/Runner/Base.lproj/._Main.storyboard
new file mode 100644
index 0000000..f09e5b9
Binary files /dev/null and b/medcify/__MACOSX/ios/Runner/Base.lproj/._Main.storyboard differ
diff --git a/medcify/analysis_options.yaml b/medcify/analysis_options.yaml
new file mode 100644
index 0000000..61b6c4d
--- /dev/null
+++ b/medcify/analysis_options.yaml
@@ -0,0 +1,29 @@
+# This file configures the analyzer, which statically analyzes Dart code to
+# check for errors, warnings, and lints.
+#
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
+# invoked from the command line by running `flutter analyze`.
+
+# The following line activates a set of recommended lints for Flutter apps,
+# packages, and plugins designed to encourage good coding practices.
+include: package:flutter_lints/flutter.yaml
+
+linter:
+ # The lint rules applied to this project can be customized in the
+ # section below to disable rules from the `package:flutter_lints/flutter.yaml`
+ # included above or to enable additional rules. A list of all available lints
+ # and their documentation is published at
+ # https://dart-lang.github.io/linter/lints/index.html.
+ #
+ # Instead of disabling a lint rule for the entire project in the
+ # section below, it can also be suppressed for a single line of code
+ # or a specific dart file by using the `// ignore: name_of_lint` and
+ # `// ignore_for_file: name_of_lint` syntax on the line or in the file
+ # producing the lint.
+ rules:
+ # avoid_print: false # Uncomment to disable the `avoid_print` rule
+ # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/medcify/android/.gitignore b/medcify/android/.gitignore
new file mode 100644
index 0000000..6f56801
--- /dev/null
+++ b/medcify/android/.gitignore
@@ -0,0 +1,13 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
+key.properties
+**/*.keystore
+**/*.jks
diff --git a/medcify/android/.idea/android.iml b/medcify/android/.idea/android.iml
new file mode 100644
index 0000000..2169bed
--- /dev/null
+++ b/medcify/android/.idea/android.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/medcify/android/.idea/compiler.xml b/medcify/android/.idea/compiler.xml
new file mode 100644
index 0000000..fb7f4a8
--- /dev/null
+++ b/medcify/android/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/medcify/android/.idea/gradle.xml b/medcify/android/.idea/gradle.xml
new file mode 100644
index 0000000..83ee275
--- /dev/null
+++ b/medcify/android/.idea/gradle.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/medcify/android/.idea/jarRepositories.xml b/medcify/android/.idea/jarRepositories.xml
new file mode 100644
index 0000000..c9e944b
--- /dev/null
+++ b/medcify/android/.idea/jarRepositories.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/medcify/android/.idea/misc.xml b/medcify/android/.idea/misc.xml
new file mode 100644
index 0000000..25d34a4
--- /dev/null
+++ b/medcify/android/.idea/misc.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/medcify/android/.idea/modules.xml b/medcify/android/.idea/modules.xml
new file mode 100644
index 0000000..9dddca5
--- /dev/null
+++ b/medcify/android/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/medcify/android/.idea/workspace.xml b/medcify/android/.idea/workspace.xml
new file mode 100644
index 0000000..8b9bc2b
--- /dev/null
+++ b/medcify/android/.idea/workspace.xml
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1656399509923
+
+
+ 1656399509923
+
+
+
+
\ No newline at end of file
diff --git a/medcify/android/app/build.gradle b/medcify/android/app/build.gradle
new file mode 100644
index 0000000..562a16d
--- /dev/null
+++ b/medcify/android/app/build.gradle
@@ -0,0 +1,94 @@
+def localProperties = new Properties()
+def localPropertiesFile = rootProject.file('local.properties')
+if (localPropertiesFile.exists()) {
+ localPropertiesFile.withReader('UTF-8') { reader ->
+ localProperties.load(reader)
+ }
+}
+
+def flutterRoot = localProperties.getProperty('flutter.sdk')
+if (flutterRoot == null) {
+ throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
+}
+
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+if (flutterVersionCode == null) {
+ flutterVersionCode = '4'
+}
+
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
+if (flutterVersionName == null) {
+ flutterVersionName = '1.0.3'
+}
+
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
+apply plugin: 'com.google.gms.google-services'
+
+def keystoreProperties = new Properties()
+def keystorePropertiesFile = rootProject.file('key.properties')
+if (keystorePropertiesFile.exists()) {
+ keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
+}
+
+android {
+ compileSdkVersion 33
+ ndkVersion flutter.ndkVersion
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
+ kotlinOptions {
+ jvmTarget = '1.8'
+ }
+
+ sourceSets {
+ main.java.srcDirs += 'src/main/kotlin'
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId "com.medcify.app"
+ // You can update the following values to match your application needs.
+ // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
+ minSdkVersion 21
+ targetSdkVersion flutter.targetSdkVersion
+ versionCode flutterVersionCode.toInteger()
+ versionName flutterVersionName
+ }
+
+ signingConfigs {
+ release {
+ keyAlias keystoreProperties['keyAlias']
+ keyPassword keystoreProperties['keyPassword']
+ storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
+ storePassword keystoreProperties['storePassword']
+ }
+ }
+
+ buildTypes {
+ release {
+ // TODO: Add your own signing config for the release build.
+ // Signing with the debug keys for now, so `flutter run --release` works.
+ signingConfig signingConfigs.release
+ minifyEnabled true
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+
+}
+
+flutter {
+ source '../..'
+}
+
+dependencies {
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+
+ implementation platform('com.google.firebase:firebase-bom:29.0.3')
+ implementation 'com.google.firebase:firebase-analytics'
+ implementation 'com.google.firebase:firebase-messaging'
+}
diff --git a/medcify/android/app/google-services.json b/medcify/android/app/google-services.json
new file mode 100644
index 0000000..d9fc420
--- /dev/null
+++ b/medcify/android/app/google-services.json
@@ -0,0 +1,39 @@
+{
+ "project_info": {
+ "project_number": "210256807423",
+ "project_id": "medcifyapp",
+ "storage_bucket": "medcifyapp.appspot.com"
+ },
+ "client": [
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:210256807423:android:0b77a3bbee9239d89013ca",
+ "android_client_info": {
+ "package_name": "com.medcify.app"
+ }
+ },
+ "oauth_client": [
+ {
+ "client_id": "210256807423-t8lp1gupjdpf4kcolh7vkpcvqikfpk92.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ],
+ "api_key": [
+ {
+ "current_key": "AIzaSyANVUN4liuk7k01x6ZhSorrIFhk5zySSYQ"
+ }
+ ],
+ "services": {
+ "appinvite_service": {
+ "other_platform_oauth_client": [
+ {
+ "client_id": "210256807423-t8lp1gupjdpf4kcolh7vkpcvqikfpk92.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "configuration_version": "1"
+}
\ No newline at end of file
diff --git a/medcify/android/app/proguard-rules.pro b/medcify/android/app/proguard-rules.pro
new file mode 100644
index 0000000..3a974e5
--- /dev/null
+++ b/medcify/android/app/proguard-rules.pro
@@ -0,0 +1,7 @@
+-keepattributes *Annotation*
+-dontwarn com.razorpay.**
+-keep class com.razorpay.** {*;}
+-optimizations !method/inlining/
+-keepclasseswithmembers class * {
+ public void onPayment*(...);
+}
\ No newline at end of file
diff --git a/medcify/android/app/release/app-release.aab b/medcify/android/app/release/app-release.aab
new file mode 100644
index 0000000..39ab96f
Binary files /dev/null and b/medcify/android/app/release/app-release.aab differ
diff --git a/medcify/android/app/src/debug/AndroidManifest.xml b/medcify/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 0000000..e3fd9cc
--- /dev/null
+++ b/medcify/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,8 @@
+
+
+
+
diff --git a/medcify/android/app/src/main/AndroidManifest.xml b/medcify/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..ae08b3e
--- /dev/null
+++ b/medcify/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/medcify/android/app/src/main/ic_launcher-playstore.png b/medcify/android/app/src/main/ic_launcher-playstore.png
new file mode 100644
index 0000000..a698a62
Binary files /dev/null and b/medcify/android/app/src/main/ic_launcher-playstore.png differ
diff --git a/medcify/android/app/src/main/kotlin/com/example/medcify/MainActivity.kt b/medcify/android/app/src/main/kotlin/com/example/medcify/MainActivity.kt
new file mode 100644
index 0000000..c2ade3b
--- /dev/null
+++ b/medcify/android/app/src/main/kotlin/com/example/medcify/MainActivity.kt
@@ -0,0 +1,6 @@
+package com.example.medcify
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity: FlutterActivity() {
+}
diff --git a/medcify/android/app/src/main/res/drawable-v21/launch_background.xml b/medcify/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 0000000..f74085f
--- /dev/null
+++ b/medcify/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/medcify/android/app/src/main/res/drawable/launch_background.xml b/medcify/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 0000000..304732f
--- /dev/null
+++ b/medcify/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/medcify/android/app/src/main/res/drawable/logo.png b/medcify/android/app/src/main/res/drawable/logo.png
new file mode 100644
index 0000000..d8a125f
Binary files /dev/null and b/medcify/android/app/src/main/res/drawable/logo.png differ
diff --git a/medcify/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/medcify/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..036d09b
--- /dev/null
+++ b/medcify/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/medcify/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/medcify/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..036d09b
--- /dev/null
+++ b/medcify/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/medcify/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/medcify/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..9f77f4c
Binary files /dev/null and b/medcify/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/medcify/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/medcify/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..d8a125f
Binary files /dev/null and b/medcify/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ
diff --git a/medcify/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/medcify/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..271fec5
Binary files /dev/null and b/medcify/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/medcify/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/medcify/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..600043a
Binary files /dev/null and b/medcify/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/medcify/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/medcify/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..bcf0fba
Binary files /dev/null and b/medcify/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ
diff --git a/medcify/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/medcify/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..cb7d8c0
Binary files /dev/null and b/medcify/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/medcify/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/medcify/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..317e594
Binary files /dev/null and b/medcify/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/medcify/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/medcify/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..8859112
Binary files /dev/null and b/medcify/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ
diff --git a/medcify/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/medcify/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..e41c7b9
Binary files /dev/null and b/medcify/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/medcify/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/medcify/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..9ffeb24
Binary files /dev/null and b/medcify/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/medcify/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/medcify/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..f8e22a4
Binary files /dev/null and b/medcify/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ
diff --git a/medcify/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/medcify/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..7277c83
Binary files /dev/null and b/medcify/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/medcify/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/medcify/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..485287e
Binary files /dev/null and b/medcify/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/medcify/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/medcify/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..d6a89c4
Binary files /dev/null and b/medcify/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ
diff --git a/medcify/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/medcify/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..f176ca3
Binary files /dev/null and b/medcify/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/medcify/android/app/src/main/res/values-night/styles.xml b/medcify/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 0000000..06952be
--- /dev/null
+++ b/medcify/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/medcify/android/app/src/main/res/values/ic_launcher_background.xml b/medcify/android/app/src/main/res/values/ic_launcher_background.xml
new file mode 100644
index 0000000..c5d5899
--- /dev/null
+++ b/medcify/android/app/src/main/res/values/ic_launcher_background.xml
@@ -0,0 +1,4 @@
+
+
+ #FFFFFF
+
\ No newline at end of file
diff --git a/medcify/android/app/src/main/res/values/styles.xml b/medcify/android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..cb1ef88
--- /dev/null
+++ b/medcify/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/medcify/android/app/src/profile/AndroidManifest.xml b/medcify/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 0000000..e3fd9cc
--- /dev/null
+++ b/medcify/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,8 @@
+
+
+
+
diff --git a/medcify/android/build.gradle b/medcify/android/build.gradle
new file mode 100644
index 0000000..6f5ac97
--- /dev/null
+++ b/medcify/android/build.gradle
@@ -0,0 +1,32 @@
+buildscript {
+ ext.kotlin_version = '1.6.10'
+ repositories {
+ google()
+ mavenCentral()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:7.1.2'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ classpath 'com.google.gms:google-services:4.3.10'
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+rootProject.buildDir = '../build'
+subprojects {
+ project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+ project.evaluationDependsOn(':app')
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/medcify/android/gradle.properties b/medcify/android/gradle.properties
new file mode 100644
index 0000000..94adc3a
--- /dev/null
+++ b/medcify/android/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx1536M
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/medcify/android/gradle/wrapper/gradle-wrapper.properties b/medcify/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..cc5527d
--- /dev/null
+++ b/medcify/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
diff --git a/medcify/android/medcify_android.iml b/medcify/android/medcify_android.iml
new file mode 100644
index 0000000..3e44773
--- /dev/null
+++ b/medcify/android/medcify_android.iml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/medcify/android/settings.gradle b/medcify/android/settings.gradle
new file mode 100644
index 0000000..44e62bc
--- /dev/null
+++ b/medcify/android/settings.gradle
@@ -0,0 +1,11 @@
+include ':app'
+
+def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
+def properties = new Properties()
+
+assert localPropertiesFile.exists()
+localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
+
+def flutterSdkPath = properties.getProperty("flutter.sdk")
+assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
diff --git a/medcify/assets/images/delivery.png b/medcify/assets/images/delivery.png
new file mode 100644
index 0000000..5c78fb1
Binary files /dev/null and b/medcify/assets/images/delivery.png differ
diff --git a/medcify/assets/images/home.png b/medcify/assets/images/home.png
new file mode 100644
index 0000000..1056972
Binary files /dev/null and b/medcify/assets/images/home.png differ
diff --git a/medcify/assets/images/logo.png b/medcify/assets/images/logo.png
new file mode 100644
index 0000000..d41a50f
Binary files /dev/null and b/medcify/assets/images/logo.png differ
diff --git a/medcify/assets/images/logout.png b/medcify/assets/images/logout.png
new file mode 100644
index 0000000..a0b94ff
Binary files /dev/null and b/medcify/assets/images/logout.png differ
diff --git a/medcify/assets/images/medicine.png b/medcify/assets/images/medicine.png
new file mode 100644
index 0000000..1362037
Binary files /dev/null and b/medcify/assets/images/medicine.png differ
diff --git a/medcify/assets/images/orders.png b/medcify/assets/images/orders.png
new file mode 100644
index 0000000..a6d96a1
Binary files /dev/null and b/medcify/assets/images/orders.png differ
diff --git a/medcify/assets/images/plan.png b/medcify/assets/images/plan.png
new file mode 100644
index 0000000..13a6bb2
Binary files /dev/null and b/medcify/assets/images/plan.png differ
diff --git a/medcify/assets/images/plan_task.png b/medcify/assets/images/plan_task.png
new file mode 100644
index 0000000..38b5b93
Binary files /dev/null and b/medcify/assets/images/plan_task.png differ
diff --git a/medcify/assets/images/profile.png b/medcify/assets/images/profile.png
new file mode 100644
index 0000000..9be1ea5
Binary files /dev/null and b/medcify/assets/images/profile.png differ
diff --git a/medcify/assets/images/qr_code.png b/medcify/assets/images/qr_code.png
new file mode 100644
index 0000000..335d77e
Binary files /dev/null and b/medcify/assets/images/qr_code.png differ
diff --git a/medcify/assets/images/rating.png b/medcify/assets/images/rating.png
new file mode 100644
index 0000000..a706a12
Binary files /dev/null and b/medcify/assets/images/rating.png differ
diff --git a/medcify/assets/images/search.png b/medcify/assets/images/search.png
new file mode 100644
index 0000000..48b8e6d
Binary files /dev/null and b/medcify/assets/images/search.png differ
diff --git a/medcify/assets/images/setting.png b/medcify/assets/images/setting.png
new file mode 100644
index 0000000..7f21dcb
Binary files /dev/null and b/medcify/assets/images/setting.png differ
diff --git a/medcify/assets/images/share.png b/medcify/assets/images/share.png
new file mode 100644
index 0000000..7692eea
Binary files /dev/null and b/medcify/assets/images/share.png differ
diff --git a/medcify/assets/images/store.png b/medcify/assets/images/store.png
new file mode 100644
index 0000000..527b40b
Binary files /dev/null and b/medcify/assets/images/store.png differ
diff --git a/medcify/assets/images/timing.png b/medcify/assets/images/timing.png
new file mode 100644
index 0000000..563a396
Binary files /dev/null and b/medcify/assets/images/timing.png differ
diff --git a/medcify/assets/images/upi.png b/medcify/assets/images/upi.png
new file mode 100644
index 0000000..bd43beb
Binary files /dev/null and b/medcify/assets/images/upi.png differ
diff --git a/medcify/assets/images/whatsapp.png b/medcify/assets/images/whatsapp.png
new file mode 100644
index 0000000..5d9a14e
Binary files /dev/null and b/medcify/assets/images/whatsapp.png differ
diff --git a/medcify/flutter_01.log b/medcify/flutter_01.log
new file mode 100644
index 0000000..1ca31b8
--- /dev/null
+++ b/medcify/flutter_01.log
@@ -0,0 +1,92 @@
+Flutter crash report.
+Please report a bug at https://github.com/flutter/flutter/issues.
+
+## command
+
+flutter --no-color pub get
+
+## exception
+
+FileSystemException: FileSystemException: Failed to decode data using encoding 'utf-8', path = '/Volumes/Work/products/medcify/android/local.properties'
+
+```
+#0 _File._tryDecode (dart:io/file_impl.dart:564:7)
+#1 _File.readAsStringSync (dart:io/file_impl.dart:584:7)
+#2 ForwardingFile.readAsStringSync (package:file/src/forwarding/forwarding_file.dart:96:16)
+#3 ErrorHandlingFile.readAsStringSync. (package:flutter_tools/src/base/error_handling_io.dart:222:22)
+#4 _runSync (package:flutter_tools/src/base/error_handling_io.dart:597:14)
+#5 ErrorHandlingFile.readAsStringSync (package:flutter_tools/src/base/error_handling_io.dart:221:12)
+#6 new SettingsFile.parseFromFile (package:flutter_tools/src/base/utils.dart:145:36)
+#7 updateLocalProperties (package:flutter_tools/src/android/gradle_utils.dart:221:29)
+#8 AndroidProject.ensureReadyForPlatformSpecificTooling (package:flutter_tools/src/project.dart:548:12)
+#9 FlutterProject.ensureReadyForPlatformSpecificTooling (package:flutter_tools/src/project.dart:361:21)
+
+#10 PackagesGetCommand.runCommand (package:flutter_tools/src/commands/packages.dart:177:5)
+
+#11 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1183:27)
+
+#12 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)
+
+#13 CommandRunner.runCommand (package:args/command_runner.dart:209:13)
+
+#14 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
+
+#15 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)
+
+#16 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
+
+#17 run.. (package:flutter_tools/runner.dart:62:9)
+
+#18 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)
+
+#19 main (package:flutter_tools/executable.dart:94:3)
+
+```
+
+## flutter doctor
+
+```
+[✓] Flutter (Channel stable, 3.0.0, on macOS 12.1 21C52 darwin-arm, locale en-IN)
+ • Flutter version 3.0.0 at /Volumes/Work/sdk/flutter
+ • Upstream repository https://github.com/flutter/flutter.git
+ • Framework revision ee4e09cce0 (4 months ago), 2022-05-09 16:45:18 -0700
+ • Engine revision d1b9a6938a
+ • Dart version 2.17.0
+ • DevTools version 2.12.2
+
+[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
+ • Android SDK at /Users/guruprasathb/Library/Android/sdk
+ • Platform android-33, build-tools 31.0.0
+ • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
+ • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
+ • All Android licenses accepted.
+
+[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
+ • Xcode at /Applications/Xcode.app/Contents/Developer
+ • CocoaPods version 1.11.2
+
+[✓] Chrome - develop for the web
+ • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
+
+[✓] Android Studio (version 2021.2)
+ • Android Studio at /Applications/Android Studio.app/Contents
+ • Flutter plugin can be installed from:
+ 🔨 https://plugins.jetbrains.com/plugin/9212-flutter
+ • Dart plugin can be installed from:
+ 🔨 https://plugins.jetbrains.com/plugin/6351-dart
+ • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
+
+[✓] VS Code (version 1.69.0)
+ • VS Code at /Applications/Visual Studio Code.app/Contents
+ • Flutter extension version 3.46.0
+
+[✓] Connected device (3 available)
+ • POCO X2 (mobile) • 192.168.75.73:5555 • android-arm64 • Android 12 (API 32)
+ • macOS (desktop) • macos • darwin-arm64 • macOS 12.1 21C52 darwin-arm
+ • Chrome (web) • chrome • web-javascript • Google Chrome 104.0.5112.101
+
+[✓] HTTP Host Availability
+ • All required HTTP hosts are available
+
+• No issues found!
+```
diff --git a/medcify/fonts/Montserrat-Black.ttf b/medcify/fonts/Montserrat-Black.ttf
new file mode 100644
index 0000000..437b115
Binary files /dev/null and b/medcify/fonts/Montserrat-Black.ttf differ
diff --git a/medcify/fonts/Montserrat-Bold.ttf b/medcify/fonts/Montserrat-Bold.ttf
new file mode 100644
index 0000000..221819b
Binary files /dev/null and b/medcify/fonts/Montserrat-Bold.ttf differ
diff --git a/medcify/fonts/Montserrat-ExtraBold.ttf b/medcify/fonts/Montserrat-ExtraBold.ttf
new file mode 100644
index 0000000..80ea806
Binary files /dev/null and b/medcify/fonts/Montserrat-ExtraBold.ttf differ
diff --git a/medcify/fonts/Montserrat-Light.ttf b/medcify/fonts/Montserrat-Light.ttf
new file mode 100644
index 0000000..990857d
Binary files /dev/null and b/medcify/fonts/Montserrat-Light.ttf differ
diff --git a/medcify/fonts/Montserrat-Medium.ttf b/medcify/fonts/Montserrat-Medium.ttf
new file mode 100644
index 0000000..6e079f6
Binary files /dev/null and b/medcify/fonts/Montserrat-Medium.ttf differ
diff --git a/medcify/fonts/Montserrat-Regular.ttf b/medcify/fonts/Montserrat-Regular.ttf
new file mode 100644
index 0000000..8d443d5
Binary files /dev/null and b/medcify/fonts/Montserrat-Regular.ttf differ
diff --git a/medcify/fonts/Montserrat-SemiBold.ttf b/medcify/fonts/Montserrat-SemiBold.ttf
new file mode 100644
index 0000000..f8a43f2
Binary files /dev/null and b/medcify/fonts/Montserrat-SemiBold.ttf differ
diff --git a/medcify/ios/.gitignore b/medcify/ios/.gitignore
new file mode 100644
index 0000000..7a7f987
--- /dev/null
+++ b/medcify/ios/.gitignore
@@ -0,0 +1,34 @@
+**/dgph
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/ephemeral/
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3
diff --git a/medcify/ios/Flutter/AppFrameworkInfo.plist b/medcify/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 0000000..8d4492f
--- /dev/null
+++ b/medcify/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 9.0
+
+
diff --git a/medcify/ios/Flutter/Debug.xcconfig b/medcify/ios/Flutter/Debug.xcconfig
new file mode 100644
index 0000000..ec97fc6
--- /dev/null
+++ b/medcify/ios/Flutter/Debug.xcconfig
@@ -0,0 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
+#include "Generated.xcconfig"
diff --git a/medcify/ios/Flutter/Release.xcconfig b/medcify/ios/Flutter/Release.xcconfig
new file mode 100644
index 0000000..c4855bf
--- /dev/null
+++ b/medcify/ios/Flutter/Release.xcconfig
@@ -0,0 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
+#include "Generated.xcconfig"
diff --git a/medcify/ios/Podfile b/medcify/ios/Podfile
new file mode 100644
index 0000000..1e8c3c9
--- /dev/null
+++ b/medcify/ios/Podfile
@@ -0,0 +1,41 @@
+# Uncomment this line to define a global platform for your project
+# platform :ios, '9.0'
+
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+
+project 'Runner', {
+ 'Debug' => :debug,
+ 'Profile' => :release,
+ 'Release' => :release,
+}
+
+def flutter_root
+ generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
+ unless File.exist?(generated_xcode_build_settings_path)
+ raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
+ end
+
+ File.foreach(generated_xcode_build_settings_path) do |line|
+ matches = line.match(/FLUTTER_ROOT\=(.*)/)
+ return matches[1].strip if matches
+ end
+ raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
+end
+
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
+target 'Runner' do
+ use_frameworks!
+ use_modular_headers!
+
+ flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
+end
+
+post_install do |installer|
+ installer.pods_project.targets.each do |target|
+ flutter_additional_ios_build_settings(target)
+ end
+end
diff --git a/medcify/ios/Runner.xcodeproj/project.pbxproj b/medcify/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..ef9cca4
--- /dev/null
+++ b/medcify/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,484 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 50;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+ 97C147021CF9000F007C117D /* Info.plist */,
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
+ );
+ path = Runner;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 97C146ED1CF9000F007C117D /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 97C146E61CF9000F007C117D /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 1300;
+ ORGANIZATIONNAME = "";
+ TargetAttributes = {
+ 97C146ED1CF9000F007C117D = {
+ CreatedOnToolsVersion = 7.3.1;
+ LastSwiftMigration = 1100;
+ };
+ };
+ };
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 97C146E51CF9000F007C117D;
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 97C146ED1CF9000F007C117D /* Runner */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 97C146EC1CF9000F007C117D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 249021D3217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Profile;
+ };
+ 249021D4217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = DC8S7393DQ;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.medcify;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Profile;
+ };
+ 97C147031CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 97C147061CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = DC8S7393DQ;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.medcify;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Debug;
+ };
+ 97C147071CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = DC8S7393DQ;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.medcify;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147031CF9000F007C117D /* Debug */,
+ 97C147041CF9000F007C117D /* Release */,
+ 249021D3217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147061CF9000F007C117D /* Debug */,
+ 97C147071CF9000F007C117D /* Release */,
+ 249021D4217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}
diff --git a/medcify/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/medcify/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/medcify/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/medcify/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/medcify/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/medcify/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/medcify/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/medcify/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/medcify/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/medcify/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/medcify/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 0000000..c87d15a
--- /dev/null
+++ b/medcify/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/medcify/ios/Runner.xcworkspace/contents.xcworkspacedata b/medcify/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..1d526a1
--- /dev/null
+++ b/medcify/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/medcify/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/medcify/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/medcify/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/medcify/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/medcify/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/medcify/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/medcify/ios/Runner/AppDelegate.swift b/medcify/ios/Runner/AppDelegate.swift
new file mode 100644
index 0000000..70693e4
--- /dev/null
+++ b/medcify/ios/Runner/AppDelegate.swift
@@ -0,0 +1,13 @@
+import UIKit
+import Flutter
+
+@UIApplicationMain
+@objc class AppDelegate: FlutterAppDelegate {
+ override func application(
+ _ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
+ ) -> Bool {
+ GeneratedPluginRegistrant.register(with: self)
+ return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+ }
+}
diff --git a/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..d36b1fa
--- /dev/null
+++ b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,122 @@
+{
+ "images" : [
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "83.5x83.5",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-83.5x83.5@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "1024x1024",
+ "idiom" : "ios-marketing",
+ "filename" : "Icon-App-1024x1024@1x.png",
+ "scale" : "1x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
new file mode 100644
index 0000000..dc9ada4
Binary files /dev/null and b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
new file mode 100644
index 0000000..28c6bf0
Binary files /dev/null and b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
new file mode 100644
index 0000000..2ccbfd9
Binary files /dev/null and b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
new file mode 100644
index 0000000..f091b6b
Binary files /dev/null and b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
new file mode 100644
index 0000000..4cde121
Binary files /dev/null and b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
new file mode 100644
index 0000000..d0ef06e
Binary files /dev/null and b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
new file mode 100644
index 0000000..dcdc230
Binary files /dev/null and b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
new file mode 100644
index 0000000..2ccbfd9
Binary files /dev/null and b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
new file mode 100644
index 0000000..c8f9ed8
Binary files /dev/null and b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
new file mode 100644
index 0000000..a6d6b86
Binary files /dev/null and b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
new file mode 100644
index 0000000..a6d6b86
Binary files /dev/null and b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
new file mode 100644
index 0000000..75b2d16
Binary files /dev/null and b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
new file mode 100644
index 0000000..c4df70d
Binary files /dev/null and b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
new file mode 100644
index 0000000..6a84f41
Binary files /dev/null and b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
new file mode 100644
index 0000000..d0e1f58
Binary files /dev/null and b/medcify/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/medcify/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/medcify/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new file mode 100644
index 0000000..0bedcf2
--- /dev/null
+++ b/medcify/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@3x.png",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/medcify/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/medcify/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/medcify/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/medcify/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/medcify/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/medcify/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ
diff --git a/medcify/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/medcify/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/medcify/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ
diff --git a/medcify/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/medcify/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new file mode 100644
index 0000000..89c2725
--- /dev/null
+++ b/medcify/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
diff --git a/medcify/ios/Runner/Base.lproj/LaunchScreen.storyboard b/medcify/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000..f2e259c
--- /dev/null
+++ b/medcify/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/medcify/ios/Runner/Base.lproj/Main.storyboard b/medcify/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 0000000..f3c2851
--- /dev/null
+++ b/medcify/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/medcify/ios/Runner/Info.plist b/medcify/ios/Runner/Info.plist
new file mode 100644
index 0000000..3680450
--- /dev/null
+++ b/medcify/ios/Runner/Info.plist
@@ -0,0 +1,49 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ Medcify
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ medcify
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UIViewControllerBasedStatusBarAppearance
+
+ CADisableMinimumFrameDurationOnPhone
+
+
+
diff --git a/medcify/ios/Runner/Runner-Bridging-Header.h b/medcify/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 0000000..308a2a5
--- /dev/null
+++ b/medcify/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"
diff --git a/medcify/lib/components/alert.dart b/medcify/lib/components/alert.dart
new file mode 100644
index 0000000..3d3cf33
--- /dev/null
+++ b/medcify/lib/components/alert.dart
@@ -0,0 +1,38 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+
+import '../navigation/navigation.dart';
+
+class AlertX {
+ AlertX._privateConstructor();
+ static final AlertX instance = AlertX._privateConstructor();
+
+ showAlert({required String title, required String msg, String? negativeButtonText, required String positiveButtonText,void Function()? negativeButtonPressed,required void Function() positiveButtonPressed}){
+ var context = Navigation.instance.navigatorKey.currentContext;
+ if(context!=null){
+ showDialog(
+ barrierDismissible: false,
+ context: context,
+ builder:(BuildContext context){
+ return AlertDialog(
+ title: Text(title, style:const TextStyle(fontWeight: FontWeight.w600),),
+ contentPadding: const EdgeInsets.only(left: 24,right: 24,top: 8),
+ actionsPadding: const EdgeInsets.only(left: 16,right: 16),
+ content: Text(msg,style: const TextStyle(height: 1.5,fontSize: 14),),
+ actions: [
+ if(negativeButtonText!=null) TextButton(
+ onPressed: negativeButtonPressed,
+ child: Text(negativeButtonText,style: TextStyle(color: Colors.grey.shade500),),
+ ),
+ TextButton(
+ onPressed: positiveButtonPressed,
+ child: Text(positiveButtonText,style: const TextStyle(color: Colors.blue),),
+ ),
+ ],
+ );
+ }
+ );
+ }
+ }
+
+}
diff --git a/medcify/lib/components/button.dart b/medcify/lib/components/button.dart
new file mode 100644
index 0000000..a895679
--- /dev/null
+++ b/medcify/lib/components/button.dart
@@ -0,0 +1,35 @@
+import 'package:flutter/material.dart';
+
+import '../constants.dart';
+
+enum ButtonType{
+ Filled,
+ Outline
+}
+
+class Button extends StatelessWidget {
+ String text;
+ Function() onPressed;
+ ButtonType? type;
+ Color? color;
+ Color? textColor;
+ Button({required this.text, required this.onPressed, this.type, this.color, this.textColor});
+
+ @override
+ Widget build(BuildContext context) {
+ return MaterialButton(
+ onPressed: onPressed,
+ color: color ?? ((type == ButtonType.Outline) ? Colors.white : Constants.primaryColor),
+ minWidth: double.infinity,
+ elevation: 0,
+ height: 48,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(4),
+ side: BorderSide(
+ color: color ?? Constants.primaryColor
+ )
+ ),
+ child: Text(text.toUpperCase(),style: TextStyle(color: textColor ?? ((type == ButtonType.Outline) ? Constants.primaryColor : Colors.white),fontWeight: FontWeight.bold),),
+ );
+ }
+}
diff --git a/medcify/lib/components/custom_textfield.dart b/medcify/lib/components/custom_textfield.dart
new file mode 100644
index 0000000..80f049c
--- /dev/null
+++ b/medcify/lib/components/custom_textfield.dart
@@ -0,0 +1,52 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+
+class CustomTextField extends StatelessWidget {
+ TextEditingController controller;
+ String hint;
+ TextInputType? keyboardType;
+ TextInputAction? action;
+ List? inputFormatters;
+ String? Function(String?)? validator;
+ Function(String?)? onChanged;
+ Function(String?)? onCompleted;
+ int? maxLines;
+ int? maxLength;
+ Widget? suffixIcon;
+ Color? fillColor;
+ CustomTextField({required this.hint, required this.controller, this.keyboardType, this.inputFormatters, this.validator, this.onChanged, this.action, this.onCompleted,this.maxLines, this.suffixIcon, this.fillColor, this.maxLength});
+
+ @override
+ Widget build(BuildContext context) {
+ return TextFormField(
+ controller: controller,
+ validator: validator,
+ keyboardType: keyboardType ?? TextInputType.text,
+ textInputAction: action,
+ inputFormatters: inputFormatters,
+ onChanged: onChanged,
+ onFieldSubmitted: onCompleted,
+ maxLines: maxLines,
+ maxLength: maxLength,
+ style: const TextStyle(color: Colors.black,fontSize: 15),
+ decoration: InputDecoration(
+ counterText: "",
+ hintStyle: const TextStyle(color: Colors.grey,fontSize: 15),
+ hintText: hint,
+ isDense: true,
+ suffixIcon: suffixIcon,
+ contentPadding: const EdgeInsets.symmetric(horizontal: 16,vertical: 16),
+ filled: true,
+ fillColor: fillColor ?? Colors.grey.shade100,
+ enabledBorder: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(4),
+ borderSide: BorderSide(color: fillColor ?? Colors.grey.shade100)
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(4),
+ borderSide: BorderSide(color: fillColor ?? Colors.grey.shade100)
+ ),
+ ),
+ );
+ }
+}
diff --git a/medcify/lib/components/loader.dart b/medcify/lib/components/loader.dart
new file mode 100644
index 0000000..789f266
--- /dev/null
+++ b/medcify/lib/components/loader.dart
@@ -0,0 +1,21 @@
+import 'package:flutter/material.dart';
+import '../constants.dart';
+
+class Loader extends StatelessWidget {
+ const Loader({Key? key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return Center(
+ child: SizedBox(
+ height: 24,
+ width: 24,
+ child: CircularProgressIndicator(
+ color: Constants.primaryColor,
+ backgroundColor: Constants.primaryColor.withOpacity(0.25),
+ strokeWidth: 3,
+ ),
+ ),
+ );
+ }
+}
diff --git a/medcify/lib/components/loading_dialog.dart b/medcify/lib/components/loading_dialog.dart
new file mode 100644
index 0000000..7564efb
--- /dev/null
+++ b/medcify/lib/components/loading_dialog.dart
@@ -0,0 +1,36 @@
+import 'package:flutter/material.dart';
+import '../constants.dart';
+
+class LoadingDialog extends StatelessWidget {
+ const LoadingDialog({Key? key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return WillPopScope(
+ onWillPop: () async{
+ return false;
+ },
+ child: Scaffold(
+ backgroundColor: Colors.black38,
+ body: Center(
+ child: Container(
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(30),
+ ),
+ padding: const EdgeInsets.all(6),
+ child: SizedBox(
+ height: 24,
+ width: 24,
+ child: CircularProgressIndicator(
+ color: Constants.primaryColor,
+ strokeWidth: 3,
+ backgroundColor: Constants.primaryColor.withOpacity(0.25),
+ ),
+ ),
+ ),
+ ),
+ )
+ );
+ }
+}
diff --git a/medcify/lib/constants.dart b/medcify/lib/constants.dart
new file mode 100644
index 0000000..2a32b33
--- /dev/null
+++ b/medcify/lib/constants.dart
@@ -0,0 +1,9 @@
+import 'package:flutter/material.dart';
+
+class Constants{
+ static const primaryColor = Color(0xff3CB371);
+ static const secondaryTextColor = Color(0xff8F9BB3);
+ static String noInternet = "No internet connection.Please check your internet connection before retrying";
+ static const imgUrl = "https://medcify.app/";
+}
+
diff --git a/medcify/lib/helpers.dart b/medcify/lib/helpers.dart
new file mode 100644
index 0000000..2bd5d89
--- /dev/null
+++ b/medcify/lib/helpers.dart
@@ -0,0 +1,76 @@
+import 'dart:convert';
+
+import 'package:connectivity_plus/connectivity_plus.dart';
+import 'package:flutter/material.dart';
+import 'package:intl/intl.dart';
+import 'navigation/navigation.dart';
+
+extension StringExtension on String {
+ String capitalize() {
+ return "${this[0].toUpperCase()}${substring(1)}";
+ }
+}
+
+extension EmailValidator on String {
+ bool isValidEmail() {
+ return RegExp(r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$')
+ .hasMatch(this);
+ }
+}
+
+class Helpers{
+
+ static Future isNetwork() async{
+ var connectivityResult = await (Connectivity().checkConnectivity());
+ if (connectivityResult == ConnectivityResult.none) {
+ return false;
+ }
+ return true;
+ }
+
+ static void showPhotoSelectionDialog(Function(int) openPicker){
+ BuildContext? context = Navigation.instance.navigatorKey.currentContext;
+ if(context != null){
+ showDialog(
+ context: context,
+ builder: (context) {
+ return AlertDialog(
+ title: const Text('Choose one Option',style: TextStyle(fontSize: 15),),
+ actions: [
+ MaterialButton(
+ elevation: 0,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(8),
+ ),
+ color: Colors.indigo,
+ textColor: Colors.white,
+ onPressed: () {
+ Navigation.instance.goBack();
+ openPicker(0);
+ },
+ child: const Text("Camera"),
+ ),
+ MaterialButton(
+ elevation: 0,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(8),
+ ),
+ color: Colors.deepPurpleAccent,
+ textColor: Colors.white,
+ onPressed: () {
+ Navigation.instance.goBack();
+ openPicker(1);
+ },
+ child: const Text("Gallery"),
+ )
+ ],
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(15),
+ ),
+ );
+ },
+ );
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/medcify/lib/main.dart b/medcify/lib/main.dart
new file mode 100644
index 0000000..523a9ef
--- /dev/null
+++ b/medcify/lib/main.dart
@@ -0,0 +1,38 @@
+import 'package:firebase_core/firebase_core.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:medcify/navigation/navigation.dart';
+import 'package:medcify/storage/storage.dart';
+
+import 'navigation/routes.dart';
+
+Future main() async{
+ WidgetsFlutterBinding.ensureInitialized();
+ await Firebase.initializeApp();
+ await Storage.instance.registerSharedPreferences();
+ runApp(const MyApp());
+}
+
+class MyApp extends StatelessWidget {
+ const MyApp({Key? key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return AnnotatedRegion(
+ value: const SystemUiOverlayStyle(
+ statusBarIconBrightness: Brightness.dark,
+ statusBarColor: Colors.transparent,
+ systemNavigationBarColor: Colors.white
+ ),
+ child: MaterialApp(
+ theme: ThemeData(
+ primarySwatch: Colors.blue,
+ fontFamily: "Montserrat"
+ ),
+ debugShowCheckedModeBanner: false,
+ navigatorKey: Navigation.instance.navigatorKey,
+ onGenerateRoute: generateRoute,
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/api/banner_response.dart b/medcify/lib/models/api/banner_response.dart
new file mode 100644
index 0000000..5045781
--- /dev/null
+++ b/medcify/lib/models/api/banner_response.dart
@@ -0,0 +1,19 @@
+import 'package:medcify/models/banner_item.dart';
+
+class BannerResponse{
+ bool? status;
+ String? message;
+ List? banners;
+
+ BannerResponse.fromJson(Map json){
+ status = (json["Code"] ?? "0") != "0";
+ banners = (json["Data"] != null) ? json["Data"].map((e) => BannerItem.fromJson(e)).toList() : [];
+ message = json["Message"] ?? "Something went wrong";
+ }
+
+ BannerResponse.withError(String err){
+ status = false;
+ banners = [];
+ message = err;
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/api/company_response.dart b/medcify/lib/models/api/company_response.dart
new file mode 100644
index 0000000..b5216d1
--- /dev/null
+++ b/medcify/lib/models/api/company_response.dart
@@ -0,0 +1,20 @@
+
+import 'package:medcify/models/company_item.dart';
+
+class CompanyResponse{
+ bool? status;
+ String? message;
+ List? companies;
+
+ CompanyResponse.fromJson(Map json){
+ status = (json["Code"] ?? "0") != "0";
+ companies = (json["Data"] != null) ? json["Data"].map((e) => CompanyItem.fromJson(e)).toList() : [];
+ message = json["Message"] ?? "Something went wrong";
+ }
+
+ CompanyResponse.withError(String err){
+ status = false;
+ companies = [];
+ message = err;
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/api/generic_response.dart b/medcify/lib/models/api/generic_response.dart
new file mode 100644
index 0000000..1fa01e2
--- /dev/null
+++ b/medcify/lib/models/api/generic_response.dart
@@ -0,0 +1,29 @@
+class GenericResponse{
+ bool? status;
+ String? message;
+
+ GenericResponse.fromJson(Map json){
+ status = (json["code"] ?? "") != "0";
+ message = json["message"] ?? "Something went wrong";
+ }
+
+ GenericResponse.withError(String err){
+ status = false;
+ message = err;
+ }
+}
+
+class GenericResponse2{
+ bool? status;
+ String? message;
+
+ GenericResponse2.fromJson(Map json){
+ status = (json["Code"] ?? "") != "0";
+ message = json["Message"] ?? "Something went wrong";
+ }
+
+ GenericResponse2.withError(String err){
+ status = false;
+ message = err;
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/api/login_response.dart b/medcify/lib/models/api/login_response.dart
new file mode 100644
index 0000000..4c2d027
--- /dev/null
+++ b/medcify/lib/models/api/login_response.dart
@@ -0,0 +1,23 @@
+class LoginResponse{
+ bool? status;
+ String? message;
+ int? storeId;
+ bool? storeStatus;
+ String? token;
+
+ LoginResponse.fromJson(Map json){
+ status = (json["code"] ?? "0") != "0";
+ storeStatus = json["storeStatus"] ?? false;
+ storeId = json["storeId"] ?? 0;
+ token = json["token"] ?? "";
+ message = json["message"] ?? "Something went wrong";
+ }
+
+ LoginResponse.withError(String err){
+ status = false;
+ storeStatus = false;
+ storeId = 0;
+ token = "";
+ message = err;
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/api/medicine_response.dart b/medcify/lib/models/api/medicine_response.dart
new file mode 100644
index 0000000..b967ce1
--- /dev/null
+++ b/medcify/lib/models/api/medicine_response.dart
@@ -0,0 +1,19 @@
+import 'package:medcify/models/medicine_item.dart';
+
+class MedicineResponse{
+ bool? status;
+ String? message;
+ List? medicines;
+
+ MedicineResponse.fromJson(Map json){
+ status = (json["Code"] ?? "0") != "0";
+ medicines = (json["Data"] != null) ? json["Data"].map((e) => MedicineItem.fromJson(e)).toList() : [];
+ message = json["Message"] ?? "Something went wrong";
+ }
+
+ MedicineResponse.withError(String err){
+ status = false;
+ medicines = [];
+ message = err;
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/api/notification_count_response.dart b/medcify/lib/models/api/notification_count_response.dart
new file mode 100644
index 0000000..8f8203a
--- /dev/null
+++ b/medcify/lib/models/api/notification_count_response.dart
@@ -0,0 +1,18 @@
+
+class NotificationCountResponse{
+ bool? status;
+ String? message;
+ int? count;
+
+ NotificationCountResponse.fromJson(Map json){
+ status = (json["Code"] ?? "") != "0";
+ count = json["Data"] ?? 0;
+ message = json["Message"] ?? "Something went wrong";
+ }
+
+ NotificationCountResponse.withError(String err){
+ status = false;
+ message = err;
+ count = 0;
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/api/notification_response.dart b/medcify/lib/models/api/notification_response.dart
new file mode 100644
index 0000000..69a6a17
--- /dev/null
+++ b/medcify/lib/models/api/notification_response.dart
@@ -0,0 +1,19 @@
+import 'package:medcify/models/notification_item.dart';
+
+class NotificationResponse{
+ bool? status;
+ String? message;
+ List? notifications;
+
+ NotificationResponse.fromJson(Map json){
+ status = (json["Code"] ?? "0") != "0";
+ notifications = (json["Data"] != null) ? json["Data"].map((e) => NotificationItem.fromJson(e)).toList() : [];
+ message = json["Message"] ?? "Something went wrong";
+ }
+
+ NotificationResponse.withError(String err){
+ status = false;
+ notifications = [];
+ message = err;
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/api/order_detail_response.dart b/medcify/lib/models/api/order_detail_response.dart
new file mode 100644
index 0000000..359bb03
--- /dev/null
+++ b/medcify/lib/models/api/order_detail_response.dart
@@ -0,0 +1,20 @@
+
+import 'package:medcify/models/order_detail_item.dart';
+
+class OrderDetailResponse{
+ bool? status;
+ String? message;
+ List? medicines;
+
+ OrderDetailResponse.fromJson(Map json){
+ status = (json["Code"] ?? "0") != "0";
+ medicines = (json["Data"] != null) ? json["Data"].map((e) => OrderDetailItem.fromJson(e)).toList() : [];
+ message = json["Message"] ?? "Something went wrong";
+ }
+
+ OrderDetailResponse.withError(String err){
+ status = false;
+ medicines = [];
+ message = err;
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/api/order_response.dart b/medcify/lib/models/api/order_response.dart
new file mode 100644
index 0000000..2262f08
--- /dev/null
+++ b/medcify/lib/models/api/order_response.dart
@@ -0,0 +1,20 @@
+import 'package:medcify/models/banner_item.dart';
+import 'package:medcify/models/order_item.dart';
+
+class OrderResponse{
+ bool? status;
+ String? message;
+ List? orders;
+
+ OrderResponse.fromJson(Map json){
+ status = (json["Code"] ?? "0") != "0";
+ orders = (json["Data"] != null) ? json["Data"].map((e) => OrderItem.fromJson(e)).toList() : [];
+ message = json["Message"] ?? "Something went wrong";
+ }
+
+ OrderResponse.withError(String err){
+ status = false;
+ orders = [];
+ message = err;
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/api/overview_response.dart b/medcify/lib/models/api/overview_response.dart
new file mode 100644
index 0000000..b2ac843
--- /dev/null
+++ b/medcify/lib/models/api/overview_response.dart
@@ -0,0 +1,17 @@
+class OverviewResponse{
+ bool? status;
+ String? message;
+ dynamic count;
+
+ OverviewResponse.fromJson(Map json){
+ status = (json["Code"] ?? "0") != "0";
+ message = json["Message"] ?? "Something went wrong";
+ count = json["Data"] ?? 0;
+ }
+
+ OverviewResponse.withError(String err){
+ status = false;
+ message = err;
+ count = 0;
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/api/pincode_response.dart b/medcify/lib/models/api/pincode_response.dart
new file mode 100644
index 0000000..fd93a53
--- /dev/null
+++ b/medcify/lib/models/api/pincode_response.dart
@@ -0,0 +1,19 @@
+import 'package:medcify/models/pincode_item.dart';
+
+class PincodeResponse{
+ bool? status;
+ String? message;
+ List? pincodes;
+
+ PincodeResponse.fromJson(Map json){
+ status = (json["Code"] ?? "0") != "0";
+ pincodes = (json["Data"] != null) ? json["Data"].map((e) => PincodeItem.fromJson(e)).toList() : [];
+ message = json["Message"] ?? "Something went wrong";
+ }
+
+ PincodeResponse.withError(String err){
+ status = false;
+ pincodes = [];
+ message = err;
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/api/plan_response.dart b/medcify/lib/models/api/plan_response.dart
new file mode 100644
index 0000000..354dcfe
--- /dev/null
+++ b/medcify/lib/models/api/plan_response.dart
@@ -0,0 +1,25 @@
+import 'package:intl/intl.dart';
+import 'package:medcify/helpers.dart';
+import 'package:medcify/models/plan_item.dart';
+
+class PlanResponse{
+ List? plans;
+ String? expiryDate;
+ String? error;
+ String? currentPlan;
+ bool? status;
+ bool? planStatus;
+
+ PlanResponse.fromJson(Map json){
+ plans = (json["PlanList"] != null) ? json["PlanList"].map((e) => PlanItem.fromJson(e)).toList() : [];
+ status = json["Status"] ?? false;
+ currentPlan = json["CurrentPlan"] ?? "";
+ planStatus = json["PlanStatus"] ?? false;
+ var date = json["ExpiryOn"] ?? "";
+ expiryDate = (date != "") ? DateFormat().add_yMMMd().format(DateTime.parse(date)) : "";
+ }
+
+ PlanResponse.withError(String err){
+ error = err;
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/api/qr_code_response.dart b/medcify/lib/models/api/qr_code_response.dart
new file mode 100644
index 0000000..496a4db
--- /dev/null
+++ b/medcify/lib/models/api/qr_code_response.dart
@@ -0,0 +1,23 @@
+class QrCodeResponse{
+ bool? status;
+ String? image;
+ String? name;
+ String? url;
+ String? message;
+
+ QrCodeResponse.fromJson(Map json){
+ status = (json["Code"] ?? "0") != "0";
+ image = json["QRCode"] ?? "";
+ url = json["storeUrl"] ?? "";
+ name = json["StoreName"] ?? "";
+ message = json["Message"] ?? "Something went wrong";
+ }
+
+ QrCodeResponse.withError(String err){
+ status = false;
+ image = "";
+ url = "";
+ name = "";
+ message = err;
+ }
+}
diff --git a/medcify/lib/models/api/razor_pay_failure_response.dart b/medcify/lib/models/api/razor_pay_failure_response.dart
new file mode 100644
index 0000000..0014ba3
--- /dev/null
+++ b/medcify/lib/models/api/razor_pay_failure_response.dart
@@ -0,0 +1,15 @@
+class RazorPayFailureResponse{
+ RazorPayError? error;
+
+ RazorPayFailureResponse.fromJson(Map json){
+ error = RazorPayError.fromJson(json["error"]);
+ }
+}
+
+class RazorPayError{
+ String? desc;
+
+ RazorPayError.fromJson(Map json){
+ desc = json["description"] ?? "";
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/api/razorpay_response.dart b/medcify/lib/models/api/razorpay_response.dart
new file mode 100644
index 0000000..e7641e7
--- /dev/null
+++ b/medcify/lib/models/api/razorpay_response.dart
@@ -0,0 +1,18 @@
+class RazorPayResponse{
+ bool? status;
+ String? message;
+ String? razorPayKey;
+ String? razorPaySecretKey;
+
+ RazorPayResponse.fromJson(Map json){
+ status = (json["Code"] ?? "") != "0";
+ razorPayKey = json["Key"] ?? "";
+ razorPaySecretKey = json["secretKey"] ?? "";
+ message = json["Message"] ?? "Something went wrong";
+ }
+
+ RazorPayResponse.withError(String err){
+ status = false;
+ message = err;
+ }
+}
diff --git a/medcify/lib/models/api/register_response.dart b/medcify/lib/models/api/register_response.dart
new file mode 100644
index 0000000..4ce8799
--- /dev/null
+++ b/medcify/lib/models/api/register_response.dart
@@ -0,0 +1,17 @@
+import '../store_item.dart';
+
+class RegisterResponse{
+ bool? status;
+ String? message;
+
+ RegisterResponse.fromJson(Map json){
+ status = (json["Code"] ?? "0") != "0";
+ message = json["Message"] ?? "Something went wrong";
+ }
+
+ RegisterResponse.withError(String err){
+ status = false;
+ message = err;
+ }
+}
+
diff --git a/medcify/lib/models/api/store_response.dart b/medcify/lib/models/api/store_response.dart
new file mode 100644
index 0000000..7c15e31
--- /dev/null
+++ b/medcify/lib/models/api/store_response.dart
@@ -0,0 +1,20 @@
+import 'package:medcify/models/banner_item.dart';
+import 'package:medcify/models/store_item.dart';
+
+class StoreResponse{
+ bool? status;
+ String? message;
+ StoreItem? store;
+
+ StoreResponse.fromJson(Map json){
+ status = (json["Code"] ?? "0") != "0";
+ store = (json["Data"] != null) ? StoreItem.fromJson(json["Data"]) : null;
+ message = json["Message"] ?? "Something went wrong";
+ }
+
+ StoreResponse.withError(String err){
+ status = false;
+ store = null;
+ message = err;
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/api/store_url_response.dart b/medcify/lib/models/api/store_url_response.dart
new file mode 100644
index 0000000..db0ec7b
--- /dev/null
+++ b/medcify/lib/models/api/store_url_response.dart
@@ -0,0 +1,20 @@
+class StoreUrlResponse{
+ bool? status;
+ String? message;
+ String? url;
+ String? name;
+
+ StoreUrlResponse.fromJson(Map json){
+ status = (json["Code"] ?? "0") != "0";
+ message = json["Message"] ?? "Something went wrong";
+ url = json["URL"] ?? "";
+ name = json["StoreName"] ?? "";
+ }
+
+ StoreUrlResponse.withError(String err){
+ status = false;
+ message = err;
+ url = "";
+ name = "";
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/api/timing_response.dart b/medcify/lib/models/api/timing_response.dart
new file mode 100644
index 0000000..ef39ddd
--- /dev/null
+++ b/medcify/lib/models/api/timing_response.dart
@@ -0,0 +1,19 @@
+import 'package:medcify/models/timing_item.dart';
+
+class TimingResponse{
+ bool? status;
+ String? message;
+ List? timings;
+
+ TimingResponse.fromJson(Map json){
+ status = (json["Code"] ?? "0") != "0";
+ timings = (json["Data"] != null) ? json["Data"].map((e) => TimingItem.fromJson(e)).toList() : [];
+ message = json["Message"] ?? "Something went wrong";
+ }
+
+ TimingResponse.withError(String err){
+ status = false;
+ timings = [];
+ message = err;
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/api/upi_qr_response.dart b/medcify/lib/models/api/upi_qr_response.dart
new file mode 100644
index 0000000..67c6898
--- /dev/null
+++ b/medcify/lib/models/api/upi_qr_response.dart
@@ -0,0 +1,18 @@
+
+class UpiQrResponse{
+ bool? status;
+ String? message;
+ String? image;
+
+ UpiQrResponse.fromJson(Map json){
+ status = (json["Code"] ?? "") != "0";
+ image = json["Data"] ?? "";
+ message = json["Message"] ?? "Something went wrong";
+ }
+
+ UpiQrResponse.withError(String err){
+ status = false;
+ message = err;
+ image = "";
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/banner_item.dart b/medcify/lib/models/banner_item.dart
new file mode 100644
index 0000000..09e7372
--- /dev/null
+++ b/medcify/lib/models/banner_item.dart
@@ -0,0 +1,7 @@
+class BannerItem{
+ String? image;
+
+ BannerItem.fromJson(Map json){
+ image = json["image"] ?? "";
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/company_item.dart b/medcify/lib/models/company_item.dart
new file mode 100644
index 0000000..6860ece
--- /dev/null
+++ b/medcify/lib/models/company_item.dart
@@ -0,0 +1,9 @@
+class CompanyItem{
+ int? id;
+ String? name;
+
+ CompanyItem.fromJson(Map json){
+ id = json["id"] ?? 0;
+ name = json["name"] ?? "";
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/medicine_item.dart b/medcify/lib/models/medicine_item.dart
new file mode 100644
index 0000000..e660d01
--- /dev/null
+++ b/medcify/lib/models/medicine_item.dart
@@ -0,0 +1,40 @@
+
+class MedicineItem{
+ int? id;
+ int? companyId;
+ String? name;
+ String? image;
+ String? quantity;
+ String? howWorks;
+ String? directionOfUse;
+ bool? isShowPrescription;
+ dynamic amount;
+ dynamic discount;
+ List? sideEffects;
+ List? uses;
+
+ MedicineItem.fromJson(Map json){
+ id = json["id"] ?? 0;
+ companyId = json["companyId"] ?? 0;
+ name = json["name"] ?? "";
+ image = json["image"] ?? "";
+ quantity = json["quantity"] ?? "";
+ howWorks = json["howWorks"] ?? "";
+ directionOfUse = json["directionOfUse"] ?? "";
+ amount = json["amount"] ?? 0;
+ discount = json["discount"] ?? 0;
+ isShowPrescription = (json["prescription"] ?? 2) == 1;
+ sideEffects = (json["medicinesideeffects"] != null) ? json["medicinesideeffects"].map((e) => MedicineUses.fromJson(e)).toList() : [];
+ uses = (json["medicineuses"] != null) ? json["medicineuses"].map((e) => MedicineUses.fromJson(e)).toList() : [];
+ }
+}
+
+class MedicineUses{
+ int? id;
+ String? name;
+
+ MedicineUses.fromJson(Map json){
+ id = json["medicineId"] ?? 0;
+ name = json["name"] ?? "";
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/notification_item.dart b/medcify/lib/models/notification_item.dart
new file mode 100644
index 0000000..cf2642b
--- /dev/null
+++ b/medcify/lib/models/notification_item.dart
@@ -0,0 +1,15 @@
+import 'package:intl/intl.dart';
+import 'package:medcify/helpers.dart';
+
+class NotificationItem{
+ int? id;
+ String? message;
+ String? date;
+
+ NotificationItem.fromJson(Map json){
+ id = json["id"] ?? 0;
+ message = json["messageDetail"] ?? "";
+ String createdAt = ((json["createdAt"] ?? "") != "") ? DateFormat().format(DateTime.parse(json["createdAt"] ?? "")) : "";
+ date = createdAt;
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/order_detail_item.dart b/medcify/lib/models/order_detail_item.dart
new file mode 100644
index 0000000..ef724e2
--- /dev/null
+++ b/medcify/lib/models/order_detail_item.dart
@@ -0,0 +1,24 @@
+class OrderDetailItem{
+ int? qty;
+ dynamic amount;
+ dynamic discount;
+ dynamic total;
+ OrderMedicineItem? medicine;
+
+ OrderDetailItem.fromJson(Map json){
+ qty = json["quantity"] ?? 0;
+ amount = json["amount"] ?? 0;
+ discount = json["discount"] ?? 0;
+ total = json["total"] ?? 0;
+ medicine = (json["medicine"] != null) ? OrderMedicineItem.fromJson(json["medicine"]) : null;
+ }
+}
+
+class OrderMedicineItem{
+ String? name;
+
+ OrderMedicineItem.fromJson(Map json){
+ name = json["medicineName"] ?? "";
+ }
+}
+
diff --git a/medcify/lib/models/order_item.dart b/medcify/lib/models/order_item.dart
new file mode 100644
index 0000000..03eee1b
--- /dev/null
+++ b/medcify/lib/models/order_item.dart
@@ -0,0 +1,61 @@
+import 'dart:convert';
+
+class OrderItem{
+ int? id;
+ dynamic amount;
+ dynamic discount;
+ dynamic total;
+ dynamic deliveryFee;
+ String? date;
+ OrderUser? user;
+ String? paymentStatus;
+ PrescriptionData? prescription;
+
+ OrderItem.fromJson(Map json){
+ id = json["id"] ?? 0;
+ amount = json["amount"] ?? 0;
+ discount = json["discount"] ?? 0;
+ total = json["total"] ?? 0;
+ deliveryFee = json["deliveryfee"] ?? 0;
+ date = json["createdAt"] ?? "";
+ int status = json["paymentMethod"] ?? "POD";
+ paymentStatus = getPaymentStatus(status);
+ user = (json["user"] != null) ? OrderUser.fromJson(json["user"]) : null;
+ prescription = (json["prescription"] != null) ? PrescriptionData.fromJson(json["prescription"]) : null;
+ }
+
+ String getPaymentStatus(int val){
+ if(val == 1){
+ return "POD";
+ }else if(val == 2){
+ return "UPI";
+ }else{
+ return "Self Pickup";
+ }
+ }
+
+}
+
+class PrescriptionData{
+ String? value;
+
+ PrescriptionData.fromJson(Map json){
+ value = json["prescription"] ?? "";
+ }
+}
+
+class OrderUser{
+ String? name;
+ String? mobile;
+ String? address;
+ String? address1;
+ dynamic pincode;
+
+ OrderUser.fromJson(Map json){
+ name = json["userName"] ?? "";
+ mobile = json["contactNumber"] ?? "---";
+ address = json["address"] ?? "---";
+ address1 = json["address1"] ?? "---";
+ pincode = json["pincode"] ?? "---";
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/pincode_item.dart b/medcify/lib/models/pincode_item.dart
new file mode 100644
index 0000000..f77f8fd
--- /dev/null
+++ b/medcify/lib/models/pincode_item.dart
@@ -0,0 +1,13 @@
+class PincodeItem{
+ int? id;
+ int? pincode;
+ String? deliveryFee;
+ String? freeAbove;
+
+ PincodeItem.fromJson(Map json){
+ id = json["id"] ?? 0;
+ pincode = json["pincode"] ?? 0;
+ deliveryFee = json["deliveryFee"] ?? "";
+ freeAbove = json["free_above"] ?? "";
+ }
+}
diff --git a/medcify/lib/models/plan_item.dart b/medcify/lib/models/plan_item.dart
new file mode 100644
index 0000000..c323910
--- /dev/null
+++ b/medcify/lib/models/plan_item.dart
@@ -0,0 +1,13 @@
+class PlanItem{
+ int? id;
+ String? name;
+ dynamic amount;
+ dynamic validity;
+
+ PlanItem.fromJson(Map json){
+ id = json["id"] ?? "";
+ name = json["name"] ?? "";
+ amount = json["amount"] ?? "";
+ validity = json["validity"] ?? "";
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/models/store_item.dart b/medcify/lib/models/store_item.dart
new file mode 100644
index 0000000..37e3f57
--- /dev/null
+++ b/medcify/lib/models/store_item.dart
@@ -0,0 +1,45 @@
+class StoreItem{
+ int? id;
+ String? storeImage;
+ String? storeDoc;
+ String? storeName;
+ String? ownerName;
+ String? whatsAppNumber;
+ String? address1;
+ String? address2;
+ int? pincode;
+ String? location;
+ String? features;
+ String? disclaimer;
+ bool? storeStatus;
+ bool? pickupEnabled;
+ bool? codEnabled;
+ bool? discountEnabled;
+ bool? prescriptionEnabled;
+ String? returnPolicy;
+ String? upi;
+ String? wideDiscount;
+
+ StoreItem.fromJson(Map json){
+ id = json["id"] ?? 0;
+ storeImage = json["storeImage"] ?? "";
+ storeDoc = json["storeDoc"] ?? "";
+ storeName = json["storeName"] ?? "";
+ ownerName = json["ownerName"] ?? "";
+ whatsAppNumber = json["whatsAppNumber"] ?? "";
+ address1 = json["address1"] ?? "";
+ address2 = json["address2"] ?? "";
+ pincode = json["pincode"] ?? 0;
+ location = json["location"] ?? "";
+ features = json["features"] ?? "";
+ disclaimer = json["disclaimer"] ?? "";
+ storeStatus = (json["storeStatus"] ?? 1) == 1;
+ prescriptionEnabled = (json["enablePrescription"] ?? 1) == 1;
+ pickupEnabled = (json["pickup"] ?? 1) == 1;
+ codEnabled = (json["cashondelivery"] ?? 1) == 1;
+ discountEnabled = (json["wideDiscountType"] ?? 1) == 1;
+ returnPolicy = json["returnPolicy"] ?? "";
+ upi = json["upi"] ?? "";
+ wideDiscount = json["wideDiscount"] ?? "0";
+ }
+}
diff --git a/medcify/lib/models/timing_item.dart b/medcify/lib/models/timing_item.dart
new file mode 100644
index 0000000..f3ac404
--- /dev/null
+++ b/medcify/lib/models/timing_item.dart
@@ -0,0 +1,11 @@
+class TimingItem{
+ String? day;
+ String? openingTime;
+ String? closingTime;
+
+ TimingItem.fromJson(Map json){
+ day = json["dayName"] ?? "";
+ openingTime = json["startTime"] ?? "";
+ closingTime = json["endTime"] ?? "";
+ }
+}
diff --git a/medcify/lib/navigation/fade_transition_route.dart b/medcify/lib/navigation/fade_transition_route.dart
new file mode 100644
index 0000000..0275af5
--- /dev/null
+++ b/medcify/lib/navigation/fade_transition_route.dart
@@ -0,0 +1,29 @@
+import 'package:flutter/material.dart';
+
+class FadeTransitionPageRouteBuilder extends PageRouteBuilder {
+ final Widget page;
+ FadeTransitionPageRouteBuilder({required this.page})
+ : super(
+ pageBuilder: (
+ BuildContext context,
+ Animation animation,
+ Animation secondaryAnimation,
+ ) =>
+ page,
+ opaque:false,
+ barrierColor:null,
+ barrierLabel:null,
+ maintainState:true,
+ transitionDuration: Duration(milliseconds: 100),
+ transitionsBuilder: (
+ BuildContext context,
+ Animation animation,
+ Animation secondaryAnimation,
+ Widget child,
+ ) =>
+ FadeTransition(
+ opacity: animation,
+ child: child,
+ ),
+ );
+}
\ No newline at end of file
diff --git a/medcify/lib/navigation/navigation.dart b/medcify/lib/navigation/navigation.dart
new file mode 100644
index 0000000..1a0fcec
--- /dev/null
+++ b/medcify/lib/navigation/navigation.dart
@@ -0,0 +1,26 @@
+import 'package:flutter/material.dart';
+
+class Navigation {
+ final String initialRoute = "/";
+
+ Navigation._privateConstructor();
+ static final Navigation instance = Navigation._privateConstructor();
+
+ final GlobalKey navigatorKey = GlobalKey();
+
+ Future? navigate(String path,{Object? args}) {
+ return navigatorKey.currentState?.pushNamed(path,arguments: args);
+ }
+
+ Future? navigateAndReplace(String path,{Object? args}) {
+ return navigatorKey.currentState?.pushReplacementNamed(path,arguments: args);
+ }
+
+ Future? navigateAndRemoveUntil(String path, {Object? args}) {
+ return navigatorKey.currentState?.pushNamedAndRemoveUntil(path,(Route route) => false, arguments: args);
+ }
+
+ goBack() {
+ return navigatorKey.currentState?.pop();
+ }
+}
\ No newline at end of file
diff --git a/medcify/lib/navigation/routes.dart b/medcify/lib/navigation/routes.dart
new file mode 100644
index 0000000..c6f364d
--- /dev/null
+++ b/medcify/lib/navigation/routes.dart
@@ -0,0 +1,70 @@
+import 'package:flutter/material.dart';
+import 'package:medcify/models/medicine_item.dart';
+import 'package:medcify/models/order_item.dart';
+import 'package:medcify/models/pincode_item.dart';
+import 'package:medcify/pages/main/changeTiming/change_timing_page.dart';
+import 'package:medcify/pages/main/changeUpiQr/change_upi_qr_page.dart';
+import 'package:medcify/pages/main/deliveryPincodes/addPincode/add_pincode_page.dart';
+import 'package:medcify/pages/main/deliveryPincodes/delivery_pincodes_page.dart';
+import 'package:medcify/pages/main/deliveryPincodes/editPincode/edit_pincode_page.dart';
+import 'package:medcify/pages/main/notification/notification_page.dart';
+import 'package:medcify/pages/main/orders/order_detail_page.dart';
+import 'package:medcify/pages/main/orders/prescription_view_page.dart';
+import 'package:medcify/pages/main/plan/plan_page.dart';
+import 'package:medcify/pages/main/products/addProduct/add_product_page.dart';
+import 'package:medcify/pages/main/products/editProduct/edit_product_page.dart';
+import 'package:medcify/pages/main/settings/return_policy_page.dart';
+import 'package:medcify/pages/main/settings/upi_page.dart';
+import 'package:medcify/pages/main/settings/wide_discount_page.dart';
+import '../components/loading_dialog.dart';
+import '../pages/login/verifyOtp/verify_otp_page.dart';
+import '../pages/login/sendOtp/send_otp_page.dart';
+import '../pages/main/changeProfile/change_profile_page.dart';
+import '../pages/main/main_page.dart';
+import '../pages/main/qrcode/qr_code_page.dart';
+import '../pages/register/register_page.dart';
+import '../pages/splash/splash_page.dart';
+import 'fade_transition_route.dart';
+
+Route generateRoute(RouteSettings settings) {
+ switch (settings.name) {
+ case '/':return FadeTransitionPageRouteBuilder(page: const SplashPage());
+
+ //login pages
+ case '/sendOtp':return FadeTransitionPageRouteBuilder(page: const SendOtpPage());
+ case '/verifyOtp':return FadeTransitionPageRouteBuilder(page: VerifyOtpPage(settings.arguments as String));
+
+ //register pages
+ case '/register':return FadeTransitionPageRouteBuilder(page: RegisterPage());
+
+ //main pages
+ case '/main':return FadeTransitionPageRouteBuilder(page: const MainPage());
+ case '/returnPolicy':return FadeTransitionPageRouteBuilder(page: ReturnPolicyPage(settings.arguments as String));
+ case '/wideDiscount':return FadeTransitionPageRouteBuilder(page: WideDiscountPage(settings.arguments as String));
+ case '/upi':return FadeTransitionPageRouteBuilder(page: UpiPage());
+ case '/plan':return FadeTransitionPageRouteBuilder(page: PlanPage(settings.arguments as bool));
+ case '/changeProfile':return FadeTransitionPageRouteBuilder(page: ChangeProfilePage());
+ case '/changeTiming':return FadeTransitionPageRouteBuilder(page: const ChangeTimingPage());
+ case '/deliveryPincodes':return FadeTransitionPageRouteBuilder(page: const DeliveringPincodesPage());
+ case '/addPincode':return FadeTransitionPageRouteBuilder(page: const AddPincodePage());
+ case '/editPincode':return FadeTransitionPageRouteBuilder(page: EditPincodePage(settings.arguments as PincodeItem));
+ case '/addProduct':return FadeTransitionPageRouteBuilder(page: const AddProductPage());
+ case '/editProduct':return FadeTransitionPageRouteBuilder(page: EditProductPage(settings.arguments as MedicineItem));
+ case '/notification':return FadeTransitionPageRouteBuilder(page: const NotificationPage());
+ case '/orderDetail':return FadeTransitionPageRouteBuilder(page: OrderDetailPage(settings.arguments as OrderItem));
+ case '/qrcode':return FadeTransitionPageRouteBuilder(page: const QrCodePage());
+ case '/upiQr':return FadeTransitionPageRouteBuilder(page: const ChangeUpiQrPage());
+ case '/prescriptionView':return FadeTransitionPageRouteBuilder(page: PrescriptionView(settings.arguments as String));
+ case '/loading':return FadeTransitionPageRouteBuilder(page: const LoadingDialog());
+
+ default:
+ return MaterialPageRoute(builder: (_) {
+ return const Scaffold(
+ body: Center(
+ child: Text('404 Page not found'),
+ ),
+ );
+ }
+ );
+ }
+}
diff --git a/medcify/lib/network/api_provider.dart b/medcify/lib/network/api_provider.dart
new file mode 100644
index 0000000..ca81b20
--- /dev/null
+++ b/medcify/lib/network/api_provider.dart
@@ -0,0 +1,957 @@
+import 'dart:convert';
+import 'dart:io';
+import 'package:medcify/models/api/banner_response.dart';
+import 'package:medcify/models/api/company_response.dart';
+import 'package:medcify/models/api/medicine_response.dart';
+import 'package:medcify/models/api/notification_count_response.dart';
+import 'package:medcify/models/api/notification_response.dart';
+import 'package:medcify/models/api/order_detail_response.dart';
+import 'package:medcify/models/api/order_response.dart';
+import 'package:medcify/models/api/plan_response.dart';
+import 'package:medcify/models/api/qr_code_response.dart';
+import 'package:medcify/models/api/razorpay_response.dart';
+import 'package:medcify/models/api/register_response.dart';
+import 'package:medcify/models/api/store_response.dart';
+import 'package:medcify/models/api/store_url_response.dart';
+import 'package:medcify/models/api/timing_response.dart';
+import 'package:medcify/models/plan_item.dart';
+import 'package:medcify/models/timing_item.dart';
+import 'package:pretty_http_logger/pretty_http_logger.dart';
+import 'package:http/http.dart' as http;
+import 'package:razorpay_flutter/razorpay_flutter.dart';
+import '../models/api/generic_response.dart';
+import '../models/api/login_response.dart';
+import '../models/api/overview_response.dart';
+import '../models/api/pincode_response.dart';
+import '../models/api/upi_qr_response.dart';
+import '../storage/storage.dart';
+
+class ApiProvider {
+ ApiProvider._();
+
+ static final ApiProvider instance = ApiProvider._();
+ String baseUrl = "api.medcify.app";
+ static final HttpWithMiddleware _httpClient =
+ HttpWithMiddleware.build(middlewares: [
+ HttpLogger(logLevel: LogLevel.BODY),
+ ]);
+
+ Future sendOtp(String mobile) async {
+ var data = {
+ "mobile": mobile,
+ };
+ var url = Uri.https(baseUrl, "/getotp");
+ try {
+ http.Response response = await _httpClient.post(url, body: jsonEncode(data), headers: {
+ "Content-Type": "application/json"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return GenericResponse.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse.withError("${response.body}");
+ }
+ }catch (error){
+ return GenericResponse.withError(error.toString());
+ }
+ }
+
+ Future checkStoreExist() async {
+ var data = {
+ "mobile": Storage.instance.mobile,
+ };
+ var url = Uri.https(baseUrl, "/checkStoreExist");
+ try {
+ http.Response response = await _httpClient.post(url, body: jsonEncode(data), headers: {
+ "Content-Type": "application/json"
+ });
+ var decodedResponse = jsonDecode(response.body);
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return decodedResponse["storeStatus"] ?? false;
+ }else{
+ return decodedResponse["storeStatus"] ?? false;
+ }
+ }catch (error){
+ return false;
+ }
+ }
+
+ Future verifyOtp(String mobile, String otp) async {
+ Codec stringToBase64 = utf8.fuse(base64Url);
+ var data = {
+ "mobile": stringToBase64.encode(mobile),
+ "otp": stringToBase64.encode(otp),
+ };
+ var url = Uri.https(baseUrl, "/verifyOtp");
+ try {
+ http.Response response = await _httpClient.post(url, body: jsonEncode(data), headers: {
+ "Content-Type": "application/json"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return LoginResponse.fromJson(jsonDecode(response.body));
+ }else{
+ return LoginResponse.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return LoginResponse.withError(error.toString());
+ }
+ }
+
+ Future> fetchHomeData() async {
+ var cases = [
+ "banner",
+ "ordersCount/${Storage.instance.id}",
+ "salesTotal/${Storage.instance.id}",
+ "storeVisitorsCount/${Storage.instance.id}",
+ "storeUrl/${Storage.instance.id}",
+ "notificationCount/${Storage.instance.id}"
+ ];
+ getUrl(String item){
+ return Uri.https(baseUrl,"/$item");
+ }
+ var responses = await Future.wait([
+ for(String item in cases)_httpClient.get(getUrl(item),headers: {
+ "Authorization": "Bearer ${Storage.instance.token}"
+ }),
+ ]);
+ return [
+ BannerResponse.fromJson(jsonDecode(responses[0].body)),
+ OverviewResponse.fromJson(jsonDecode(responses[1].body)),
+ OverviewResponse.fromJson(jsonDecode(responses[2].body)),
+ OverviewResponse.fromJson(jsonDecode(responses[3].body)),
+ StoreUrlResponse.fromJson(jsonDecode(responses[4].body)),
+ NotificationCountResponse.fromJson(jsonDecode(responses[5].body)),
+ ];
+ }
+
+ Future addStore(String storeImage, String storeName,String ownerName, String whatsAppNumber, String address1, String address2, String pincode, String location, String openingTime, String closingTime, String features, String disclaimer, String storedocument, String storeType) async{
+ var url = Uri.https(baseUrl,"/addStore/${Storage.instance.id}");
+ print(url);
+ http.MultipartRequest request = http.MultipartRequest("PUT", url);
+ request.headers.addAll({"Authorization": "Bearer ${Storage.instance.token}"});
+ if(storeImage.isNotEmpty){
+ http.MultipartFile multipartFile = await http.MultipartFile.fromPath('storeImage', storeImage);
+ request.files.add(multipartFile);
+ }
+ if(storedocument.isNotEmpty){
+ http.MultipartFile multipartFile = await http.MultipartFile.fromPath('storeDoc', storedocument);
+ request.files.add(multipartFile);
+ }
+ request.fields.addAll({
+ "storeName": storeName,
+ "ownerName": ownerName,
+ "contactNumber": Storage.instance.mobile,
+ "whatsAppNumber": whatsAppNumber,
+ "address1": address1,
+ "address2": address2,
+ "pincode": pincode,
+ "location": location,
+ "openingTime": openingTime,
+ "closingTime": closingTime,
+ "features": features,
+ "disclaimer": disclaimer,
+ "storeType": storeType,
+ "deviceId": Storage.instance.deviceInfo.androidId ?? "",
+ "isComingFromPostman": "true"
+ });
+ print(request.fields);
+ http.StreamedResponse response = await request.send();
+ final respStr = await response.stream.bytesToString();
+ print(respStr);
+ try {
+ if(response.statusCode == 200 || response.statusCode == 201){
+ return RegisterResponse.fromJson(jsonDecode(respStr));
+ }else{
+ return RegisterResponse.withError("Something went wrong");
+ }
+ }catch (error){
+ return RegisterResponse.withError(error.toString());
+ }
+ }
+
+ Future updateStoreImage(String storeImage,) async{
+ var url = Uri.https(baseUrl,"/updateStoreBanner/${Storage.instance.id}");
+ print(url);
+ http.MultipartRequest request = http.MultipartRequest("PUT", url);
+ request.headers.addAll({"Authorization": "Bearer ${Storage.instance.token}"});
+ if(storeImage.isNotEmpty){
+ http.MultipartFile multipartFile = await http.MultipartFile.fromPath('storeImagenew', storeImage);
+ request.files.add(multipartFile);
+ }
+ http.StreamedResponse response = await request.send();
+ final respStr = await response.stream.bytesToString();
+ print(respStr);
+ try {
+ if(response.statusCode == 200 || response.statusCode == 201){
+ return GenericResponse2.fromJson(jsonDecode(respStr));
+ }else{
+ return GenericResponse2.withError("Something went wrong");
+ }
+ }catch (error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future updateDocumentImage(String storeImage,) async{
+ var url = Uri.https(baseUrl,"/updateStoreDocument/${Storage.instance.id}");
+ print(url);
+ http.MultipartRequest request = http.MultipartRequest("PUT", url);
+ request.headers.addAll({"Authorization": "Bearer ${Storage.instance.token}"});
+ if(storeImage.isNotEmpty){
+ http.MultipartFile multipartFile = await http.MultipartFile.fromPath('storeDocnew', storeImage);
+ request.files.add(multipartFile);
+ }
+ http.StreamedResponse response = await request.send();
+ final respStr = await response.stream.bytesToString();
+ print(respStr);
+ try {
+ if(response.statusCode == 200 || response.statusCode == 201){
+ return GenericResponse2.fromJson(jsonDecode(respStr));
+ }else{
+ return GenericResponse2.withError("Something went wrong");
+ }
+ }catch (error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future updateUpiQrImage(String image,) async{
+ var url = Uri.https(baseUrl,"/updateUPIQr/${Storage.instance.id}");
+ print(url);
+ http.MultipartRequest request = http.MultipartRequest("PUT", url);
+ request.headers.addAll({"Authorization": "Bearer ${Storage.instance.token}"});
+ if(image.isNotEmpty){
+ http.MultipartFile multipartFile = await http.MultipartFile.fromPath('UPIImage', image);
+ request.files.add(multipartFile);
+ }
+ http.StreamedResponse response = await request.send();
+ final respStr = await response.stream.bytesToString();
+ print(respStr);
+ try {
+ if(response.statusCode == 200 || response.statusCode == 201){
+ return GenericResponse2.fromJson(jsonDecode(respStr));
+ }else{
+ return GenericResponse2.withError("Something went wrong");
+ }
+ }catch (error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future updateStore(String storeName,String ownerName, String whatsAppNumber, String address1, String address2, String pincode, String location, String features, String disclaimer, String storeType) async{
+ var url = Uri.https(baseUrl,"/updateStore/${Storage.instance.id}");
+ var data = {
+ "storeName": storeName,
+ "ownerName": ownerName,
+ "contactNumber": Storage.instance.mobile,
+ "whatsAppNumber": whatsAppNumber,
+ "address1": address1,
+ "address2": address2,
+ "pincode": pincode,
+ "location": location,
+ "features": features,
+ "disclaimer": disclaimer,
+ "storeType": storeType,
+ };
+ try {
+ http.Response response = await _httpClient.put(url, body: jsonEncode(data),headers: {
+ "Content-Type": "application/json",
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future fetchOrders(String value) async {
+ var url = Uri.https(baseUrl, "/$value/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.get(url, headers: {
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return OrderResponse.fromJson(jsonDecode(response.body));
+ }else{
+ return OrderResponse.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return OrderResponse.withError(error.toString());
+ }
+ }
+
+
+ Future fetchMyStore() async {
+ var url = Uri.https(baseUrl, "/viewStore/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.get(url, headers: {
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200){
+ return StoreResponse.fromJson(jsonDecode(response.body));
+ }else{
+ return StoreResponse.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return StoreResponse.withError(error.toString());
+ }
+ }
+
+ Future updateStoreStatus(String storeStatus) async {
+ var data = {
+ "storeStatus": storeStatus
+ };
+ var url = Uri.https(baseUrl, "/updateStoreStatus/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.put(url, body: jsonEncode(data),headers: {
+ "Content-Type": "application/json",
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future updatePickup(String val) async {
+ var data = {
+ "pickup": val
+ };
+ var url = Uri.https(baseUrl, "/updatePickup/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.put(url, body: jsonEncode(data),headers: {
+ "Content-Type": "application/json",
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future updateCod(String val) async {
+ var data = {
+ "cashondelivery": val
+ };
+ var url = Uri.https(baseUrl, "/updateCashondelivery/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.put(url, body: jsonEncode(data),headers: {
+ "Content-Type": "application/json",
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future updateDiscount(String val) async {
+ var data = {
+ "wideDiscountType": val
+ };
+ var url = Uri.https(baseUrl, "/updateWideDiscountStatus/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.put(url, body: jsonEncode(data),headers: {
+ "Content-Type": "application/json",
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future updatePrescription(String val) async {
+ var data = {
+ "enablePrescription": val
+ };
+ var url = Uri.https(baseUrl, "/updatePrescriptionED/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.put(url, body: jsonEncode(data),headers: {
+ "Content-Type": "application/json",
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future updateReturnPolicy(String val) async {
+ var data = {
+ "returnPolicy": val
+ };
+ var url = Uri.https(baseUrl, "/updateReturnPolicy/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.put(url, body: jsonEncode(data),headers: {
+ "Content-Type": "application/json",
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future updateWideDiscount(String val) async {
+ var data = {
+ "wideDiscount": val
+ };
+ var url = Uri.https(baseUrl, "/updateWideDiscount/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.put(url, body: jsonEncode(data),headers: {
+ "Content-Type": "application/json",
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future updateUpi(String val) async {
+ var data = {
+ "upi": val
+ };
+ var url = Uri.https(baseUrl, "/updateUPI/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.put(url, body: jsonEncode(data),headers: {
+ "Content-Type": "application/json",
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future fetchMedicines() async {
+ var url = Uri.https(baseUrl, "/medicinesList/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.get(url,headers: {
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return MedicineResponse.fromJson(jsonDecode(response.body));
+ }else{
+ return MedicineResponse.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return MedicineResponse.withError(error.toString());
+ }
+ }
+
+ Future addMedicine(String image, String name, String companyId, String amount, String quantity, String discount, String howWorks, String directionOfUse, String prescription, List medicinesideeffects, List medicineuses) async{
+ var url = Uri.https(baseUrl,"/addMedicines");
+ print(url);
+ http.MultipartRequest request = http.MultipartRequest("POST", url);
+ request.headers.addAll({"Authorization": "Bearer ${Storage.instance.token}"});
+ if(image.isNotEmpty){
+ http.MultipartFile multipartFile = await http.MultipartFile.fromPath('imageps', image);
+ request.files.add(multipartFile);
+ }
+ request.fields.addAll({
+ "name": name,
+ "companyId": companyId,
+ "amount": amount,
+ "quantity": quantity,
+ "discount": discount,
+ "storeId": "${Storage.instance.id}",
+ "howWorks": howWorks,
+ "directionOfUse": directionOfUse,
+ "prescription": prescription,
+ });
+ Map sideEffectsArray = {
+ for(var i = 0; i < medicinesideeffects.length; i++) "medicinesideeffects[$i][name]": medicinesideeffects[i]
+ };
+ request.fields.addAll(sideEffectsArray);
+ Map sideEffectsStatusArray = {
+ for(var i = 0; i < medicinesideeffects.length; i++) "medicinesideeffects[$i][status]": "1"
+ };
+ request.fields.addAll(sideEffectsStatusArray);
+ Map usesArray = {
+ for(var i = 0; i < medicineuses.length; i++) "medicineuses[$i][name]": medicineuses[i]
+ };
+ request.fields.addAll(usesArray);
+ Map usesStatusArray = {
+ for(var i = 0; i < medicineuses.length; i++) "medicineuses[$i][status]": "1"
+ };
+ request.fields.addAll(usesStatusArray);
+ print(request.fields);
+ http.StreamedResponse response = await request.send();
+ final respStr = await response.stream.bytesToString();
+ print(respStr);
+ try {
+ if(response.statusCode == 200 || response.statusCode == 201){
+ return GenericResponse2.fromJson(jsonDecode(respStr));
+ }else{
+ return GenericResponse2.withError("Something went wrong");
+ }
+ }catch (error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future updateMedicine(String id,String image, String name, String companyId, String amount, String quantity, String discount, String howWorks, String directionOfUse, String prescription, List medicinesideeffects, List medicineuses) async{
+ var url = Uri.https(baseUrl,"/updateMedicine/$id");
+ print(url);
+ http.MultipartRequest request = http.MultipartRequest("PUT", url);
+ request.headers.addAll({"Authorization": "Bearer ${Storage.instance.token}"});
+ if(image.isNotEmpty){
+ http.MultipartFile multipartFile = await http.MultipartFile.fromPath('imagepa', image);
+ request.files.add(multipartFile);
+ }
+ request.fields.addAll({
+ "name": name,
+ "companyId": companyId,
+ "amount": amount,
+ "quantity": quantity,
+ "discount": discount,
+ "howWorks": howWorks,
+ "directionOfUse": directionOfUse,
+ "prescription": prescription,
+ "status": "1",
+ "createdBy": "1"
+ });
+ Map sideEffectsArray = {
+ for(var i = 0; i < medicinesideeffects.length; i++) "medicinesideeffects[$i][name]": medicinesideeffects[i]
+ };
+ request.fields.addAll(sideEffectsArray);
+ Map sideEffectsStatusArray = {
+ for(var i = 0; i < medicinesideeffects.length; i++) "medicinesideeffects[$i][status]": "1"
+ };
+ request.fields.addAll(sideEffectsStatusArray);
+ Map sideEffectsIdArray = {
+ for(var i = 0; i < medicinesideeffects.length; i++) "medicinesideeffects[$i][medicineId]": id
+ };
+ request.fields.addAll(sideEffectsIdArray);
+ Map usesArray = {
+ for(var i = 0; i < medicineuses.length; i++) "medicineuses[$i][name]": medicineuses[i]
+ };
+ request.fields.addAll(usesArray);
+ Map usesStatusArray = {
+ for(var i = 0; i < medicineuses.length; i++) "medicineuses[$i][status]": "1"
+ };
+ request.fields.addAll(usesStatusArray);
+
+ Map usesIdArray = {
+ for(var i = 0; i < medicinesideeffects.length; i++) "medicineuses[$i][medicineId]": id
+ };
+ request.fields.addAll(usesIdArray);
+ print(request.fields);
+ http.StreamedResponse response = await request.send();
+ final respStr = await response.stream.bytesToString();
+ print(respStr);
+ try {
+ if(response.statusCode == 200 || response.statusCode == 201){
+ return GenericResponse2.fromJson(jsonDecode(respStr));
+ }else{
+ return GenericResponse2.withError("Something went wrong");
+ }
+ }catch (error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future deleteMedicine(String id) async {
+ var url = Uri.https(baseUrl, "/deleteMedicine/$id");
+ try {
+ http.Response response = await _httpClient.put(url,headers: {
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future fetchPlan() async {
+ var url = Uri.https(baseUrl, "/currentPlan/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.get(url,headers: {
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode == 201){
+ return PlanResponse.fromJson(jsonDecode(response.body));
+ }else{
+ return PlanResponse.withError("${response.body}");
+ }
+ }catch(error){
+ return PlanResponse.withError(error.toString());
+ }
+ }
+
+ Future fetchTimings() async {
+ var url = Uri.https(baseUrl, "/getStoreTime/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.get(url,headers: {
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode == 201){
+ return TimingResponse.fromJson(jsonDecode(response.body));
+ }else{
+ return TimingResponse.withError("${response.body}");
+ }
+ }catch(error){
+ return TimingResponse.withError(error.toString());
+ }
+ }
+
+ Future updateTimings(List timings) async {
+ var data = {
+ "myData": timings.map((e) => {
+ "dayName": e.day,
+ "startTime": e.openingTime,
+ "endTime": e.closingTime,
+ "storeId":"${Storage.instance.id}",
+ "status":"1"
+ }).toList()
+ };
+ var url = Uri.https(baseUrl, "/changeTime/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.put(url,body: jsonEncode(data),headers: {
+ "Content-Type": "application/json",
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode == 201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.withError("${response.body}");
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future fetchPincodes() async {
+ var url = Uri.https(baseUrl, "/DeliveryPincode/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.get(url,headers: {
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode == 201){
+ return PincodeResponse.fromJson(jsonDecode(response.body));
+ }else{
+ return PincodeResponse.withError("${response.body}");
+ }
+ }catch(error){
+ return PincodeResponse.withError(error.toString());
+ }
+ }
+
+ Future addPincode(String pincode, String deliveryFee, String freeAbove) async {
+ var data = {
+ "storeId": "${Storage.instance.id}",
+ "pincode": pincode,
+ "deliveryFee": deliveryFee,
+ "free_above": freeAbove
+ };
+ var url = Uri.https(baseUrl, "/addDeliveryPincode");
+ try {
+ http.Response response = await _httpClient.post(url,body: jsonEncode(data),headers: {
+ "Content-Type": "application/json",
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future updatePincode(String id, String pincode, String deliveryFee, String freeAbove) async {
+ var data = {
+ "pincode": pincode,
+ "deliveryFee": deliveryFee,
+ "free_above": freeAbove
+ };
+ var url = Uri.https(baseUrl, "/updateDeliveryPincode/$id");
+ try {
+ http.Response response = await _httpClient.put(url,body: jsonEncode(data),headers: {
+ "Content-Type": "application/json",
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future deletePincode(String id) async {
+ var url = Uri.https(baseUrl, "/deleteDeliveryPincode/$id");
+ try {
+ http.Response response = await _httpClient.put(url,headers: {
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future fetchCompanies() async {
+ var url = Uri.https(baseUrl, "/companies");
+ try {
+ http.Response response = await _httpClient.get(url,headers: {
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return CompanyResponse.fromJson(jsonDecode(response.body));
+ }else{
+ return CompanyResponse.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return CompanyResponse.withError(error.toString());
+ }
+ }
+
+ Future fetchNotifications() async {
+ var url = Uri.https(baseUrl, "/getOrderNotification/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.get(url,headers: {
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return NotificationResponse.fromJson(jsonDecode(response.body));
+ }else{
+ return NotificationResponse.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return NotificationResponse.withError(error.toString());
+ }
+ }
+
+ Future cancelOrder(String id) async {
+ var url = Uri.https(baseUrl, "/cancelOrderButton/$id");
+ try {
+ http.Response response = await _httpClient.put(url,headers: {
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future acceptOrder(String id) async {
+ var url = Uri.https(baseUrl, "/orderButtonUpdate/$id");
+ try {
+ http.Response response = await _httpClient.put(url,headers: {
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future fetchOrderDertail(String id) async {
+ var url = Uri.https(baseUrl, "/medicineOrderDetail/$id");
+ try {
+ http.Response response = await _httpClient.get(url,headers: {
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return OrderDetailResponse.fromJson(jsonDecode(response.body));
+ }else{
+ return OrderDetailResponse.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return OrderDetailResponse.withError(error.toString());
+ }
+ }
+
+ Future fetchQrCode() async {
+ var url = Uri.https(baseUrl, "/getQrCode/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.get(url,headers: {
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return QrCodeResponse.fromJson(jsonDecode(response.body));
+ }else{
+ return QrCodeResponse.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return QrCodeResponse.withError(error.toString());
+ }
+ }
+
+ Future fetchUpiQrImage() async {
+ var url = Uri.https(baseUrl, "/getUPIQRImage/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.get(url,headers: {
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return UpiQrResponse.fromJson(jsonDecode(response.body));
+ }else{
+ return UpiQrResponse.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return UpiQrResponse.withError(error.toString());
+ }
+ }
+
+ Future removeNotification(String id) async {
+ var url = Uri.https(baseUrl, "/removeNotification/$id");
+ try {
+ http.Response response = await _httpClient.put(url,headers: {
+ "Authorization": "Bearer ${Storage.instance.token}",
+ });
+ if(response.statusCode == 200 || response.statusCode == 201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future updateOrderAmount(String id, String amount, String discount) async {
+ var data = {
+ "amount": amount,
+ "discount": discount,
+ };
+ var url = Uri.https(baseUrl, "/updatePrescriptionOrder/$id");
+ try {
+ http.Response response = await _httpClient.put(url,body: jsonEncode(data),headers: {
+ "Content-Type": "application/json",
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future addSubscription(PlanItem plan, PaymentSuccessResponse successData) async {
+ var data = {
+ "planId": "${plan.id ?? 0}",
+ "amount": plan.amount,
+ "validity": plan.validity,
+ "paymentType": "1",
+ "razorpayOrderId": successData.orderId,
+ "razorpaySignature": successData.signature,
+ "razorpayPaymentId": successData.paymentId,
+ "status": "1",
+ "createdBy": "1",
+ "storeId": "${Storage.instance.id}",
+ };
+ var url = Uri.https(baseUrl, "/addSubscription");
+ try {
+ http.Response response = await _httpClient.post(url,body: jsonEncode(data),headers: {
+ "Content-Type": "application/json",
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future updateFcm(String token) async {
+ var data = {
+ "fcmToken": token,
+ };
+ var url = Uri.https(baseUrl, "/updateFCMToken/${Storage.instance.id}");
+ try {
+ http.Response response = await _httpClient.put(url,body: jsonEncode(data),headers: {
+ "Content-Type": "application/json",
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }else{
+ return GenericResponse2.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return GenericResponse2.withError(error.toString());
+ }
+ }
+
+ Future fetchRazorPayData() async {
+ var url = Uri.https(baseUrl, "/settings");
+ try {
+ http.Response response = await _httpClient.get(url,headers: {
+ "Content-Type": "application/json",
+ "Authorization": "Bearer ${Storage.instance.token}"
+ });
+ if(response.statusCode == 200 || response.statusCode ==201){
+ return RazorPayResponse.fromJson(jsonDecode(response.body));
+ }else{
+ return RazorPayResponse.fromJson(jsonDecode(response.body));
+ }
+ }catch(error){
+ return RazorPayResponse.withError(error.toString());
+ }
+ }
+
+}
diff --git a/medcify/lib/pages/login/sendOtp/send_otp_bloc.dart b/medcify/lib/pages/login/sendOtp/send_otp_bloc.dart
new file mode 100644
index 0000000..382f927
--- /dev/null
+++ b/medcify/lib/pages/login/sendOtp/send_otp_bloc.dart
@@ -0,0 +1,63 @@
+import 'dart:async';
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:fluttertoast/fluttertoast.dart';
+import 'package:medcify/helpers.dart';
+import '../../../components/alert.dart';
+import '../../../constants.dart';
+import '../../../navigation/navigation.dart';
+import '../../../network/api_provider.dart';
+
+abstract class SendOtpState{}
+
+class SendOtpInitial extends SendOtpState{}
+class SendOtpChangeDialCode extends SendOtpState{}
+
+class SendOtpCubit extends Cubit{
+ SendOtpCubit() : super(SendOtpInitial());
+ TextEditingController mobileController = TextEditingController();
+
+ Future sendOtp() async{
+ if(mobileController.text.isEmpty){
+ showToast("Enter phone number");
+ }else{
+ var isNetworkConnection = await Helpers.isNetwork();
+ if(isNetworkConnection){
+ Navigation.instance.navigate("/loading");
+ final response = await ApiProvider.instance.sendOtp(mobileController.text);
+ Navigation.instance.goBack();
+ if(response.status ?? false){
+ Navigation.instance.navigate("/verifyOtp",args: mobileController.text);
+ }else{
+ showAlert(response.message ?? "Something went wrong");
+ }
+ }else{
+ showAlert(Constants.noInternet);
+ }
+ }
+ }
+
+ void showAlert(String err){
+ AlertX.instance.showAlert(
+ title: "Error",
+ msg: err,
+ positiveButtonText: "Done",
+ positiveButtonPressed: (){
+ Navigation.instance.goBack();
+ }
+ );
+ }
+
+ void showToast(String msg) {
+ Fluttertoast.showToast(
+ msg: msg,
+ toastLength: Toast.LENGTH_SHORT,
+ gravity: ToastGravity.BOTTOM,
+ timeInSecForIosWeb: 1,
+ backgroundColor: Colors.grey.shade200,
+ textColor: Colors.black,
+ fontSize: 14.0
+ );
+ }
+
+}
\ No newline at end of file
diff --git a/medcify/lib/pages/login/sendOtp/send_otp_page.dart b/medcify/lib/pages/login/sendOtp/send_otp_page.dart
new file mode 100644
index 0000000..4d5f75a
--- /dev/null
+++ b/medcify/lib/pages/login/sendOtp/send_otp_page.dart
@@ -0,0 +1,94 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:medcify/pages/login/sendOtp/send_otp_bloc.dart';
+import '../../../components/button.dart';
+import '../../../components/custom_textfield.dart';
+import '../../../constants.dart';
+
+class SendOtpPage extends StatelessWidget {
+ const SendOtpPage({Key? key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: Colors.white,
+ body: SafeArea(
+ child: GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: (){
+ FocusManager.instance.primaryFocus?.unfocus();
+ },
+ child: BlocProvider(
+ create: (context) => SendOtpCubit(),
+ child: SendOtpWidget(),
+ ),
+ ),
+ ),
+ );
+ }
+}
+
+class SendOtpWidget extends StatelessWidget{
+ late SendOtpCubit sendOtpCubit;
+
+ @override
+ Widget build(BuildContext context) {
+ sendOtpCubit = BlocProvider.of(context);
+ return Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 20,vertical: 40),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Center(
+ child: Image.asset(
+ 'assets/images/logo.png',
+ width: 150,
+ height: 150,
+ fit: BoxFit.contain,
+ ),
+ ),
+ const SizedBox(height: 36,),
+ const Text('Login', style: TextStyle(fontSize: 20,fontWeight: FontWeight.w500),),
+ const SizedBox(height: 4,),
+ const Text('Enter your mobile number to get started', style: TextStyle(fontSize: 12,height: 1.6,color: Constants.secondaryTextColor),),
+ const SizedBox(height: 20,),
+ Row(
+ children: [
+ Container(
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(4),
+ color: Colors.grey.shade100
+ ),
+ padding: const EdgeInsets.all(16),
+ child: const Text("+91",style: TextStyle(fontWeight: FontWeight.w500,fontSize: 15),)
+ ),
+ const SizedBox(width: 8),
+ Expanded(
+ child: CustomTextField(
+ hint: "Enter mobile number",
+ controller: sendOtpCubit.mobileController,
+ keyboardType: TextInputType.phone,
+ inputFormatters: [
+ FilteringTextInputFormatter.digitsOnly
+ ],
+ ),
+ ),
+ ],
+ ),
+ Padding(
+ padding: const EdgeInsets.only(top: 24),
+ child: Button(
+ text: "Send Otp",
+ onPressed: (){
+ FocusManager.instance.primaryFocus?.unfocus();
+ sendOtpCubit.sendOtp();
+ },
+ )
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/medcify/lib/pages/login/verifyOtp/verify_otp_bloc.dart b/medcify/lib/pages/login/verifyOtp/verify_otp_bloc.dart
new file mode 100644
index 0000000..fb3a5a5
--- /dev/null
+++ b/medcify/lib/pages/login/verifyOtp/verify_otp_bloc.dart
@@ -0,0 +1,111 @@
+import 'dart:async';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:otp_autofill/otp_autofill.dart';
+import '../../../components/alert.dart';
+import '../../../constants.dart';
+import '../../../helpers.dart';
+import '../../../navigation/navigation.dart';
+import '../../../network/api_provider.dart';
+import '../../../storage/storage.dart';
+
+abstract class VerifyOtpState{}
+
+class VerifyOtpInitial extends VerifyOtpState{}
+class VerifyOtpChangeResend extends VerifyOtpState{}
+
+class VerifyOtpCubit extends Cubit{
+ VerifyOtpCubit() : super(VerifyOtpInitial());
+ late OTPTextEditController otpController;
+ late OTPInteractor otpInteractor;
+ int time = 30;
+ bool isResend = false;
+ Timer? timer;
+
+ Future listenOtp() async{
+ otpInteractor = OTPInteractor();
+ otpInteractor.getAppSignature().then((value) => print('signature - $value'));
+ otpController = OTPTextEditController(
+ codeLength: 6,
+ onCodeReceive: (code) => print('Your Application receive code - $code'),
+ )..startListenUserConsent((code) {
+ final exp = RegExp(r'(\d{6})');
+ return exp.stringMatch(code ?? '') ?? '';
+ },
+ strategies: [
+
+ ],
+ );
+ }
+
+ Future unregisterListener() async{
+ timer?.cancel();
+ await otpController.stopListen();
+ }
+
+ void startTimer() {
+ isResend = false;
+ time = 30;
+ emit(VerifyOtpChangeResend());
+ timer = Timer.periodic(const Duration(seconds: 1), (timer) {
+ if (time <= 0) {
+ timer.cancel();
+ isResend = true;
+ emit(VerifyOtpChangeResend());
+ } else {
+ time = 30 - timer.tick;
+ emit(VerifyOtpChangeResend());
+ }
+ });
+ }
+
+ Future verifyOtp(String mobile) async{
+ var isNetworkConnection = await Helpers.isNetwork();
+ if(isNetworkConnection){
+ Navigation.instance.navigate("/loading");
+ final response = await ApiProvider.instance.verifyOtp(mobile, otpController.text);
+ Navigation.instance.goBack();
+ if(response.status ?? false){
+ await Storage.instance.setIsLoggedIn(true);
+ await Storage.instance.setMobile(mobile);
+ await Storage.instance.setStoreId(response.storeId ?? 0);
+ if(response.storeStatus ?? false){
+ Navigation.instance.navigateAndRemoveUntil("/main");
+ }else{
+ Navigation.instance.navigateAndRemoveUntil("/register");
+ }
+ }else{
+ showAlert(response.message ?? "Something went wrong");
+ }
+ }else{
+ showAlert(Constants.noInternet);
+ }
+ }
+
+ Future resendOtp(String mobile) async{
+ var isNetworkConnection = await Helpers.isNetwork();
+ if(isNetworkConnection){
+ Navigation.instance.navigate("/loading");
+ final response = await ApiProvider.instance.sendOtp(mobile);
+ Navigation.instance.goBack();
+ if(response.status ?? false){
+ startTimer();
+ }else{
+ showAlert(response.message ?? "Something went wrong");
+ }
+ }else{
+ showAlert(Constants.noInternet);
+ }
+ }
+
+ void showAlert(String msg){
+ AlertX.instance.showAlert(
+ title: "Error",
+ msg: msg,
+ positiveButtonText: "Done",
+ positiveButtonPressed: (){
+ Navigation.instance.goBack();
+ }
+ );
+ }
+
+}
\ No newline at end of file
diff --git a/medcify/lib/pages/login/verifyOtp/verify_otp_page.dart b/medcify/lib/pages/login/verifyOtp/verify_otp_page.dart
new file mode 100644
index 0000000..2c22b1c
--- /dev/null
+++ b/medcify/lib/pages/login/verifyOtp/verify_otp_page.dart
@@ -0,0 +1,146 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:medcify/pages/login/verifyOtp/verify_otp_bloc.dart';
+import 'package:pin_code_fields/pin_code_fields.dart';
+import '../../../components/button.dart';
+import '../../../constants.dart';
+import '../../../navigation/navigation.dart';
+
+class VerifyOtpPage extends StatelessWidget {
+ String mobile;
+ VerifyOtpPage(this.mobile);
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: Colors.white,
+ appBar: AppBar(
+ elevation: 0.25,
+ title: const Text("",style: TextStyle(color: Colors.black,fontSize: 17),),
+ backgroundColor: Colors.white,
+ automaticallyImplyLeading: false,
+ leading: IconButton(
+ onPressed: (){
+ Navigation.instance.goBack();
+ },
+ icon: const Icon(Icons.keyboard_backspace_rounded,color: Colors.black,),
+ ),
+ ),
+ body: SafeArea(
+ child: GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: (){
+ FocusManager.instance.primaryFocus?.unfocus();
+ },
+ child: BlocProvider(
+ create: (context) => VerifyOtpCubit(),
+ child: VerifyOtpWidget(mobile),
+ ),
+ ),
+ )
+ );
+ }
+}
+
+class VerifyOtpWidget extends StatefulWidget {
+ String mobile;
+ VerifyOtpWidget(this.mobile);
+
+ @override
+ State createState() => _VerifyOtpWidgetState();
+}
+
+class _VerifyOtpWidgetState extends State {
+ late VerifyOtpCubit verifyOtpCubit;
+
+ Widget otpField(){
+ return PinCodeTextField(
+ keyboardType: TextInputType.phone,
+ onChanged: (val) {},
+ controller: verifyOtpCubit.otpController,
+ length: 6,
+ autoFocus: true,
+ textStyle: const TextStyle(fontSize: 20, color: Colors.black),
+ enablePinAutofill: true,
+ enabled: true,
+ enableActiveFill: true,
+ pinTheme: PinTheme(
+ borderRadius: BorderRadius.circular(2),
+ selectedColor: Colors.grey.shade200,
+ selectedFillColor: Colors.grey.shade200,
+ activeColor: Colors.grey.shade200,
+ activeFillColor: Colors.grey.shade200,
+ inactiveColor: Colors.grey.shade200,
+ inactiveFillColor: Colors.grey.shade200,
+ fieldHeight: 45,
+ fieldWidth: 45
+ ),
+ inputFormatters: [
+ FilteringTextInputFormatter.digitsOnly
+ ],
+ appContext: context,
+ onCompleted: (_) async{
+ FocusManager.instance.primaryFocus?.unfocus();
+ verifyOtpCubit.verifyOtp(widget.mobile);
+ },
+ );
+ }
+
+ @override
+ void initState() {
+ verifyOtpCubit = BlocProvider.of(context);
+ verifyOtpCubit.listenOtp();
+ verifyOtpCubit.startTimer();
+ super.initState();
+ }
+
+ @override
+ void dispose() {
+ verifyOtpCubit.unregisterListener();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 20.0,vertical: 20),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Text('Verify OTP', style: TextStyle(fontSize: 18,),),
+ const SizedBox(height: 4,),
+ Text('Enter otp sent to +91 ${widget.mobile}', style: const TextStyle(fontSize: 13,color: Constants.secondaryTextColor,),),
+ const SizedBox(height: 20,),
+ otpField(),
+ Align(
+ alignment: Alignment.bottomRight,
+ child: TextButton(
+ onPressed: () {
+ if(verifyOtpCubit.isResend)verifyOtpCubit.resendOtp(widget.mobile);
+ },
+ child: BlocBuilder(
+ buildWhen: (previous, current) {
+ return current is VerifyOtpChangeResend;
+ },
+ builder: (context, state) {
+ return Text((verifyOtpCubit.isResend) ? "Resend Otp" : '00:${(verifyOtpCubit.time.toString().characters.length == 1) ? "0${verifyOtpCubit.time}" : verifyOtpCubit.time}', style: const TextStyle(fontSize: 14, color: Colors.blue),);
+ }
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsets.only(top: 20,bottom: 8),
+ child: Button(
+ text: "Submit",
+ onPressed: (){
+ FocusManager.instance.primaryFocus?.unfocus();
+ verifyOtpCubit.verifyOtp(widget.mobile);
+ },
+ )
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/medcify/lib/pages/main/changeProfile/change_profile_bloc.dart b/medcify/lib/pages/main/changeProfile/change_profile_bloc.dart
new file mode 100644
index 0000000..c696988
--- /dev/null
+++ b/medcify/lib/pages/main/changeProfile/change_profile_bloc.dart
@@ -0,0 +1,137 @@
+
+import 'dart:io';
+
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:fluttertoast/fluttertoast.dart';
+import 'package:image_picker/image_picker.dart';
+import 'package:intl/intl.dart';
+import 'package:medcify/models/store_item.dart';
+
+import '../../../components/alert.dart';
+import '../../../constants.dart';
+import '../../../helpers.dart';
+import '../../../navigation/navigation.dart';
+import '../../../network/api_provider.dart';
+
+abstract class ChangeProfileState{}
+
+class ChangeProfileInitial extends ChangeProfileState{}
+class ChangeProfileLoading extends ChangeProfileState{}
+class ChangeProfileSuccess extends ChangeProfileState{}
+class ChangeProfileFailure extends ChangeProfileState{
+ String error;
+ ChangeProfileFailure(this.error);
+}
+class ChangeProfileChangeType extends ChangeProfileState{}
+
+class ChangeProfileCubit extends Cubit {
+ ChangeProfileCubit() : super(ChangeProfileInitial());
+ TextEditingController storeNameController = TextEditingController();
+ TextEditingController ownerNameController = TextEditingController();
+ TextEditingController whatsappNumberController = TextEditingController();
+ TextEditingController address1Controller = TextEditingController();
+ TextEditingController address2Controller = TextEditingController();
+ TextEditingController pinCodeController = TextEditingController();
+ TextEditingController locationController = TextEditingController();
+ TextEditingController featuresController = TextEditingController();
+ TextEditingController disclaimerController = TextEditingController();
+ List types = [
+ "Own Pharmacy",
+ "Hospital"
+ ];
+ String? selectedType;
+ StoreItem? store;
+
+ Future fetchMyStore() async{
+ emit(ChangeProfileLoading());
+ final response = await ApiProvider.instance.fetchMyStore();
+ if(response.status ?? false){
+ store = response.store;
+ storeNameController.text = store?.storeName ?? "";
+ ownerNameController.text = store?.ownerName ?? "";
+ whatsappNumberController.text = store?.whatsAppNumber ?? "";
+ address1Controller.text = store?.address1 ?? "";
+ address2Controller.text = store?.address2 ?? "";
+ pinCodeController.text = "${store?.pincode ?? 0}";
+ locationController.text = store?.location ?? "";
+ featuresController.text = store?.features ?? "";
+ disclaimerController.text = store?.disclaimer ?? "";
+ selectedType = (store?.storeStatus ?? true) ? "Own Pharmacy" : "Hospital";
+ emit(ChangeProfileSuccess());
+ }else{
+ emit(ChangeProfileFailure(response.message ?? "Something went wrong"));
+ }
+ }
+
+ void changeType(String? val){
+ selectedType = val;
+ emit(ChangeProfileChangeType());
+ }
+
+ Future updateStore() async{
+ if(storeNameController.text.isEmpty){
+ showToast("Enter store name");
+ }else if(ownerNameController.text.isEmpty){
+ showToast("Enter owner name");
+ }else if(whatsappNumberController.text.isEmpty){
+ showToast("Enter whatsapp number");
+ }else if(whatsappNumberController.text.length != 10){
+ showToast("Invalid whatsapp number");
+ }else if(address1Controller.text.isEmpty){
+ showToast("Enter address1");
+ }else if(address2Controller.text.isEmpty){
+ showToast("Enter address2");
+ }else if(pinCodeController.text.isEmpty){
+ showToast("Enter pincode");
+ }else if(locationController.text.isEmpty){
+ showToast("Enter location");
+ }else if(featuresController.text.isEmpty){
+ showToast("Enter features");
+ }else if(disclaimerController.text.isEmpty){
+ showToast("Enter disclaimer");
+ }else if(selectedType == null){
+ showToast("Select type");
+ }else{
+ var isNetworkConnection = await Helpers.isNetwork();
+ if(isNetworkConnection){
+ Navigation.instance.navigate("/loading");
+ final response = await ApiProvider.instance.updateStore(storeNameController.text, ownerNameController.text,
+ whatsappNumberController.text, address1Controller.text, address2Controller.text, pinCodeController.text, locationController.text, featuresController.text, disclaimerController.text, (selectedType == "Own Pharmacy") ? "1" : "2");
+ Navigation.instance.goBack();
+ if(response.status ?? false){
+ showToast("Profile updated successfully");
+ fetchMyStore();
+ }else{
+ showAlert(response.message ?? "Something went wrong");
+ }
+ }else{
+ showAlert(Constants.noInternet);
+ }
+ }
+ }
+
+ void showAlert(String err){
+ AlertX.instance.showAlert(
+ title: "Error",
+ msg: err,
+ positiveButtonText: "Done",
+ positiveButtonPressed: (){
+ Navigation.instance.goBack();
+ }
+ );
+ }
+
+ void showToast(String msg) {
+ Fluttertoast.showToast(
+ msg: msg,
+ toastLength: Toast.LENGTH_SHORT,
+ gravity: ToastGravity.BOTTOM,
+ timeInSecForIosWeb: 1,
+ backgroundColor: Colors.grey.shade200,
+ textColor: Colors.black,
+ fontSize: 14.0
+ );
+ }
+
+}
\ No newline at end of file
diff --git a/medcify/lib/pages/main/changeProfile/change_profile_page.dart b/medcify/lib/pages/main/changeProfile/change_profile_page.dart
new file mode 100644
index 0000000..2511abf
--- /dev/null
+++ b/medcify/lib/pages/main/changeProfile/change_profile_page.dart
@@ -0,0 +1,216 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:intl/intl.dart';
+import 'package:medcify/components/button.dart';
+import 'package:medcify/components/custom_textfield.dart';
+import 'package:medcify/helpers.dart';
+
+import '../../../components/loader.dart';
+import '../../../navigation/navigation.dart';
+import 'change_profile_bloc.dart';
+
+class ChangeProfilePage extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: Colors.white,
+ appBar: AppBar(
+ elevation: 0.25,
+ automaticallyImplyLeading: false,
+ backgroundColor: Colors.white,
+ title: const Text("Change Profile",style: TextStyle(color: Colors.black,fontSize: 17, fontWeight: FontWeight.w600),),
+ leading: IconButton(
+ onPressed: (){
+ Navigation.instance.goBack();
+ },
+ icon: const Icon(Icons.keyboard_backspace_rounded,color: Colors.black,),
+ ),
+ ),
+ body: GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: (){
+ FocusManager.instance.primaryFocus?.unfocus();
+ },
+ child: BlocProvider(
+ create: (context) => ChangeProfileCubit(),
+ child: ChangeProfileWidget(),
+ ),
+ )
+ );
+ }
+}
+
+class ChangeProfileWidget extends StatefulWidget {
+ @override
+ State createState() => _ChangeProfileWidgetState();
+}
+
+class _ChangeProfileWidgetState extends State {
+ late ChangeProfileCubit changeProfileCubit;
+
+ Widget typeDropDown(){
+ return BlocBuilder(
+ buildWhen: (prev, current){
+ return current is ChangeProfileChangeType;
+ },
+ builder: (context, state){
+ return Container(
+ decoration: BoxDecoration(
+ color: Colors.grey.shade100,
+ borderRadius: BorderRadius.circular(4)
+ ),
+ padding: const EdgeInsets.symmetric(horizontal: 16,),
+ alignment: Alignment.center,
+ child: DropdownButton(
+ underline: const SizedBox(),
+ isExpanded: true,
+ style: const TextStyle(fontSize: 15,fontFamily: "Montserrat",color: Colors.black),
+ icon: const Icon(Icons.keyboard_arrow_down_rounded,color: Colors.grey,size: 16,),
+ hint: const Text("Select type",style: TextStyle(fontFamily: "Montserrat",color: Colors.grey,fontSize: 14),),
+ items: changeProfileCubit.types.map((e) => DropdownMenuItem(
+ value: e,
+ child: Text(e),
+ )).toList(),
+ value: changeProfileCubit.selectedType,
+ onChanged: changeProfileCubit.changeType
+ ),
+ );
+ }
+ );
+ }
+
+ @override
+ initState(){
+ changeProfileCubit = BlocProvider.of(context);
+ changeProfileCubit.fetchMyStore();
+ super.initState();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return BlocBuilder(
+ buildWhen: (prev, current){
+ return current is ChangeProfileLoading || current is ChangeProfileSuccess || current is ChangeProfileFailure;
+ },
+ builder: (context, state){
+ if(state is ChangeProfileLoading){
+ return const Loader();
+ }else if(state is ChangeProfileFailure){
+ return Container(
+ alignment: Alignment.center,
+ margin: const EdgeInsets.symmetric(horizontal: 24),
+ child: Text(state.error,style: TextStyle(color: Colors.grey.shade800, fontSize: 13, height: 1.6),),
+ );
+ }
+ return Stack(
+ children: [
+ SingleChildScrollView(
+ padding: const EdgeInsets.all(16),
+ physics: const BouncingScrollPhysics(),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Text("Store Name",style: TextStyle(color: Colors.black,fontSize: 15, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 16,),
+ CustomTextField(
+ hint: "Enter store name",
+ controller: changeProfileCubit.storeNameController
+ ),
+ const SizedBox(height: 20,),
+ const Text("Owner Name",style: TextStyle(color: Colors.black,fontSize: 15, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 16,),
+ CustomTextField(
+ hint: "Enter owner name",
+ controller: changeProfileCubit.ownerNameController
+ ),
+ const SizedBox(height: 20,),
+ const Text("Whatsapp Number",style: TextStyle(color: Colors.black,fontSize: 15, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 16,),
+ CustomTextField(
+ hint: "Enter whatsapp number",
+ controller: changeProfileCubit.whatsappNumberController,
+ keyboardType: TextInputType.number,
+ inputFormatters: [
+ FilteringTextInputFormatter.digitsOnly
+ ],
+ ),
+ const SizedBox(height: 20,),
+ const Text("Address1",style: TextStyle(color: Colors.black,fontSize: 15, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 16,),
+ CustomTextField(
+ hint: "Enter address1",
+ controller: changeProfileCubit.address1Controller,
+ ),
+ const SizedBox(height: 20,),
+ const Text("Address2",style: TextStyle(color: Colors.black,fontSize: 15, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 16,),
+ CustomTextField(
+ hint: "Enter address2",
+ controller: changeProfileCubit.address2Controller,
+ ),
+ const SizedBox(height: 20,),
+ const Text("Pincode",style: TextStyle(color: Colors.black,fontSize: 15, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 16,),
+ CustomTextField(
+ hint: "Enter pincode",
+ controller: changeProfileCubit.pinCodeController,
+ keyboardType: TextInputType.number,
+ inputFormatters: [
+ FilteringTextInputFormatter.digitsOnly
+ ],
+ ),
+ const SizedBox(height: 20,),
+ const Text("Location",style: TextStyle(color: Colors.black,fontSize: 15, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 16,),
+ CustomTextField(
+ hint: "Enter location",
+ controller: changeProfileCubit.locationController,
+ ),
+ const SizedBox(height: 20,),
+ const Text("Features",style: TextStyle(color: Colors.black,fontSize: 15, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 16,),
+ CustomTextField(
+ hint: "Enter features",
+ controller: changeProfileCubit.featuresController,
+ maxLines: 5,
+ keyboardType: TextInputType.multiline,
+ ),
+ const SizedBox(height: 20,),
+ const Text("Disclaimer",style: TextStyle(color: Colors.black,fontSize: 15, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 16,),
+ CustomTextField(
+ hint: "Enter disclaimer",
+ controller: changeProfileCubit.disclaimerController,
+ maxLines: 5,
+ keyboardType: TextInputType.multiline,
+ ),
+ const SizedBox(height: 20,),
+ const Text("Store Type",style: TextStyle(color: Colors.black,fontSize: 15, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 16,),
+ typeDropDown(),
+ const SizedBox(height: 80,),
+ ],
+ ),
+ ),
+ Align(
+ alignment: Alignment.bottomCenter,
+ child: Container(
+ color: Colors.white,
+ padding: const EdgeInsets.symmetric(horizontal: 16,vertical: 4),
+ child: Button(
+ text: "Submit",
+ onPressed: (){
+ FocusManager.instance.primaryFocus?.unfocus();
+ changeProfileCubit.updateStore();
+ },
+ ),
+ ),
+ )
+ ],
+ );
+ }
+ );
+ }
+}
diff --git a/medcify/lib/pages/main/changeTiming/change_timing_bloc.dart b/medcify/lib/pages/main/changeTiming/change_timing_bloc.dart
new file mode 100644
index 0000000..4195d1e
--- /dev/null
+++ b/medcify/lib/pages/main/changeTiming/change_timing_bloc.dart
@@ -0,0 +1,87 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:fluttertoast/fluttertoast.dart';
+import 'package:intl/intl.dart';
+import 'package:medcify/models/timing_item.dart';
+
+import '../../../components/alert.dart';
+import '../../../navigation/navigation.dart';
+import '../../../network/api_provider.dart';
+
+abstract class ChangeTimingState{}
+
+class ChangeTimingInitial extends ChangeTimingState{}
+class ChangeTimingLoading extends ChangeTimingState{}
+class ChangeTimingSuccess extends ChangeTimingState{}
+class ChangeTimingFailure extends ChangeTimingState{
+ String error;
+ ChangeTimingFailure(this.error);
+}
+
+class ChangeTimingCubit extends Cubit {
+ ChangeTimingCubit() : super(ChangeTimingInitial());
+ List timings = [];
+
+ Future fetchTimings() async{
+ emit(ChangeTimingLoading());
+ final response = await ApiProvider.instance.fetchTimings();
+ if(response.status ?? false){
+ timings = response.timings ?? [];
+ emit(ChangeTimingSuccess());
+ }else{
+ emit(ChangeTimingFailure(response.message ?? "Something went wrong"));
+ }
+ }
+
+ void onOpeningTimeChanged(DateTime? val,int pos){
+ if(val != null){
+ timings[pos].openingTime = DateFormat().add_jms().format(val);
+ emit(ChangeTimingSuccess());
+ }
+ }
+
+ void onClosingTimeChanged(DateTime? val,int pos){
+ if(val != null){
+ timings[pos].closingTime = DateFormat().add_jms().format(val);
+ emit(ChangeTimingSuccess());
+ }
+ }
+
+ Future updateTiming() async{
+ Navigation.instance.navigate("/loading");
+ final response = await ApiProvider.instance.updateTimings(timings);
+ Navigation.instance.goBack();
+ if(response.status ?? false){
+ showToast("Timings updated successfully");
+ fetchTimings();
+ }else{
+ showAlert(response.message ?? "Something went wrong");
+ }
+ }
+
+ void showToast(String msg) {
+ Fluttertoast.showToast(
+ msg: msg,
+ toastLength: Toast.LENGTH_SHORT,
+ gravity: ToastGravity.BOTTOM,
+ timeInSecForIosWeb: 1,
+ backgroundColor: Colors.grey.shade200,
+ textColor: Colors.black,
+ fontSize: 14.0
+ );
+ }
+
+ void showAlert(String err){
+ AlertX.instance.showAlert(
+ title: "Error",
+ msg: err,
+ positiveButtonText: "Done",
+ positiveButtonPressed: (){
+ Navigation.instance.goBack();
+ }
+ );
+ }
+
+
+}
\ No newline at end of file
diff --git a/medcify/lib/pages/main/changeTiming/change_timing_page.dart b/medcify/lib/pages/main/changeTiming/change_timing_page.dart
new file mode 100644
index 0000000..bd357a1
--- /dev/null
+++ b/medcify/lib/pages/main/changeTiming/change_timing_page.dart
@@ -0,0 +1,172 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:medcify/components/button.dart';
+import 'package:medcify/components/loader.dart';
+import 'package:medcify/models/timing_item.dart';
+import 'package:medcify/pages/main/changeTiming/change_timing_bloc.dart';
+
+import '../../../navigation/navigation.dart';
+
+class ChangeTimingPage extends StatelessWidget {
+ const ChangeTimingPage({Key? key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: Colors.white,
+ appBar: AppBar(
+ backgroundColor: Colors.white,
+ elevation: 0.25,
+ automaticallyImplyLeading: false,
+ title: const Text("Change Timing",style: TextStyle(color: Colors.black,fontSize: 17),),
+ leading: IconButton(
+ onPressed: (){
+ Navigation.instance.goBack();
+ },
+ icon: const Icon(Icons.keyboard_backspace_rounded,color: Colors.black,),
+ ),
+ ),
+ body: BlocProvider(
+ create: (context) => ChangeTimingCubit(),
+ child: ProductWidget(),
+ ),
+ );
+ }
+}
+
+class ProductWidget extends StatelessWidget {
+ late ChangeTimingCubit changeTimingCubit;
+
+ void showCustomDatePicker(BuildContext context, Function(DateTime,int) onDateTimeChanged,int pos){
+ showModalBottomSheet(
+ constraints: BoxConstraints(
+ maxHeight: MediaQuery.of(context).size.height / 3
+ ),
+ context: context,
+ builder: (context){
+ return CupertinoTheme(
+ data: const CupertinoThemeData(
+ textTheme: CupertinoTextThemeData(
+ dateTimePickerTextStyle: TextStyle(color: Colors.black, fontSize: 16, fontFamily: "Montserrat"),
+ ),
+ ),
+ child: CupertinoDatePicker(
+ mode: CupertinoDatePickerMode.time,
+ onDateTimeChanged: (val){
+ onDateTimeChanged(val,pos);
+ },
+ ),
+ );
+ }
+ );
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ changeTimingCubit = BlocProvider.of(context);
+ changeTimingCubit.fetchTimings();
+ return BlocBuilder(
+ builder: (context, state) {
+ if(state is ChangeTimingLoading){
+ return const Loader();
+ }else if(state is ChangeTimingFailure){
+ return Container(
+ alignment: Alignment.center,
+ margin: const EdgeInsets.symmetric(horizontal: 24),
+ child: Text(state.error,style: TextStyle(color: Colors.grey.shade800, fontSize: 13, height: 1.6),),
+ );
+ }else{
+ return Stack(
+ children: [
+ (changeTimingCubit.timings.isEmpty) ? Container(
+ alignment: Alignment.center,
+ margin: const EdgeInsets.symmetric(horizontal: 24),
+ child: Text("No data found",style: TextStyle(color: Colors.grey.shade800, fontSize: 13),),
+ ) : ListView.builder(
+ itemCount: changeTimingCubit.timings.length,
+ padding: const EdgeInsets.only(top: 16,bottom: 80,left: 16,right: 16),
+ physics: const BouncingScrollPhysics(),
+ itemBuilder: (context, pos){
+ TimingItem timing = changeTimingCubit.timings[pos];
+ return Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(timing.day ?? "",style: const TextStyle(color: Colors.black,fontWeight: FontWeight.w500, fontSize: 13),),
+ const SizedBox(height: 16,),
+ Row(
+ children: [
+ Expanded(
+ child: GestureDetector(
+ onTap: (){
+ showCustomDatePicker(context,changeTimingCubit.onOpeningTimeChanged,pos);
+ },
+ behavior: HitTestBehavior.opaque,
+ child: Container(
+ decoration: BoxDecoration(
+ color: Colors.grey.shade100,
+ borderRadius: BorderRadius.circular(4)
+ ),
+ padding: const EdgeInsets.symmetric(horizontal: 16,vertical: 16),
+ alignment: Alignment.centerLeft,
+ child: Row(
+ children: [
+ Text(timing.openingTime ?? "",style: const TextStyle(color: Colors.black,fontSize: 15),),
+ const Spacer(),
+ const Icon(Icons.keyboard_arrow_down_rounded,color: Colors.grey,size: 16,),
+ ],
+ ),
+ ),
+ ),
+ ),
+ const SizedBox(width: 8,),
+ Expanded(
+ child: GestureDetector(
+ onTap: (){
+ showCustomDatePicker(context,changeTimingCubit.onClosingTimeChanged,pos);
+ },
+ behavior: HitTestBehavior.opaque,
+ child: Container(
+ decoration: BoxDecoration(
+ color: Colors.grey.shade100,
+ borderRadius: BorderRadius.circular(4)
+ ),
+ padding: const EdgeInsets.symmetric(horizontal: 16,vertical: 16),
+ alignment: Alignment.centerLeft,
+ child: Row(
+ children: [
+ Text(timing.closingTime ?? "",style: const TextStyle(color: Colors.black,fontSize: 15),),
+ const Spacer(),
+ const Icon(Icons.keyboard_arrow_down_rounded,color: Colors.grey,size: 16,),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ const SizedBox(height: 24,),
+ ],
+ );
+ },
+ ),
+ Align(
+ alignment: Alignment.bottomCenter,
+ child: Container(
+ padding: const EdgeInsets.symmetric(horizontal: 16,vertical: 4),
+ color: Colors.white,
+ child: Button(
+ text: "Update",
+ onPressed: (){
+ changeTimingCubit.updateTiming();
+ },
+ ),
+ ),
+ )
+ ],
+ );
+ }
+ }
+ );
+ }
+}
diff --git a/medcify/lib/pages/main/changeUpiQr/change_upi_qr_bloc.dart b/medcify/lib/pages/main/changeUpiQr/change_upi_qr_bloc.dart
new file mode 100644
index 0000000..7da6e98
--- /dev/null
+++ b/medcify/lib/pages/main/changeUpiQr/change_upi_qr_bloc.dart
@@ -0,0 +1,89 @@
+
+import 'dart:convert';
+import 'dart:typed_data';
+
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:fluttertoast/fluttertoast.dart';
+import 'package:image_picker/image_picker.dart';
+import 'package:medcify/network/api_provider.dart';
+
+import '../../../components/alert.dart';
+import '../../../navigation/navigation.dart';
+
+abstract class ChangeUpiQrState{}
+
+class ChangeUpiQrInitial extends ChangeUpiQrState{}
+class ChangeUpiQrLoading extends ChangeUpiQrState{}
+class ChangeUpiQrSuccess extends ChangeUpiQrState{}
+class ChangeUpiQrFailure extends ChangeUpiQrState{
+ String error;
+ ChangeUpiQrFailure(this.error);
+}
+
+class ChangeUpiQrCubit extends Cubit {
+ ChangeUpiQrCubit() : super(ChangeUpiQrInitial());
+ String? image;
+ ImagePicker picker = ImagePicker();
+
+ Future fetchUpiQr() async{
+ emit(ChangeUpiQrLoading());
+ final response = await ApiProvider.instance.fetchUpiQrImage();
+ if(response.status ?? false){
+ image = response.image ?? "";
+ emit(ChangeUpiQrSuccess());
+ }else{
+ emit(ChangeUpiQrFailure(response.message ?? "Something went wrong"));
+ }
+ }
+
+ Future getImage(int pos) async{
+ final XFile? value = await picker.pickImage(source: (pos == 0) ? ImageSource.camera : ImageSource.gallery);
+ if(value != null){
+ final bytes = (await value.readAsBytes()).lengthInBytes;
+ final kb = bytes / 1024;
+ final mb = kb / 1024;
+ if(mb <= 1){
+ updateImage(value.path);
+ }else{
+ showToast("Select image below 1mb");
+ }
+ }
+ }
+
+ Future updateImage(String val) async{
+ Navigation.instance.navigate("/loading");
+ final response = await ApiProvider.instance.updateUpiQrImage(val);
+ Navigation.instance.goBack();
+ if(response.status ?? false){
+ fetchUpiQr();
+ }else{
+ showAlert(response.message ?? "Something went wrong");
+ }
+ }
+
+ void showAlert(String err){
+ AlertX.instance.showAlert(
+ title: "Error",
+ msg: err,
+ positiveButtonText: "Done",
+ positiveButtonPressed: (){
+ Navigation.instance.goBack();
+ }
+ );
+ }
+
+ void showToast(String msg) {
+ Fluttertoast.showToast(
+ msg: msg,
+ toastLength: Toast.LENGTH_SHORT,
+ gravity: ToastGravity.BOTTOM,
+ timeInSecForIosWeb: 1,
+ backgroundColor: Colors.grey.shade200,
+ textColor: Colors.black,
+ fontSize: 14.0
+ );
+ }
+
+
+}
\ No newline at end of file
diff --git a/medcify/lib/pages/main/changeUpiQr/change_upi_qr_page.dart b/medcify/lib/pages/main/changeUpiQr/change_upi_qr_page.dart
new file mode 100644
index 0000000..bc13f5f
--- /dev/null
+++ b/medcify/lib/pages/main/changeUpiQr/change_upi_qr_page.dart
@@ -0,0 +1,91 @@
+import 'package:cached_network_image/cached_network_image.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:medcify/constants.dart';
+import 'package:medcify/helpers.dart';
+import 'package:url_launcher/url_launcher.dart';
+
+import '../../../components/loader.dart';
+import '../../../navigation/navigation.dart';
+import 'change_upi_qr_bloc.dart';
+
+class ChangeUpiQrPage extends StatelessWidget {
+ const ChangeUpiQrPage({Key? key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: Colors.white,
+ appBar: AppBar(
+ backgroundColor: Colors.white,
+ elevation: 0.25,
+ automaticallyImplyLeading: false,
+ leading: IconButton(
+ onPressed: (){
+ Navigation.instance.goBack();
+ },
+ icon: const Icon(Icons.keyboard_backspace_rounded,color: Colors.black,),
+ ),
+ title: const Text("Upi Qr",style: TextStyle(color: Colors.black,fontSize: 17),),
+ ),
+ body: BlocProvider(
+ create: (context) => ChangeUpiQrCubit(),
+ child: QrWidget(),
+ ),
+ );
+ }
+}
+
+class QrWidget extends StatelessWidget {
+ late ChangeUpiQrCubit changeUpiQrCubit;
+
+ @override
+ Widget build(BuildContext context) {
+ changeUpiQrCubit = BlocProvider.of(context);
+ changeUpiQrCubit.fetchUpiQr();
+ return BlocBuilder(
+ builder: (context, state) {
+ if(state is ChangeUpiQrLoading){
+ return const Loader();
+ }else if(state is ChangeUpiQrFailure){
+ return Container(
+ alignment: Alignment.center,
+ margin: const EdgeInsets.symmetric(horizontal: 24),
+ child: Text(state.error,style: TextStyle(color: Colors.grey.shade800, fontSize: 13, height: 1.6),),
+ );
+ }else{
+ return Container(
+ alignment: Alignment.center,
+ padding: const EdgeInsets.all(20),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ if(changeUpiQrCubit.image != null)Expanded(
+ child: Center(
+ child: CachedNetworkImage(
+ imageUrl: changeUpiQrCubit.image ?? "",
+ )
+ )
+ ),
+ const SizedBox(height: 24,),
+ MaterialButton(
+ onPressed: (){
+ Helpers.showPhotoSelectionDialog(changeUpiQrCubit.getImage);
+ },
+ elevation: 0,
+ height: 50,
+ minWidth: double.infinity,
+ color: Constants.primaryColor,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(30)
+ ),
+ child: const Text("Update",style: TextStyle(color: Colors.white,fontWeight: FontWeight.w600, fontSize: 15),)
+ ),
+ ],
+ ),
+ );
+ }
+ }
+ );
+ }
+}
diff --git a/medcify/lib/pages/main/deliveryPincodes/addPincode/add_pincode_bloc.dart b/medcify/lib/pages/main/deliveryPincodes/addPincode/add_pincode_bloc.dart
new file mode 100644
index 0000000..d0f8706
--- /dev/null
+++ b/medcify/lib/pages/main/deliveryPincodes/addPincode/add_pincode_bloc.dart
@@ -0,0 +1,67 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:fluttertoast/fluttertoast.dart';
+import 'package:medcify/network/api_provider.dart';
+
+import '../../../../components/alert.dart';
+import '../../../../navigation/navigation.dart';
+
+abstract class AddPincodeState{}
+
+class AddPincodeInitial extends AddPincodeState{}
+
+class AddPincodeCubit extends Cubit {
+ AddPincodeCubit() : super(AddPincodeInitial());
+ TextEditingController pincodeController = TextEditingController();
+ TextEditingController deliveryFeeController = TextEditingController();
+ TextEditingController freeAboveController = TextEditingController();
+
+ Future addPincode() async{
+ if(pincodeController.text.isEmpty){
+ showToast("Enter pincode");
+ }else if(deliveryFeeController.text.isEmpty){
+ showToast("Enter delivery fee");
+ }else if(freeAboveController.text.isEmpty){
+ showToast("Enter free above");
+ }else{
+ Navigation.instance.navigate("/loading");
+ final response = await ApiProvider.instance.addPincode(pincodeController.text,deliveryFeeController.text,freeAboveController.text);
+ Navigation.instance.goBack();
+ if(response.status ?? false){
+ BuildContext? context = Navigation.instance.navigatorKey.currentContext;
+ if(context != null){
+ Navigator.pop(context,true);
+ }
+ showToast("Pincode added successfully");
+ }else{
+ showAlert(response.message ?? "Something went wrong");
+ }
+ }
+ }
+
+ void showToast(String msg) {
+ Fluttertoast.showToast(
+ msg: msg,
+ toastLength: Toast.LENGTH_SHORT,
+ gravity: ToastGravity.BOTTOM,
+ timeInSecForIosWeb: 1,
+ backgroundColor: Colors.grey.shade200,
+ textColor: Colors.black,
+ fontSize: 14.0
+ );
+ }
+
+ void showAlert(String err){
+ AlertX.instance.showAlert(
+ title: "Error",
+ msg: err,
+ positiveButtonText: "Done",
+ positiveButtonPressed: (){
+ Navigation.instance.goBack();
+ }
+ );
+ }
+
+
+}
\ No newline at end of file
diff --git a/medcify/lib/pages/main/deliveryPincodes/addPincode/add_pincode_page.dart b/medcify/lib/pages/main/deliveryPincodes/addPincode/add_pincode_page.dart
new file mode 100644
index 0000000..fdceb56
--- /dev/null
+++ b/medcify/lib/pages/main/deliveryPincodes/addPincode/add_pincode_page.dart
@@ -0,0 +1,110 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:medcify/components/button.dart';
+import 'package:medcify/components/loader.dart';
+import '../../../../components/custom_textfield.dart';
+import '../../../../navigation/navigation.dart';
+import 'add_pincode_bloc.dart';
+
+class AddPincodePage extends StatelessWidget {
+ const AddPincodePage({Key? key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: (){
+ FocusManager.instance.primaryFocus?.unfocus();
+ },
+ child: Scaffold(
+ backgroundColor: Colors.white,
+ appBar: AppBar(
+ backgroundColor: Colors.white,
+ elevation: 0.25,
+ automaticallyImplyLeading: false,
+ title: const Text("Add Pincode",style: TextStyle(color: Colors.black,fontSize: 17),),
+ leading: IconButton(
+ onPressed: (){
+ Navigation.instance.goBack();
+ },
+ icon: const Icon(Icons.keyboard_backspace_rounded,color: Colors.black,),
+ ),
+ ),
+ body: BlocProvider(
+ create: (context) => AddPincodeCubit(),
+ child: AddPincodeWidget(),
+ ),
+ ),
+ );
+ }
+}
+
+class AddPincodeWidget extends StatelessWidget {
+ late AddPincodeCubit addPincodeCubit;
+
+ @override
+ Widget build(BuildContext context) {
+ addPincodeCubit = BlocProvider.of(context);
+ return Stack(
+ children: [
+ SingleChildScrollView(
+ padding: const EdgeInsets.only(top: 16,left: 16,right: 16,bottom: 80),
+ physics: const BouncingScrollPhysics(),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Text("Pincode",style: TextStyle(color: Colors.black,fontSize: 15, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 16,),
+ CustomTextField(
+ hint: "Enter pincode",
+ controller: addPincodeCubit.pincodeController,
+ keyboardType: TextInputType.number,
+ inputFormatters: [
+ FilteringTextInputFormatter.digitsOnly
+ ],
+ ),
+ const SizedBox(height: 20,),
+ const Text("Delivery Fee",style: TextStyle(color: Colors.black,fontSize: 15, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 16,),
+ CustomTextField(
+ hint: "Enter delivery fee",
+ controller: addPincodeCubit.deliveryFeeController,
+ keyboardType: TextInputType.number,
+ inputFormatters: [
+ FilteringTextInputFormatter.digitsOnly
+ ],
+ ),
+ const SizedBox(height: 20,),
+ const Text("Free Above",style: TextStyle(color: Colors.black,fontSize: 15, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 16,),
+ CustomTextField(
+ hint: "Enter free above",
+ controller: addPincodeCubit.freeAboveController,
+ keyboardType: TextInputType.number,
+ inputFormatters: [
+ FilteringTextInputFormatter.digitsOnly
+ ],
+ ),
+ const SizedBox(height: 16,),
+ ],
+ ),
+ ),
+ Align(
+ alignment: Alignment.bottomCenter,
+ child: Container(
+ padding: const EdgeInsets.symmetric(horizontal: 16,vertical: 4),
+ color: Colors.white,
+ child: Button(
+ text: "Submit",
+ onPressed: (){
+ addPincodeCubit.addPincode();
+ },
+ ),
+ ),
+ )
+ ],
+ );
+ }
+}
diff --git a/medcify/lib/pages/main/deliveryPincodes/delivery_pincodes_bloc.dart b/medcify/lib/pages/main/deliveryPincodes/delivery_pincodes_bloc.dart
new file mode 100644
index 0000000..f11b4e5
--- /dev/null
+++ b/medcify/lib/pages/main/deliveryPincodes/delivery_pincodes_bloc.dart
@@ -0,0 +1,73 @@
+
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:medcify/models/order_item.dart';
+import 'package:medcify/models/pincode_item.dart';
+import 'package:medcify/network/api_provider.dart';
+
+import '../../../components/alert.dart';
+import '../../../constants.dart';
+import '../../../helpers.dart';
+import '../../../models/banner_item.dart';
+import '../../../models/medicine_item.dart';
+import '../../../navigation/navigation.dart';
+
+abstract class DeliveringPincodesState{}
+
+class DeliveringPincodesInitial extends DeliveringPincodesState{}
+class DeliveringPincodesLoading extends DeliveringPincodesState{}
+class DeliveringPincodesSuccess extends DeliveringPincodesState{}
+class DeliveringPincodesFailure extends DeliveringPincodesState{
+ String error;
+ DeliveringPincodesFailure(this.error);
+}
+
+class DeliveringPincodesCubit extends Cubit {
+ DeliveringPincodesCubit() : super(DeliveringPincodesInitial());
+ List pincodes = [];
+
+ Future fetchPincodes() async{
+ emit(DeliveringPincodesLoading());
+ final response = await ApiProvider.instance.fetchPincodes();
+ if(response.status ?? false){
+ pincodes = response.pincodes ?? [];
+ emit(DeliveringPincodesSuccess());
+ }else{
+ emit(DeliveringPincodesFailure(response.message ?? "Something went wrong"));
+ }
+ }
+
+ Future deletePincode(String id) async{
+ var isNetworkConnection = await Helpers.isNetwork();
+ if(isNetworkConnection){
+ Navigation.instance.navigate("/loading");
+ final response = await ApiProvider.instance.deletePincode(id);
+ Navigation.instance.goBack();
+ if(response.status ?? false){
+ fetchPincodes();
+ }else{
+ showAlert(response.message ?? "Something went wrong");
+ }
+ }else{
+ showAlert(Constants.noInternet);
+ }
+ }
+
+ Future editPincode(PincodeItem pincode) async{
+ final response = await Navigation.instance.navigate("/editPincode",args: pincode);
+ if(response != null){
+ fetchPincodes();
+ }
+ }
+
+ void showAlert(String msg){
+ AlertX.instance.showAlert(
+ title: "Error",
+ msg: msg,
+ positiveButtonText: "Done",
+ positiveButtonPressed: (){
+ Navigation.instance.goBack();
+ }
+ );
+ }
+
+}
\ No newline at end of file
diff --git a/medcify/lib/pages/main/deliveryPincodes/delivery_pincodes_page.dart b/medcify/lib/pages/main/deliveryPincodes/delivery_pincodes_page.dart
new file mode 100644
index 0000000..b2fd294
--- /dev/null
+++ b/medcify/lib/pages/main/deliveryPincodes/delivery_pincodes_page.dart
@@ -0,0 +1,91 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:medcify/components/loader.dart';
+import 'package:medcify/constants.dart';
+import 'package:medcify/models/pincode_item.dart';
+import 'package:medcify/pages/main/deliveryPincodes/pincode_card.dart';
+
+import '../../../navigation/navigation.dart';
+import 'delivery_pincodes_bloc.dart';
+
+class DeliveringPincodesPage extends StatelessWidget {
+ const DeliveringPincodesPage({Key? key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ backgroundColor: Colors.white,
+ elevation: 0.25,
+ automaticallyImplyLeading: false,
+ leading: IconButton(
+ onPressed: (){
+ Navigation.instance.goBack();
+ },
+ icon: const Icon(Icons.keyboard_backspace_rounded,color: Colors.black,),
+ ),
+ title: const Text("Delivering Pincodes",style: TextStyle(color: Colors.black,fontSize: 17),),
+ ),
+ body: BlocProvider(
+ create: (context) => DeliveringPincodesCubit(),
+ child: ProductWidget(),
+ ),
+ );
+ }
+}
+
+class ProductWidget extends StatelessWidget {
+ late DeliveringPincodesCubit deliveringPincodesCubit;
+
+ @override
+ Widget build(BuildContext context) {
+ deliveringPincodesCubit = BlocProvider.of(context);
+ deliveringPincodesCubit.fetchPincodes();
+ return BlocBuilder(
+ builder: (context, state) {
+ if(state is DeliveringPincodesLoading){
+ return const Loader();
+ }else if(state is DeliveringPincodesFailure){
+ return Container(
+ alignment: Alignment.center,
+ margin: const EdgeInsets.symmetric(horizontal: 24),
+ child: Text(state.error,style: TextStyle(color: Colors.grey.shade800, fontSize: 13, height: 1.6),),
+ );
+ }else{
+ return Stack(
+ children: [
+ (deliveringPincodesCubit.pincodes.isEmpty) ? Container(
+ alignment: Alignment.center,
+ margin: const EdgeInsets.symmetric(horizontal: 24),
+ child: Text("No pincodes found",style: TextStyle(color: Colors.grey.shade800, fontSize: 13),),
+ ) : ListView.builder(
+ itemCount: deliveringPincodesCubit.pincodes.length,
+ padding: const EdgeInsets.only(top: 16,bottom: 80,left: 16,right: 16),
+ physics: const BouncingScrollPhysics(),
+ itemBuilder: (context, pos){
+ PincodeItem pincode = deliveringPincodesCubit.pincodes[pos];
+ return PincodeCard(item: pincode,deletePincode: deliveringPincodesCubit.deletePincode, editPincode: deliveringPincodesCubit.editPincode,);
+ },
+ ),
+ Positioned(
+ bottom: 16,
+ right: 16,
+ child: FloatingActionButton(
+ onPressed: () async{
+ final response = await Navigation.instance.navigate("/addPincode");
+ if(response != null){
+ deliveringPincodesCubit.fetchPincodes();
+ }
+ },
+ backgroundColor: Constants.primaryColor,
+ elevation: 0,
+ child: const Icon(Icons.add_rounded,color: Colors.white,),
+ ),
+ )
+ ],
+ );
+ }
+ }
+ );
+ }
+}
diff --git a/medcify/lib/pages/main/deliveryPincodes/editPincode/edit_pincode_bloc.dart b/medcify/lib/pages/main/deliveryPincodes/editPincode/edit_pincode_bloc.dart
new file mode 100644
index 0000000..9f51bf1
--- /dev/null
+++ b/medcify/lib/pages/main/deliveryPincodes/editPincode/edit_pincode_bloc.dart
@@ -0,0 +1,74 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:fluttertoast/fluttertoast.dart';
+import 'package:medcify/models/pincode_item.dart';
+import 'package:medcify/network/api_provider.dart';
+
+import '../../../../components/alert.dart';
+import '../../../../navigation/navigation.dart';
+
+abstract class EditPincodeState{}
+
+class EditPincodeInitial extends EditPincodeState{}
+
+class EditPincodeCubit extends Cubit {
+ EditPincodeCubit() : super(EditPincodeInitial());
+ TextEditingController pincodeController = TextEditingController();
+ TextEditingController deliveryFeeController = TextEditingController();
+ TextEditingController freeAboveController = TextEditingController();
+
+ void setData(PincodeItem pincode){
+ pincodeController.text = "${pincode.pincode ?? 0}";
+ deliveryFeeController.text = "${pincode.deliveryFee ?? 0}";
+ freeAboveController.text = "${pincode.freeAbove ?? 0}";
+ }
+
+ Future updatePincode(String id) async{
+ if(pincodeController.text.isEmpty){
+ showToast("Enter pincode");
+ }else if(deliveryFeeController.text.isEmpty){
+ showToast("Enter delivery fee");
+ }else if(freeAboveController.text.isEmpty){
+ showToast("Enter free above");
+ }else{
+ Navigation.instance.navigate("/loading");
+ final response = await ApiProvider.instance.updatePincode(id,pincodeController.text,deliveryFeeController.text,freeAboveController.text);
+ Navigation.instance.goBack();
+ if(response.status ?? false){
+ BuildContext? context = Navigation.instance.navigatorKey.currentContext;
+ if(context != null){
+ Navigator.pop(context,true);
+ }
+ showToast("Pincode updated successfully");
+ }else{
+ showAlert(response.message ?? "Something went wrong");
+ }
+ }
+ }
+
+ void showToast(String msg) {
+ Fluttertoast.showToast(
+ msg: msg,
+ toastLength: Toast.LENGTH_SHORT,
+ gravity: ToastGravity.BOTTOM,
+ timeInSecForIosWeb: 1,
+ backgroundColor: Colors.grey.shade200,
+ textColor: Colors.black,
+ fontSize: 14.0
+ );
+ }
+
+ void showAlert(String err){
+ AlertX.instance.showAlert(
+ title: "Error",
+ msg: err,
+ positiveButtonText: "Done",
+ positiveButtonPressed: (){
+ Navigation.instance.goBack();
+ }
+ );
+ }
+
+
+}
\ No newline at end of file
diff --git a/medcify/lib/pages/main/deliveryPincodes/editPincode/edit_pincode_page.dart b/medcify/lib/pages/main/deliveryPincodes/editPincode/edit_pincode_page.dart
new file mode 100644
index 0000000..ee357b3
--- /dev/null
+++ b/medcify/lib/pages/main/deliveryPincodes/editPincode/edit_pincode_page.dart
@@ -0,0 +1,114 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:medcify/components/button.dart';
+import 'package:medcify/models/pincode_item.dart';
+import '../../../../components/custom_textfield.dart';
+import '../../../../navigation/navigation.dart';
+import 'edit_pincode_bloc.dart';
+
+class EditPincodePage extends StatelessWidget {
+ PincodeItem pincode;
+ EditPincodePage(this.pincode);
+
+ @override
+ Widget build(BuildContext context) {
+ return GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: (){
+ FocusManager.instance.primaryFocus?.unfocus();
+ },
+ child: Scaffold(
+ backgroundColor: Colors.white,
+ appBar: AppBar(
+ backgroundColor: Colors.white,
+ elevation: 0.25,
+ automaticallyImplyLeading: false,
+ title: const Text("Edit Pincode",style: TextStyle(color: Colors.black,fontSize: 17),),
+ leading: IconButton(
+ onPressed: (){
+ Navigation.instance.goBack();
+ },
+ icon: const Icon(Icons.keyboard_backspace_rounded,color: Colors.black,),
+ ),
+ ),
+ body: BlocProvider(
+ create: (context) => EditPincodeCubit(),
+ child: EditPincodeWidget(pincode),
+ ),
+ ),
+ );
+ }
+}
+
+class EditPincodeWidget extends StatelessWidget {
+ PincodeItem pincode;
+ EditPincodeWidget(this.pincode);
+ late EditPincodeCubit editPincodeCubit;
+
+ @override
+ Widget build(BuildContext context) {
+ editPincodeCubit = BlocProvider.of(context);
+ editPincodeCubit.setData(pincode);
+ return Stack(
+ children: [
+ SingleChildScrollView(
+ padding: const EdgeInsets.only(top: 16,left: 16,right: 16,bottom: 80),
+ physics: const BouncingScrollPhysics(),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Text("Pincode",style: TextStyle(color: Colors.black,fontSize: 15, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 16,),
+ CustomTextField(
+ hint: "Enter pincode",
+ controller: editPincodeCubit.pincodeController,
+ keyboardType: TextInputType.number,
+ inputFormatters: [
+ FilteringTextInputFormatter.digitsOnly
+ ],
+ ),
+ const SizedBox(height: 20,),
+ const Text("Delivery Fee",style: TextStyle(color: Colors.black,fontSize: 15, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 16,),
+ CustomTextField(
+ hint: "Enter delivery fee",
+ controller: editPincodeCubit.deliveryFeeController,
+ keyboardType: TextInputType.number,
+ inputFormatters: [
+ FilteringTextInputFormatter.digitsOnly
+ ],
+ ),
+ const SizedBox(height: 20,),
+ const Text("Free Above",style: TextStyle(color: Colors.black,fontSize: 15, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 16,),
+ CustomTextField(
+ hint: "Enter free above",
+ controller: editPincodeCubit.freeAboveController,
+ keyboardType: TextInputType.number,
+ inputFormatters: [
+ FilteringTextInputFormatter.digitsOnly
+ ],
+ ),
+ const SizedBox(height: 16,),
+ ],
+ ),
+ ),
+ Align(
+ alignment: Alignment.bottomCenter,
+ child: Container(
+ padding: const EdgeInsets.symmetric(horizontal: 16,vertical: 4),
+ color: Colors.white,
+ child: Button(
+ text: "Update",
+ onPressed: (){
+ editPincodeCubit.updatePincode("${pincode.id ?? 0}");
+ },
+ ),
+ ),
+ )
+ ],
+ );
+ }
+}
diff --git a/medcify/lib/pages/main/deliveryPincodes/pincode_card.dart b/medcify/lib/pages/main/deliveryPincodes/pincode_card.dart
new file mode 100644
index 0000000..bfd3cd5
--- /dev/null
+++ b/medcify/lib/pages/main/deliveryPincodes/pincode_card.dart
@@ -0,0 +1,111 @@
+import 'package:cached_network_image/cached_network_image.dart';
+import 'package:flutter/material.dart';
+import 'package:intl/intl.dart';
+import 'package:medcify/components/button.dart';
+import 'package:medcify/constants.dart';
+import 'package:medcify/models/medicine_item.dart';
+import 'package:medcify/models/order_item.dart';
+import 'package:medcify/models/pincode_item.dart';
+
+import '../../../components/alert.dart';
+import '../../../navigation/navigation.dart';
+
+class PincodeCard extends StatelessWidget {
+ PincodeItem item;
+ Function(String) deletePincode;
+ Function(PincodeItem) editPincode;
+ PincodeCard({required this.item, required this.deletePincode, required this.editPincode});
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(8),
+ color: Colors.white,
+ border: Border.all(color: Colors.grey.shade200)
+ ),
+ margin: const EdgeInsets.only(bottom: 12),
+ padding: const EdgeInsets.symmetric(horizontal: 16,vertical: 16),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ children: [
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Text("PINCODE",style: TextStyle(color: Constants.secondaryTextColor,fontSize: 11, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 4,),
+ Text("${item.pincode}",style: const TextStyle(color: Colors.black,fontSize: 12.5,),),
+ ],
+ ),
+ ),
+ const SizedBox(width: 16,),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Text("DELIVERY FEE",style: TextStyle(color: Constants.secondaryTextColor,fontSize: 11, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 4,),
+ Text("\u{20B9}${item.deliveryFee}",style: const TextStyle(color: Colors.black,fontSize: 12.5,),),
+ ],
+ ),
+ ),
+ ],
+ ),
+ const SizedBox(height: 24,),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Text("FREE ABOVE",style: TextStyle(color: Constants.secondaryTextColor,fontSize: 11, fontWeight: FontWeight.w500),),
+ const SizedBox(height: 4,),
+ Text("\u{20B9}${item.freeAbove}",style: const TextStyle(color: Colors.black,fontSize: 12.5,),),
+ ],
+ ),
+ const SizedBox(height: 24,),
+ SizedBox(
+ height: 32,
+ child: Row(
+ children: [
+ Expanded(
+ flex: 1,
+ child: Button(
+ onPressed: (){
+ editPincode(item);
+ },
+ text: "Edit",
+ color: Colors.blue,
+ ),
+ ),
+ const SizedBox(width: 16,),
+ Expanded(
+ flex: 1,
+ child: Button(
+ onPressed: (){
+ AlertX.instance.showAlert(
+ title: "Delete",
+ msg: "Are you sure, Do you want to delete?",
+ positiveButtonText: "Yes",
+ positiveButtonPressed: () async{
+ Navigation.instance.goBack();
+ deletePincode("${item.id ?? 0}");
+ },
+ negativeButtonText: "No",
+ negativeButtonPressed: (){
+ Navigation.instance.goBack();
+ }
+ );
+ },
+ text: "Delete",
+ color: Colors.red,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/medcify/lib/pages/main/firebase_push_notification.dart b/medcify/lib/pages/main/firebase_push_notification.dart
new file mode 100644
index 0000000..afeba5c
--- /dev/null
+++ b/medcify/lib/pages/main/firebase_push_notification.dart
@@ -0,0 +1,110 @@
+import 'dart:convert';
+import 'dart:io';
+import 'package:flutter_local_notifications/flutter_local_notifications.dart';
+import 'package:path_provider/path_provider.dart';
+import 'package:firebase_core/firebase_core.dart';
+import 'package:firebase_messaging/firebase_messaging.dart';
+import 'package:http/http.dart' as http;
+
+
+Future _firebaseMessagingBackgroundHandler(message) async {
+ await Firebase.initializeApp();
+}
+
+const AndroidNotificationChannel channel = AndroidNotificationChannel(
+ 'high_importance_channel',
+ 'High Importance Notifications',
+ importance: Importance.high,
+ enableVibration: true,
+ playSound: true,
+);
+
+FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin();
+
+class FirebaseX{
+ FirebaseX._();
+ static final FirebaseX instance = FirebaseX._();
+ FirebaseMessaging firebaseMessaging = FirebaseMessaging.instance;
+
+ void onRegisterFirebaseNotificationTopics(List topics){
+ for(var topic in topics){
+ firebaseMessaging.subscribeToTopic(topic);
+ }
+ }
+
+ Future _downloadAndSaveFile(String url, String fileName) async {
+ final Directory directory = await getApplicationDocumentsDirectory();
+ final String filePath = '${directory.path}/$fileName';
+ final http.Response response = await http.get(Uri.parse(url));
+ final File file = File(filePath);
+ await file.writeAsBytes(response.bodyBytes);
+ return filePath;
+ }
+
+ //notification received during app background
+ Future onFirebaseNotificationReceivedInBackground() async{
+ FirebaseMessaging.onMessage.listen((RemoteMessage message) async {
+ print("background notification: ${message.data}");
+ RemoteNotification? notification = message.notification;
+ if (notification != null) {
+ final String largeIconPath = (notification.android?.imageUrl ?? "").isNotEmpty ? await _downloadAndSaveFile(notification.android?.imageUrl ?? "", 'largeIcon') : "";
+ final String bigPicturePath = (notification.android?.imageUrl ?? "").isNotEmpty ? await _downloadAndSaveFile(notification.android?.imageUrl ?? "", 'bigPicture') : "";
+ final BigPictureStyleInformation bigPictureStyleInformation = BigPictureStyleInformation(FilePathAndroidBitmap(bigPicturePath),
+ largeIcon: FilePathAndroidBitmap(largeIconPath),
+ hideExpandedLargeIcon: true,
+ contentTitle: notification.title,
+ summaryText: notification.body,);
+ final AndroidNotificationDetails androidPlatformChannelSpecifics = AndroidNotificationDetails(
+ channel.id, channel.name,
+ channelDescription: channel.description,
+ largeIcon: (largeIconPath.isEmpty) ? null : FilePathAndroidBitmap(largeIconPath),
+ styleInformation: (bigPicturePath.isEmpty) ? null : bigPictureStyleInformation,
+ icon: notification.android?.smallIcon
+ );
+ final NotificationDetails platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics);
+ flutterLocalNotificationsPlugin.show(
+ notification.hashCode,
+ notification.title,
+ notification.body,
+ platformChannelSpecifics);
+ }
+ });
+ }
+
+ //click event for firebase push notification
+ void onNotificationClicked() {
+ FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
+ onClicked(message);
+ });
+ }
+
+ void onClicked(RemoteMessage message){
+
+ }
+
+ //initializing firebase push notification
+ Future onFirebaseMessagingInitialize() async{
+ FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
+ await FirebaseMessaging.instance.requestPermission(alert: true,badge: true,sound: true);
+ await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation()?.createNotificationChannel(channel);
+ await FirebaseMessaging.instance.setForegroundNotificationPresentationOptions(
+ alert: true,
+ badge: true,
+ sound: true,
+ );
+ await onFirebaseNotificationReceived();
+ await onFirebaseNotificationReceivedInBackground();
+ onNotificationClicked();
+ }
+
+ //notification received during app terminated
+ Future onFirebaseNotificationReceived() async{
+ RemoteMessage? message = await FirebaseMessaging.instance.getInitialMessage();
+ if(message != null){
+ Future.delayed(const Duration(seconds: 1),(){
+ onClicked(message);
+ });
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/medcify/lib/pages/main/home/banner_card.dart b/medcify/lib/pages/main/home/banner_card.dart
new file mode 100644
index 0000000..8a9ff64
--- /dev/null
+++ b/medcify/lib/pages/main/home/banner_card.dart
@@ -0,0 +1,86 @@
+import 'package:cached_network_image/cached_network_image.dart';
+import 'package:carousel_slider/carousel_slider.dart';
+import 'package:flutter/material.dart';
+import '../../../constants.dart';
+import '../../../models/banner_item.dart';
+
+class BannerCard extends StatefulWidget {
+ List banners;
+ BannerCard({required this.banners});
+ @override
+ State createState() => _BannerCardState();
+}
+
+class _BannerCardState extends State {
+ int currentIndex = 0;
+
+ @override
+ Widget build(BuildContext context) {
+ return Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Stack(
+ children: [
+ ClipRRect(
+ borderRadius: BorderRadius.circular(4),
+ child: CarouselSlider(
+ options: CarouselOptions(
+ height: 200,
+ aspectRatio: 16/9,
+ viewportFraction: 1,
+ initialPage: 0,
+ enableInfiniteScroll: true,
+ reverse: false,
+ autoPlay: true,
+ autoPlayInterval: const Duration(seconds: 3),
+ autoPlayAnimationDuration: const Duration(milliseconds: 800),
+ autoPlayCurve: Curves.fastOutSlowIn,
+ enlargeCenterPage: true,
+ scrollDirection: Axis.horizontal,
+ onPageChanged: (int val, reason){
+ setState(() {
+ currentIndex = val;
+ });
+ }
+ ),
+ items: widget.banners.map((i) {
+ return Builder(
+ builder: (BuildContext context) {
+ return CachedNetworkImage(
+ imageUrl: "${i.image}",
+ fit: BoxFit.cover,
+ width: double.infinity,
+ errorWidget: (context, _,err) => Container(color: Colors.grey.shade100,),
+ placeholder: (context,_) => Container(color: Colors.grey.shade100,),
+ );
+ },
+ );
+ }).toList(),
+ ),
+ ),
+ Container(
+ height: 200,
+ width: double.infinity,
+ padding: const EdgeInsets.only(bottom: 8),
+ alignment: Alignment.bottomCenter,
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.end,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ for(int i = 0; i < widget.banners.length; i++)Container(
+ height: 6,
+ width: 6,
+ margin: const EdgeInsets.only(right: 4),
+ decoration: BoxDecoration(
+ shape: BoxShape.circle,
+ color: (currentIndex == i) ? Constants.primaryColor : Colors.transparent,
+ border: Border.all(color: (currentIndex == i) ? Constants.primaryColor : Colors.grey)
+ ),
+ )
+ ],
+ ),
+ )
+ ],
+ ),
+ );
+ }
+}
diff --git a/medcify/lib/pages/main/home/drawer_widget.dart b/medcify/lib/pages/main/home/drawer_widget.dart
new file mode 100644
index 0000000..d9299e5
--- /dev/null
+++ b/medcify/lib/pages/main/home/drawer_widget.dart
@@ -0,0 +1,127 @@
+import 'package:flutter/material.dart';
+import 'package:launch_review/launch_review.dart';
+import 'package:medcify/components/alert.dart';
+import 'package:medcify/navigation/navigation.dart';
+import 'package:medcify/storage/storage.dart';
+import 'package:url_launcher/url_launcher.dart';
+
+class DrawerWidget extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ height: double.infinity,
+ width: MediaQuery.of(context).size.width - 60,
+ color: Colors.white,
+ child: SingleChildScrollView(
+ physics: const BouncingScrollPhysics(),
+ padding: const EdgeInsets.only(top: 50,bottom: 20),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ ListTile(
+ leading: const ImageIcon(AssetImage("assets/images/profile.png")),
+ title: const Text("Change Profile",style: TextStyle(color: Colors.black,fontSize: 14),),
+ onTap: (){
+ Navigation.instance.goBack();
+ Navigation.instance.navigate("/changeProfile");
+ },
+ ),
+ ListTile(
+ leading: const ImageIcon(AssetImage("assets/images/timing.png")),
+ title: const Text("Change Timing",style: TextStyle(color: Colors.black,fontSize: 14),),
+ onTap: (){
+ Navigation.instance.goBack();
+ Navigation.instance.navigate("/changeTiming");
+ },
+ ),
+ ListTile(
+ leading: const ImageIcon(AssetImage("assets/images/upi.png")),
+ title: const Text("UPI Update",style: TextStyle(color: Colors.black,fontSize: 14),),
+ onTap: (){
+ Navigation.instance.goBack();
+ Navigation.instance.navigate("/upi");
+ },
+ ),
+ ListTile(
+ leading: const ImageIcon(AssetImage("assets/images/qr_code.png")),
+ title: const Text("UPI Qr Update",style: TextStyle(color: Colors.black,fontSize: 14),),
+ onTap: (){
+ Navigation.instance.goBack();
+ Navigation.instance.navigate("/upiQr");
+ },
+ ),
+ ListTile(
+ leading: const ImageIcon(AssetImage("assets/images/plan.png")),
+ title: const Text("Plan",style: TextStyle(color: Colors.black,fontSize: 14),),
+ onTap: (){
+ Navigation.instance.goBack();
+ Navigation.instance.navigate("/plan",args: true);
+ },
+ ),
+ ListTile(
+ leading: const ImageIcon(AssetImage("assets/images/delivery.png")),
+ title: const Text("Delivering Pincodes",style: TextStyle(color: Colors.black,fontSize: 14),),
+ onTap: (){
+ Navigation.instance.goBack();
+ Navigation.instance.navigate("/deliveryPincodes");
+ },
+ ),
+ ListTile(
+ leading: const ImageIcon(AssetImage("assets/images/qr_code.png")),
+ title: const Text("View Qr Code",style: TextStyle(color: Colors.black,fontSize: 14),),
+ onTap: () async{
+ Navigation.instance.goBack();
+ Navigation.instance.navigate("/qrcode");
+ },
+ ),
+ ListTile(
+ leading: const ImageIcon(AssetImage("assets/images/store.png")),
+ title: const Text("View Our Store",style: TextStyle(color: Colors.black,fontSize: 14),),
+ onTap: () async{
+ Navigation.instance.goBack();
+ await launch(Storage.instance.storeUrl);
+ },
+ ),
+ ListTile(
+ leading: const ImageIcon(AssetImage("assets/images/share.png")),
+ title: const Text("Share Our App",style: TextStyle(color: Colors.black,fontSize: 14),),
+ onTap: (){
+ Navigation.instance.goBack();
+ LaunchReview.launch();
+ },
+ ),
+ ListTile(
+ leading: const ImageIcon(AssetImage("assets/images/rating.png")),
+ title: const Text("Rate Our App",style: TextStyle(color: Colors.black,fontSize: 14),),
+ onTap: (){
+ Navigation.instance.goBack();
+ LaunchReview.launch();
+ },
+ ),
+ ListTile(
+ leading: const ImageIcon(AssetImage("assets/images/logout.png"),color: Colors.red,),
+ title: const Text("Logout",style: TextStyle(color: Colors.red,fontSize: 14),),
+ onTap: () {
+ Navigation.instance.goBack();
+ AlertX.instance.showAlert(
+ title: "Logout",
+ msg: "Are you sure, Do you want to logout?",
+ positiveButtonText: "Yes",
+ positiveButtonPressed: () async{
+ Navigation.instance.goBack();
+ await Storage.instance.sharedPreferences.clear();
+ Navigation.instance.navigateAndRemoveUntil("/");
+ },
+ negativeButtonText: "No",
+ negativeButtonPressed: (){
+ Navigation.instance.goBack();
+ }
+ );
+ },
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/medcify/lib/pages/main/home/home_bloc.dart b/medcify/lib/pages/main/home/home_bloc.dart
new file mode 100644
index 0000000..6a1e7fc
--- /dev/null
+++ b/medcify/lib/pages/main/home/home_bloc.dart
@@ -0,0 +1,38 @@
+
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:medcify/network/api_provider.dart';
+import 'package:medcify/storage/storage.dart';
+
+import '../../../models/banner_item.dart';
+
+abstract class HomeState{}
+
+class HomeInitial extends HomeState{}
+class HomeLoading extends HomeState{}
+class HomeSuccess extends HomeState{}
+
+class HomeCubit extends Cubit {
+ HomeCubit() : super(HomeInitial());
+ List banners = [];
+ dynamic ordersCount = 0;
+ dynamic salesCount = 0;
+ dynamic visitorsCount = 0;
+ String url = "";
+ String storeName = "";
+ int notificationCount = 0;
+
+ Future fetchHomeData() async{
+ emit(HomeLoading());
+ final response = await ApiProvider.instance.fetchHomeData();
+ banners = response[0].banners;
+ ordersCount = response[1].count;
+ salesCount = response[2].count;
+ visitorsCount = response[3].count;
+ notificationCount = response[5].count;
+ url = response[4].url;
+ storeName = response[4].name;
+ if(url.isNotEmpty)Storage.instance.setStoreUrl(url);
+ emit(HomeSuccess());
+ }
+
+}
\ No newline at end of file
diff --git a/medcify/lib/pages/main/home/home_page.dart b/medcify/lib/pages/main/home/home_page.dart
new file mode 100644
index 0000000..e5d94a0
--- /dev/null
+++ b/medcify/lib/pages/main/home/home_page.dart
@@ -0,0 +1,144 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:medcify/components/loader.dart';
+import 'package:medcify/navigation/navigation.dart';
+import 'package:medcify/pages/main/home/banner_card.dart';
+import 'package:medcify/pages/main/home/drawer_widget.dart';
+import 'package:medcify/pages/main/home/home_bloc.dart';
+import 'package:medcify/pages/main/home/whatsapp_share.dart';
+
+class HomePage extends StatelessWidget {
+ const HomePage({Key? key}) : super(key: key);
+ @override
+ Widget build(BuildContext context) {
+ return BlocProvider(
+ create: (context) => HomeCubit(),
+ child: HomeWidget(),
+ );
+ }
+}
+
+class HomeWidget extends StatelessWidget {
+ late HomeCubit homeCubit;
+
+ Widget overview(String title, dynamic count, Color color, Color lightColor){
+ return Container(
+ decoration: BoxDecoration(
+ color: lightColor,
+ borderRadius: BorderRadius.circular(4),
+ border: Border.all(color:color)
+ ),
+ padding: const EdgeInsets.symmetric(horizontal: 8,vertical: 8),
+ alignment: Alignment.center,
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Text(title,style: TextStyle(color: color,fontWeight: FontWeight.w600,fontSize: 18),),
+ const SizedBox(height: 8,),
+ Text("$count",style: TextStyle(color: color, fontSize: 30, fontWeight: FontWeight.w600),)
+ ],
+ ),
+ );
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ homeCubit = BlocProvider.of(context);
+ homeCubit.fetchHomeData();
+ return Scaffold(
+ backgroundColor: Colors.white,
+ appBar: AppBar(
+ elevation: 0.25,
+ backgroundColor: Colors.white,
+ title: const Text("Home",style: TextStyle(color: Colors.black,fontSize: 17),),
+ iconTheme: const IconThemeData(
+ color: Colors.black
+ ),
+ actions: [
+ BlocBuilder(
+ builder: (context, state){
+ return SizedBox(
+ height: 50,
+ width: 50,
+ child: Stack(
+ children: [
+ Padding(
+ padding: const EdgeInsets.only(right: 16.0),
+ child: IconButton(
+ onPressed: (){
+ Navigation.instance.navigate("/notification");
+ },
+ icon: const Icon(Icons.notifications),
+ ),
+ ),
+ Visibility(
+ visible: state is HomeSuccess && homeCubit.notificationCount > 0,
+ child: Align(
+ alignment: Alignment.topRight,
+ child: Container(
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(30),
+ color: Colors.red
+ ),
+ height: 18,
+ width: 18,
+ margin: const EdgeInsets.only(right: 12,top: 4),
+ alignment: Alignment.center,
+ child: Text((homeCubit.notificationCount > 10) ? "10+" : "${homeCubit.notificationCount}",style: const TextStyle(color: Colors.white, fontWeight: FontWeight.w600, fontSize: 8),),
+ ),
+ ),
+ )
+ ],
+ ),
+ );
+ }
+ )
+ ],
+ ),
+ drawer: DrawerWidget(),
+ body: BlocBuilder(
+ builder: (context, state){
+ if(state is HomeLoading){
+ return const Loader();
+ }else{
+ return SingleChildScrollView(
+ physics: const BouncingScrollPhysics(),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const SizedBox(height: 8,),
+ BannerCard(banners: homeCubit.banners),
+ const SizedBox(height: 18,),
+ const Padding(
+ padding: EdgeInsets.symmetric(horizontal: 16),
+ child: Text("OverView",style: TextStyle(color: Colors.black, fontWeight: FontWeight.w600,fontSize: 17),),
+ ),
+ const SizedBox(height: 16,),
+ GridView(
+ gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
+ crossAxisCount: 2,
+ mainAxisSpacing: 16,
+ crossAxisSpacing: 16,
+ childAspectRatio: 1.25
+ ),
+ shrinkWrap: true,
+ physics: const NeverScrollableScrollPhysics(),
+ padding: const EdgeInsets.symmetric(horizontal: 16),
+ children: [
+ overview("Orders", homeCubit.ordersCount, Colors.blue, Colors.blue.shade50),
+ overview("Sales", homeCubit.salesCount, Colors.purple, Colors.purple.shade50),
+ overview("Visitors", homeCubit.visitorsCount, Colors.red, Colors.red.shade50),
+ ],
+ ),
+ const SizedBox(height: 20,),
+ WhatsappShare(homeCubit.url,homeCubit.storeName),
+ const SizedBox(height: 16,),
+ ],
+ ),
+ );
+ }
+ },
+ ),
+ );
+ }
+}
diff --git a/medcify/lib/pages/main/home/whatsapp_share.dart b/medcify/lib/pages/main/home/whatsapp_share.dart
new file mode 100644
index 0000000..f9e6096
--- /dev/null
+++ b/medcify/lib/pages/main/home/whatsapp_share.dart
@@ -0,0 +1,62 @@
+import 'package:flutter/material.dart';
+import 'package:medcify/storage/storage.dart';
+import 'package:url_launcher/url_launcher.dart';
+
+import '../../../constants.dart';
+
+class WhatsappShare extends StatelessWidget {
+ String url;
+ String name;
+ WhatsappShare(this.url, this.name);
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ decoration: BoxDecoration(
+ color: Constants.primaryColor,
+ borderRadius: BorderRadius.circular(4)
+ ),
+ margin: const EdgeInsets.symmetric(horizontal: 16),
+ padding: const EdgeInsets.symmetric(horizontal: 16,vertical: 24),
+ width: double.infinity,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: () async{
+ await launch(Storage.instance.storeUrl);
+ },
+ child: Center(
+ child: Text("Your URL: $url",style: const TextStyle(color: Colors.white, height: 1.6,fontSize: 16),textAlign: TextAlign.center,)
+ ),
+ ),
+ const SizedBox(height: 16,),
+ const Text("Share your online pharmacy with everyone and get orders",style: TextStyle(color: Colors.white, height: 1.6,fontSize: 16, fontWeight: FontWeight.w500),textAlign: TextAlign.center,),
+ const SizedBox(height: 16,),
+ MaterialButton(
+ onPressed: () async{
+ String text = "Hello, $name has launched its online pharmacy which lets you order medicines online and get doorstep delivery or self pickup option. To order medicines online , go to ";
+ await launch("https://wa.me/?text=$text$url");
+ },
+ elevation: 0,
+ height: 50,
+ minWidth: double.infinity,
+ color: Colors.white,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(30)
+ ),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: const [
+ ImageIcon(AssetImage("assets/images/whatsapp.png"),color: Colors.green,),
+ SizedBox(width: 8,),
+ Text("Share On Whatsapp",style: TextStyle(color: Colors.green,fontWeight: FontWeight.w600, fontSize: 15),)
+ ],
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/medcify/lib/pages/main/main_page.dart b/medcify/lib/pages/main/main_page.dart
new file mode 100644
index 0000000..3353706
--- /dev/null
+++ b/medcify/lib/pages/main/main_page.dart
@@ -0,0 +1,87 @@
+import 'package:flutter/material.dart';
+import 'package:medcify/pages/main/home/home_page.dart';
+import 'package:medcify/pages/main/orders/orders_page.dart';
+import 'package:medcify/pages/main/products/products_page.dart';
+import 'package:medcify/pages/main/settings/settings_page.dart';
+import 'package:medcify/storage/storage.dart';
+
+import '../../constants.dart';
+import '../../network/api_provider.dart';
+import 'firebase_push_notification.dart';
+
+class MainPage extends StatefulWidget {
+ const MainPage({Key? key}) : super(key: key);
+
+ @override
+ State createState() => _MainPageState();
+}
+
+class _MainPageState extends State {
+ int currentIndex = 0;
+
+ Widget bodyWidget(){
+ if(currentIndex == 0){
+ return const HomePage();
+ }else if(currentIndex == 1){
+ return const OrdersPage();
+ }else if(currentIndex == 2){
+ return const ProductsPage();
+ }
+ return const SettingsPage();
+ }
+
+ Future initializeFirebase() async{
+ String token = await FirebaseX.instance.firebaseMessaging.getToken() ?? "";
+ await ApiProvider.instance.updateFcm(token);
+ await FirebaseX.instance.onFirebaseMessagingInitialize();
+ FirebaseX.instance.onRegisterFirebaseNotificationTopics(["general"]);
+ }
+
+ @override
+ initState(){
+ Storage.instance.fetchRazorPayData();
+ initializeFirebase();
+ super.initState();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ bottomNavigationBar: BottomNavigationBarTheme(
+ data: const BottomNavigationBarThemeData(
+ backgroundColor: Colors.white
+ ),
+ child: BottomNavigationBar(
+ type: BottomNavigationBarType.fixed,
+ currentIndex: currentIndex,
+ selectedItemColor: Constants.primaryColor,
+ unselectedItemColor: const Color(0xff8F9BB3),
+ onTap: (int index){
+ setState(() {
+ currentIndex = index;
+ });
+ },
+ items: const [
+ BottomNavigationBarItem(
+ icon: ImageIcon(AssetImage("assets/images/home.png")),
+ label: "Home"
+ ),
+ BottomNavigationBarItem(
+ icon: ImageIcon(AssetImage("assets/images/orders.png")),
+ label: "Orders"
+ ),
+ BottomNavigationBarItem(
+ icon: ImageIcon(AssetImage("assets/images/medicine.png")),
+ label: "Products"
+ ),
+ BottomNavigationBarItem(
+ icon: ImageIcon(AssetImage("assets/images/setting.png")),
+ label: "Settings"
+ ),
+ ],
+ ),
+ ),
+ body: bodyWidget(),
+ );
+ }
+}
diff --git a/medcify/lib/pages/main/notification/notification_bloc.dart b/medcify/lib/pages/main/notification/notification_bloc.dart
new file mode 100644
index 0000000..f1c7064
--- /dev/null
+++ b/medcify/lib/pages/main/notification/notification_bloc.dart
@@ -0,0 +1,76 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:fluttertoast/fluttertoast.dart';
+import 'package:medcify/models/notification_item.dart';
+import 'package:medcify/models/order_item.dart';
+import 'package:medcify/network/api_provider.dart';
+
+import '../../../components/alert.dart';
+import '../../../constants.dart';
+import '../../../helpers.dart';
+import '../../../models/banner_item.dart';
+import '../../../models/medicine_item.dart';
+import '../../../navigation/navigation.dart';
+
+abstract class NotificationState{}
+
+class NotificationInitial extends NotificationState{}
+class NotificationLoading extends NotificationState{}
+class NotificationSuccess extends NotificationState{}
+class NotificationFailure extends NotificationState{
+ String error;
+ NotificationFailure(this.error);
+}
+
+class NotificationCubit extends Cubit {
+ NotificationCubit() : super(NotificationInitial());
+ List notifications = [];
+
+ Future fetchNotifications() async{
+ emit(NotificationLoading());
+ final response = await ApiProvider.instance.fetchNotifications();
+ if(response.status ?? false){
+ notifications = response.notifications ?? [];
+ emit(NotificationSuccess());
+ }else{
+ emit(NotificationFailure(response.message ?? "Something went wrong"));
+ }
+ }
+
+ Future removeNotification(int id) async{
+ Navigation.instance.navigate("/loading");
+ final response = await ApiProvider.instance.removeNotification("$id");
+ Navigation.instance.goBack();
+ if(response.status ?? false){
+ showToast("Notification removed successfully");
+ fetchNotifications();
+ }else{
+ showAlert(response.message ?? "Something went wrong");
+ }
+ }
+
+ void showToast(String msg) {
+ Fluttertoast.showToast(
+ msg: msg,
+ toastLength: Toast.LENGTH_SHORT,
+ gravity: ToastGravity.BOTTOM,
+ timeInSecForIosWeb: 1,
+ backgroundColor: Colors.grey.shade200,
+ textColor: Colors.black,
+ fontSize: 14.0
+ );
+ }
+
+ void showAlert(String err){
+ AlertX.instance.showAlert(
+ title: "Error",
+ msg: err,
+ positiveButtonText: "Done",
+ positiveButtonPressed: (){
+ Navigation.instance.goBack();
+ }
+ );
+ }
+
+}
\ No newline at end of file
diff --git a/medcify/lib/pages/main/notification/notification_card.dart b/medcify/lib/pages/main/notification/notification_card.dart
new file mode 100644
index 0000000..b9a5042
--- /dev/null
+++ b/medcify/lib/pages/main/notification/notification_card.dart
@@ -0,0 +1,52 @@
+import 'package:cached_network_image/cached_network_image.dart';
+import 'package:flutter/material.dart';
+import 'package:intl/intl.dart';
+import 'package:medcify/components/button.dart';
+import 'package:medcify/constants.dart';
+import 'package:medcify/models/medicine_item.dart';
+import 'package:medcify/models/notification_item.dart';
+import 'package:medcify/models/order_item.dart';
+
+import '../../../components/alert.dart';
+import '../../../navigation/navigation.dart';
+
+class NotificationCard extends StatelessWidget {
+ NotificationItem item;
+ Function(int) removeNotification;
+ NotificationCard({required this.item,required this.removeNotification});
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(8),
+ color: Colors.white,
+ border: Border.all(color: Colors.grey.shade200)
+ ),
+ margin: const EdgeInsets.only(bottom: 12),
+ padding: const EdgeInsets.symmetric(horizontal: 16,vertical: 16),
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Expanded(
+ child: Text(item.message ?? "",style: const TextStyle(color: Colors.black, fontSize: 13,height: 1.8),)
+ ),
+ GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: (){
+ removeNotification(item.id ?? 0);
+ },
+ child: Container(
+ decoration: BoxDecoration(
+ color: Colors.red.shade50,
+ borderRadius: BorderRadius.circular(30)
+ ),
+ padding: const EdgeInsets.all(8),
+ child: const Icon(Icons.close_rounded,color: Colors.red, size: 16,),
+ ),
+ )
+ ],
+ ),
+ );
+ }
+}
diff --git a/medcify/lib/pages/main/notification/notification_page.dart b/medcify/lib/pages/main/notification/notification_page.dart
new file mode 100644
index 0000000..7cd5b7c
--- /dev/null
+++ b/medcify/lib/pages/main/notification/notification_page.dart
@@ -0,0 +1,72 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:medcify/components/loader.dart';
+import 'package:medcify/constants.dart';
+import 'package:medcify/models/notification_item.dart';
+import 'package:medcify/navigation/navigation.dart';
+import 'package:medcify/pages/main/notification/notification_card.dart';
+
+import 'notification_bloc.dart';
+
+class NotificationPage extends StatelessWidget {
+ const NotificationPage({Key? key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ backgroundColor: Colors.white,
+ elevation: 0.25,
+ automaticallyImplyLeading: false,
+ title: const Text("Notifications",style: TextStyle(color: Colors.black,fontSize: 17),),
+ leading: IconButton(
+ onPressed: (){
+ Navigation.instance.goBack();
+ },
+ icon: const Icon(Icons.keyboard_backspace_rounded,color: Colors.black,),
+ ),
+ ),
+ body: BlocProvider(
+ create: (context) => NotificationCubit(),
+ child: ProductWidget(),
+ ),
+ );
+ }
+}
+
+class ProductWidget extends StatelessWidget {
+ late NotificationCubit notificationCubit;
+
+ @override
+ Widget build(BuildContext context) {
+ notificationCubit = BlocProvider.of(context);
+ notificationCubit.fetchNotifications();
+ return BlocBuilder(
+ builder: (context, state) {
+ if(state is NotificationLoading){
+ return const Loader();
+ }else if(state is NotificationFailure){
+ return Container(
+ alignment: Alignment.center,
+ margin: const EdgeInsets.symmetric(horizontal: 24),
+ child: Text(state.error,style: TextStyle(color: Colors.grey.shade800, fontSize: 13, height: 1.6),),
+ );
+ }else{
+ return (notificationCubit.notifications.isEmpty) ? Container(
+ alignment: Alignment.center,
+ margin: const EdgeInsets.symmetric(horizontal: 24),
+ child: Text("No notifications found",style: TextStyle(color: Colors.grey.shade800, fontSize: 13),),
+ ) : ListView.builder(
+ itemCount: notificationCubit.notifications.length,
+ padding: const EdgeInsets.only(top: 16,bottom: 80,left: 16,right: 16),
+ physics: const BouncingScrollPhysics(),
+ itemBuilder: (context, pos){
+ NotificationItem notification = notificationCubit.notifications[pos];
+ return NotificationCard(item: notification,removeNotification: notificationCubit.removeNotification,);
+ },
+ );
+ }
+ }
+ );
+ }
+}
diff --git a/medcify/lib/pages/main/orders/order_detail_bloc.dart b/medcify/lib/pages/main/orders/order_detail_bloc.dart
new file mode 100644
index 0000000..26c2d31
--- /dev/null
+++ b/medcify/lib/pages/main/orders/order_detail_bloc.dart
@@ -0,0 +1,80 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:fluttertoast/fluttertoast.dart';
+import 'package:medcify/network/api_provider.dart';
+
+import '../../../components/alert.dart';
+import '../../../models/order_detail_item.dart';
+import '../../../navigation/navigation.dart';
+
+abstract class OrderDetailState{}
+
+class OrderDetailInitial extends OrderDetailState{}
+class OrderDetailLoading extends OrderDetailState{}
+class OrderDetailSuccess extends OrderDetailState{}
+class OrderDetailFailure extends OrderDetailState{
+ String error;
+ OrderDetailFailure(this.error);
+}
+
+class OrderDetailCubit extends Cubit {
+ OrderDetailCubit() : super(OrderDetailInitial());
+ List products = [];
+ TextEditingController amountController = TextEditingController();
+ TextEditingController discountController = TextEditingController();
+
+ Future