animation;
7 | const AnimatedListItem(
8 | {required this.item, required this.animation, Key? key})
9 | : super(key: key);
10 |
11 | @override
12 | Widget build(BuildContext context) => SizeTransition(
13 | sizeFactor: animation,
14 | child: buildItem(),
15 | );
16 |
17 | Widget buildItem() => SizedBox(
18 | height: 90,
19 | child: Container(
20 | margin: const EdgeInsets.symmetric(
21 | horizontal: 5,
22 | vertical: 5,
23 | ),
24 | decoration: const BoxDecoration(
25 | color: Colors.orange,
26 | borderRadius: BorderRadius.only(
27 | topLeft: Radius.circular(7),
28 | bottomLeft: Radius.circular(7),
29 | ),
30 | boxShadow: [
31 | BoxShadow(
32 | color: Colors.black12,
33 | offset: Offset(5, 5),
34 | blurRadius: 2,
35 | ),
36 | ],
37 | ),
38 | child: Container(
39 | margin: const EdgeInsets.only(
40 | left: 3,
41 | ),
42 | color: Colors.white,
43 | child: Padding(
44 | padding: const EdgeInsets.symmetric(horizontal: 20),
45 | child: Row(
46 | children: [
47 | CircleAvatar(
48 | radius: 20,
49 | backgroundColor: Colors.white,
50 | backgroundImage: AssetImage(
51 | item['HP_Gender']
52 | ? 'assets/images/male.png'
53 | : 'assets/images/female.png',
54 | ),
55 | ),
56 | const SizedBox(
57 | width: 10,
58 | ),
59 | Expanded(
60 | child: Column(
61 | mainAxisAlignment: MainAxisAlignment.center,
62 | crossAxisAlignment: CrossAxisAlignment.start,
63 | children: [
64 | Text(
65 | item['HP_Name'],
66 | style: const TextStyle(
67 | fontSize: 15,
68 | fontWeight: FontWeight.bold,
69 | ),
70 | ),
71 | const SizedBox(
72 | height: 2,
73 | ),
74 | Row(
75 | children: [
76 | Text(
77 | item['HP_Gender'] ? 'Male' : 'Female',
78 | style: const TextStyle(
79 | fontSize: 12,
80 | color: Colors.black87,
81 | ),
82 | ),
83 | const SizedBox(
84 | width: 5,
85 | ),
86 | Text(
87 | '- ${item['HP_Age']} years old',
88 | style: const TextStyle(
89 | fontSize: 12,
90 | color: Colors.black87,
91 | ),
92 | ),
93 | ],
94 | )
95 | ],
96 | ),
97 | ),
98 | const SizedBox(
99 | child: Icon(Icons.swipe, color: kColorPrimary,),
100 | ),
101 | ],
102 | ),
103 | ),
104 | ),
105 | ),
106 | );
107 | }
108 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # doctor-consultation-app
2 |
3 |
4 |
5 | [](https://github.com/madeeldev/flutter-doctor-consultation-app/graphs/commit-activity)
6 | [](https://github.com/madeeldev/)
7 | [](https://flutter.dev)
8 | [](https://flutter.dev)
9 | [](https://flutter.dev)
10 |
11 |
12 |
13 | Hypertension Awareness & Management application built with Flutter
14 |
15 | ## ❤️ Found this project useful?
16 | If you found this project useful, then please consider giving it a ⭐️ on Github and sharing it with your friends via social media.
17 |
18 | ## Download the APK
19 |
20 | In Github, Go to [flutter-doctor-consultation-app releases](https://github.com/madeeldev/flutter-doctor-consultation-app/releases), choose the version (latest is recommanded) and download the .apk file.
21 |
22 | ### Install the APK
23 |
24 | On your Android phone:
25 | 1. Go to **Settings** > **security** > **install unknown apps**.
26 | 2. Go to **files** and enable **Allow from this source**.
27 | *Don't forget to disable it when you have finished*
28 | 3. Exit **Settings** and go to **files**.
29 | 4. Go to **Downloads**, select the **.apk** and click **install**.
30 | 6. The app is now installed on your phone.
31 |
32 | ## Getting Started
33 |
34 | This project is a starting point for a Flutter application.
35 |
36 | To clone this project,
37 | open your terminal or cmd
38 |
39 | ```
40 | cd folder/to/clone-into/
41 | ```
42 |
43 | ```
44 | git clone https://github.com/madeeldev/flutter-doctor-consultation-app.git
45 | ```
46 |
47 | Then
48 | locate the project on your system and open with android studio or Vscode or intellij IDE.
49 |
50 | To Run:
51 | ```
52 | C:\path\to\project> flutter pub get
53 |
54 | ```
55 | then run:
56 |
57 | ```
58 | C:\path\to\project> flutter run
59 |
60 | ```
61 |
62 | ## Build release version
63 |
64 | ```
65 | run: flutter build e.g flutter build ios
66 | ```
67 |
68 | ## Resources
69 |
70 | A few resources to get you started if this is your first Flutter project:
71 |
72 | - [Lab: Write your first Flutter app](https://flutter.io/docs/get-started/codelab)
73 | - [Cookbook: Useful Flutter samples](https://flutter.io/docs/cookbook)
74 |
75 | For help getting started with Flutter, view our
76 | [online documentation](https://flutter.io/docs), which offers tutorials,
77 | samples, guidance on mobile development, and a full API reference.
78 |
79 | ## Prerequisites
80 |
81 | What things you need to run the app
82 |
83 | ```
84 | * Android Studio/Vscode/Intellij IDE
85 | * Flutter SDK
86 | * Android SDK
87 | * Windows/MacBook
88 | ```
89 |
90 | ## How to contribute
91 |
92 | - **Fork the repository and clone it locally**. Connect your local to the original “upstream” repository by adding it as a remote. Pull in changes from “upstream” often so that you stay up to date so that when you submit your pull request, merge conflicts will be less likely. (See more detailed instructions here.)
93 | - **Create a branch** for your edits.
94 | - **Reference any relevant issues** or supporting documentation in your PR (for example, “Closes #37.”)
95 | - **Include screenshots of the before and after** if your changes include differences in HTML/CSS. Drag and drop the images into the body of your pull request.
96 | - **Test your changes!** Run your changes against any existing tests if they exist and create new ones when needed. Whether tests exist or not, make sure your changes don’t break the existing project.
97 | - **Contribute in the style of the project** to the best of your abilities. This may mean using indents, semi-colons or comments differently than you would in your own repository, but makes it easier for the maintainer to merge, others to understand and maintain in the future.
98 |
99 | ## Built With
100 |
101 | - [Android Studio](https://developer.android.com/studio/install) - How to install Android Studio
102 | - [Flutter](https://flutter.io) - Flutter Official website
103 |
104 | ## Author 😊
105 |
106 | **Adeel Safdar**
107 |
108 | - [**Linkedin**](https://www.linkedin.com/in/madeeldev/)
109 | - [**Email**](mailto:adeelsafdar.dev@gmail.com)
110 |
111 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_hami
2 | description: A new Flutter project.
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `flutter pub publish`. This is preferred for private packages.
6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
7 |
8 | # The following defines the version and build number for your application.
9 | # A version number is three numbers separated by dots, like 1.2.43
10 | # followed by an optional build number separated by a +.
11 | # Both the version and the builder number may be overridden in flutter
12 | # build by specifying --build-name and --build-number, respectively.
13 | # In Android, build-name is used as versionName while build-number used as versionCode.
14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
16 | # Read more about iOS versioning at
17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
18 | version: 1.0.0+1
19 |
20 | environment:
21 | sdk: ">=2.17.5 <3.0.0"
22 |
23 | # Dependencies specify other packages that your package needs in order to work.
24 | # To automatically upgrade your package dependencies to the latest versions
25 | # consider running `flutter pub upgrade --major-versions`. Alternatively,
26 | # dependencies can be manually updated by changing the version numbers below to
27 | # the latest version available on pub.dev. To see which dependencies have newer
28 | # versions available, run `flutter pub outdated`.
29 | dependencies:
30 | flutter:
31 | sdk: flutter
32 |
33 |
34 | # The following adds the Cupertino Icons font to your application.
35 | # Use with the CupertinoIcons class for iOS style icons.
36 | cupertino_icons: ^1.0.2
37 | email_validator: ^2.0.1
38 | connectivity_plus: ^2.3.6
39 | provider: ^6.0.3
40 | internet_connection_checker: ^0.0.1+4
41 | http: ^0.13.4
42 | fluttertoast: ^8.0.9
43 | shared_preferences: ^2.0.15
44 | flutter_slidable: ^2.0.0
45 | badges: ^2.0.3
46 | flutter_datetime_picker: ^1.5.1
47 | intl: ^0.17.0
48 | flutter_tabler_icons: ^1.1.1
49 | video_player: ^2.4.6
50 | cached_network_image: ^3.2.1
51 | photo_view: ^0.14.0
52 | date_format: ^2.0.6
53 | flutter_platform_widgets: ^2.0.0
54 | image_picker: ^0.8.5+3
55 | flutter_html: ^3.0.0-alpha.5
56 | firebase_core: ^1.21.0
57 | firebase_messaging: ^12.0.3
58 | flutter_local_notifications: ^9.8.0+1
59 | flutter_launcher_icons: ^0.10.0
60 |
61 | flutter_icons:
62 | android: true
63 | ios: true
64 | image_path: "assets/images/header.png"
65 |
66 |
67 | dev_dependencies:
68 | flutter_test:
69 | sdk: flutter
70 |
71 | # The "flutter_lints" package below contains a set of recommended lints to
72 | # encourage good coding practices. The lint set provided by the package is
73 | # activated in the `analysis_options.yaml` file located at the root of your
74 | # package. See that file for information about deactivating specific lint
75 | # rules and activating additional ones.
76 | flutter_lints: ^2.0.0
77 |
78 | # For information on the generic Dart part of this file, see the
79 | # following page: https://dart.dev/tools/pub/pubspec
80 |
81 | # The following section is specific to Flutter packages.
82 | flutter:
83 |
84 | # The following line ensures that the Material Icons font is
85 | # included with your application, so that you can use the icons in
86 | # the material Icons class.
87 | uses-material-design: true
88 |
89 | # To add assets to your application, add an assets section, like this:
90 | assets:
91 | - assets/images/
92 |
93 | # An image asset can refer to one or more resolution-specific "variants", see
94 | # https://flutter.dev/assets-and-images/#resolution-aware
95 |
96 | # For details regarding adding assets from package dependencies, see
97 | # https://flutter.dev/assets-and-images/#from-packages
98 |
99 | # To add custom fonts to your application, add a fonts section here,
100 | # in this "flutter" section. Each entry in this list should have a
101 | # "family" key with the font family name, and a "fonts" key with a
102 | # list giving the asset and other descriptors for the font. For
103 | # example:
104 | fonts:
105 | - family: Jameel-Noori-Nastaleeq
106 | fonts:
107 | - asset: assets/fonts/Jameel-Noori-Nastaleeq-Regular.ttf
108 | # - asset: fonts/Schyler-Italic.ttf
109 | # style: italic
110 | # - family: Trajan Pro
111 | # fonts:
112 | # - asset: fonts/TrajanPro.ttf
113 | # - asset: fonts/TrajanPro_Bold.ttf
114 | # weight: 700
115 | #
116 | # For details regarding fonts from package dependencies,
117 | # see https://flutter.dev/custom-fonts/#from-packages
118 |
--------------------------------------------------------------------------------
/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - connectivity_plus (0.0.1):
3 | - Flutter
4 | - ReachabilitySwift
5 | - Firebase/CoreOnly (9.4.0):
6 | - FirebaseCore (= 9.4.0)
7 | - Firebase/Messaging (9.4.0):
8 | - Firebase/CoreOnly
9 | - FirebaseMessaging (~> 9.4.0)
10 | - firebase_core (1.21.0):
11 | - Firebase/CoreOnly (= 9.4.0)
12 | - Flutter
13 | - firebase_messaging (12.0.3):
14 | - Firebase/Messaging (= 9.4.0)
15 | - firebase_core
16 | - Flutter
17 | - FirebaseCore (9.4.0):
18 | - FirebaseCoreDiagnostics (~> 9.0)
19 | - FirebaseCoreInternal (~> 9.0)
20 | - GoogleUtilities/Environment (~> 7.7)
21 | - GoogleUtilities/Logger (~> 7.7)
22 | - FirebaseCoreDiagnostics (9.5.0):
23 | - GoogleDataTransport (< 10.0.0, >= 9.1.4)
24 | - GoogleUtilities/Environment (~> 7.7)
25 | - GoogleUtilities/Logger (~> 7.7)
26 | - nanopb (< 2.30910.0, >= 2.30908.0)
27 | - FirebaseCoreInternal (9.5.0):
28 | - "GoogleUtilities/NSData+zlib (~> 7.7)"
29 | - FirebaseInstallations (9.5.0):
30 | - FirebaseCore (~> 9.0)
31 | - GoogleUtilities/Environment (~> 7.7)
32 | - GoogleUtilities/UserDefaults (~> 7.7)
33 | - PromisesObjC (~> 2.1)
34 | - FirebaseMessaging (9.4.0):
35 | - FirebaseCore (~> 9.0)
36 | - FirebaseInstallations (~> 9.0)
37 | - GoogleDataTransport (< 10.0.0, >= 9.1.4)
38 | - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
39 | - GoogleUtilities/Environment (~> 7.7)
40 | - GoogleUtilities/Reachability (~> 7.7)
41 | - GoogleUtilities/UserDefaults (~> 7.7)
42 | - nanopb (< 2.30910.0, >= 2.30908.0)
43 | - Flutter (1.0.0)
44 | - flutter_local_notifications (0.0.1):
45 | - Flutter
46 | - fluttertoast (0.0.2):
47 | - Flutter
48 | - Toast
49 | - FMDB (2.7.5):
50 | - FMDB/standard (= 2.7.5)
51 | - FMDB/standard (2.7.5)
52 | - GoogleDataTransport (9.2.0):
53 | - GoogleUtilities/Environment (~> 7.7)
54 | - nanopb (< 2.30910.0, >= 2.30908.0)
55 | - PromisesObjC (< 3.0, >= 1.2)
56 | - GoogleUtilities/AppDelegateSwizzler (7.7.0):
57 | - GoogleUtilities/Environment
58 | - GoogleUtilities/Logger
59 | - GoogleUtilities/Network
60 | - GoogleUtilities/Environment (7.7.0):
61 | - PromisesObjC (< 3.0, >= 1.2)
62 | - GoogleUtilities/Logger (7.7.0):
63 | - GoogleUtilities/Environment
64 | - GoogleUtilities/Network (7.7.0):
65 | - GoogleUtilities/Logger
66 | - "GoogleUtilities/NSData+zlib"
67 | - GoogleUtilities/Reachability
68 | - "GoogleUtilities/NSData+zlib (7.7.0)"
69 | - GoogleUtilities/Reachability (7.7.0):
70 | - GoogleUtilities/Logger
71 | - GoogleUtilities/UserDefaults (7.7.0):
72 | - GoogleUtilities/Logger
73 | - image_picker_ios (0.0.1):
74 | - Flutter
75 | - nanopb (2.30909.0):
76 | - nanopb/decode (= 2.30909.0)
77 | - nanopb/encode (= 2.30909.0)
78 | - nanopb/decode (2.30909.0)
79 | - nanopb/encode (2.30909.0)
80 | - path_provider_ios (0.0.1):
81 | - Flutter
82 | - PromisesObjC (2.1.1)
83 | - ReachabilitySwift (5.0.0)
84 | - shared_preferences_ios (0.0.1):
85 | - Flutter
86 | - sqflite (0.0.2):
87 | - Flutter
88 | - FMDB (>= 2.7.5)
89 | - Toast (4.0.0)
90 | - video_player_avfoundation (0.0.1):
91 | - Flutter
92 |
93 | DEPENDENCIES:
94 | - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
95 | - firebase_core (from `.symlinks/plugins/firebase_core/ios`)
96 | - firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
97 | - Flutter (from `Flutter`)
98 | - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
99 | - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
100 | - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
101 | - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
102 | - shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`)
103 | - sqflite (from `.symlinks/plugins/sqflite/ios`)
104 | - video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/ios`)
105 |
106 | SPEC REPOS:
107 | trunk:
108 | - Firebase
109 | - FirebaseCore
110 | - FirebaseCoreDiagnostics
111 | - FirebaseCoreInternal
112 | - FirebaseInstallations
113 | - FirebaseMessaging
114 | - FMDB
115 | - GoogleDataTransport
116 | - GoogleUtilities
117 | - nanopb
118 | - PromisesObjC
119 | - ReachabilitySwift
120 | - Toast
121 |
122 | EXTERNAL SOURCES:
123 | connectivity_plus:
124 | :path: ".symlinks/plugins/connectivity_plus/ios"
125 | firebase_core:
126 | :path: ".symlinks/plugins/firebase_core/ios"
127 | firebase_messaging:
128 | :path: ".symlinks/plugins/firebase_messaging/ios"
129 | Flutter:
130 | :path: Flutter
131 | flutter_local_notifications:
132 | :path: ".symlinks/plugins/flutter_local_notifications/ios"
133 | fluttertoast:
134 | :path: ".symlinks/plugins/fluttertoast/ios"
135 | image_picker_ios:
136 | :path: ".symlinks/plugins/image_picker_ios/ios"
137 | path_provider_ios:
138 | :path: ".symlinks/plugins/path_provider_ios/ios"
139 | shared_preferences_ios:
140 | :path: ".symlinks/plugins/shared_preferences_ios/ios"
141 | sqflite:
142 | :path: ".symlinks/plugins/sqflite/ios"
143 | video_player_avfoundation:
144 | :path: ".symlinks/plugins/video_player_avfoundation/ios"
145 |
146 | SPEC CHECKSUMS:
147 | connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e
148 | Firebase: 7703fc4022824b6d6db1bf7bea58d13b8e17ec46
149 | firebase_core: c1cdfa024dc7f3d1ba8055a2ae323dba3dce4fa1
150 | firebase_messaging: b65dacd4de1b469893dea0d754b1947f45ef4f7a
151 | FirebaseCore: 9a2b10270a854731c4d4d8a97d0aa8380ec3458d
152 | FirebaseCoreDiagnostics: 17cbf4e72b1dbd64bfdc33d4b1f07bce4f16f1d8
153 | FirebaseCoreInternal: 50a8e39cae8abf72d5145d07ea34c3244f70862b
154 | FirebaseInstallations: 41f811b530c41dd90973d0174381cdb3fcb5e839
155 | FirebaseMessaging: 4e220eddd356181469ba2ec5f7d5fafbc2312841
156 | Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
157 | flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
158 | fluttertoast: 16fbe6039d06a763f3533670197d01fc73459037
159 | FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
160 | GoogleDataTransport: 1c8145da7117bd68bbbed00cf304edb6a24de00f
161 | GoogleUtilities: e0913149f6b0625b553d70dae12b49fc62914fd1
162 | image_picker_ios: b786a5dcf033a8336a657191401bfdf12017dabb
163 | nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
164 | path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
165 | PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb
166 | ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
167 | shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad
168 | sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
169 | Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
170 | video_player_avfoundation: e489aac24ef5cf7af82702979ed16f2a5ef84cff
171 |
172 | PODFILE CHECKSUM: fe0e1ee7f3d1f7d00b11b474b62dd62134535aea
173 |
174 | COCOAPODS: 1.11.3
175 |
--------------------------------------------------------------------------------
/lib/services/member_service.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 | import 'dart:io';
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_hami/config.dart';
5 | import 'package:http/http.dart' as http;
6 |
7 | class MemberService {
8 | Future onSaveMember(
9 | Map member, String mobile) async {
10 | try {
11 | final postUrl =
12 | '${Config.saveMemberUrl}?mobile=$mobile&pName=${member['HP_Name']}&age=${member['HP_Age']}&gender=${member['HP_Gender']}&api_key=${Config.apiKey}';
13 | final res = await http.get(Uri.parse(postUrl), headers: {
14 | "Accept": "application/json",
15 | "Access-Control-Allow-Origin": "*"
16 | });
17 | if (res.statusCode == 200) {
18 | final result = json.decode(res.body)['hAMI_AP_Result'][0]['remarks'];
19 | return result;
20 | } else {
21 | return 'Server error occurred';
22 | }
23 | } on SocketException catch (_) {
24 | return 'Internet is not connected';
25 | }
26 | }
27 |
28 | Future