From ae7d0ab04dcdf9489bb63c8c46f37762baa66a5c Mon Sep 17 00:00:00 2001 From: Shantnu Agarwal Date: Sat, 4 Jul 2020 13:34:57 +0530 Subject: [PATCH] code 8, v1.6.0 --release --- .flutter-plugins-dependencies | 2 +- android/app/build.gradle | 4 +- lib/ResultPage.dart | 159 +++++++++++++++++++--------------- 3 files changed, 94 insertions(+), 71 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index c4f00d8..3e5bef4 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"firebase_core","path":"C:\\\\Users\\\\vidit\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core-0.4.5\\\\","dependencies":[]},{"name":"firebase_database","path":"C:\\\\Users\\\\vidit\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_database-3.1.6\\\\","dependencies":["firebase_core"]},{"name":"firebase_messaging","path":"C:\\\\Users\\\\vidit\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_messaging-6.0.16\\\\","dependencies":[]},{"name":"flutter_webview_plugin","path":"C:\\\\Users\\\\vidit\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_webview_plugin-0.3.11\\\\","dependencies":[]},{"name":"shared_preferences","path":"C:\\\\Users\\\\vidit\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences-0.5.7+3\\\\","dependencies":[]},{"name":"url_launcher","path":"C:\\\\Users\\\\vidit\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher-5.4.11\\\\","dependencies":[]}],"android":[{"name":"firebase_core","path":"C:\\\\Users\\\\vidit\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core-0.4.5\\\\","dependencies":[]},{"name":"firebase_database","path":"C:\\\\Users\\\\vidit\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_database-3.1.6\\\\","dependencies":["firebase_core"]},{"name":"firebase_messaging","path":"C:\\\\Users\\\\vidit\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_messaging-6.0.16\\\\","dependencies":[]},{"name":"flutter_webview_plugin","path":"C:\\\\Users\\\\vidit\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_webview_plugin-0.3.11\\\\","dependencies":[]},{"name":"shared_preferences","path":"C:\\\\Users\\\\vidit\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences-0.5.7+3\\\\","dependencies":[]},{"name":"url_launcher","path":"C:\\\\Users\\\\vidit\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher-5.4.11\\\\","dependencies":[]}],"macos":[{"name":"firebase_core","path":"C:\\\\Users\\\\vidit\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core-0.4.5\\\\","dependencies":[]},{"name":"shared_preferences_macos","path":"C:\\\\Users\\\\vidit\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_macos-0.0.1+10\\\\","dependencies":[]},{"name":"url_launcher_macos","path":"C:\\\\Users\\\\vidit\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_macos-0.0.1+7\\\\","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"firebase_core_web","path":"C:\\\\Users\\\\vidit\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core_web-0.1.1+2\\\\","dependencies":[]},{"name":"shared_preferences_web","path":"C:\\\\Users\\\\vidit\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_web-0.1.2+7\\\\","dependencies":[]},{"name":"url_launcher_web","path":"C:\\\\Users\\\\vidit\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_web-0.1.2\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_database","dependencies":["firebase_core"]},{"name":"firebase_messaging","dependencies":[]},{"name":"flutter_webview_plugin","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_macos"]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]}],"date_created":"2020-07-04 01:44:08.630303","version":"1.17.3"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"firebase_core","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core-0.4.5\\\\","dependencies":[]},{"name":"firebase_database","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_database-3.1.6\\\\","dependencies":["firebase_core"]},{"name":"firebase_messaging","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_messaging-6.0.16\\\\","dependencies":[]},{"name":"flutter_webview_plugin","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_webview_plugin-0.3.11\\\\","dependencies":[]},{"name":"shared_preferences","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences-0.5.7+3\\\\","dependencies":[]},{"name":"url_launcher","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher-5.4.11\\\\","dependencies":[]}],"android":[{"name":"firebase_core","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core-0.4.5\\\\","dependencies":[]},{"name":"firebase_database","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_database-3.1.6\\\\","dependencies":["firebase_core"]},{"name":"firebase_messaging","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_messaging-6.0.16\\\\","dependencies":[]},{"name":"flutter_webview_plugin","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_webview_plugin-0.3.11\\\\","dependencies":[]},{"name":"shared_preferences","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences-0.5.7+3\\\\","dependencies":[]},{"name":"url_launcher","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher-5.4.11\\\\","dependencies":[]}],"macos":[{"name":"firebase_core","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core-0.4.5\\\\","dependencies":[]},{"name":"shared_preferences_macos","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_macos-0.0.1+10\\\\","dependencies":[]},{"name":"url_launcher_macos","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_macos-0.0.1+7\\\\","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"firebase_core_web","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core_web-0.1.1+2\\\\","dependencies":[]},{"name":"shared_preferences_web","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_web-0.1.2+7\\\\","dependencies":[]},{"name":"url_launcher_web","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_web-0.1.2\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_database","dependencies":["firebase_core"]},{"name":"firebase_messaging","dependencies":[]},{"name":"flutter_webview_plugin","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_macos"]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]}],"date_created":"2020-07-04 13:29:07.591080","version":"1.20.0-2.0.pre"} \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index 8200802..b07e11b 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -13,12 +13,12 @@ if (flutterRoot == null) { def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { - flutterVersionCode = '7' + flutterVersionCode = '8' } def flutterVersionName = localProperties.getProperty('flutter.versionName') if (flutterVersionName == null) { - flutterVersionName = '1.5.0' + flutterVersionName = '1.6.0' } apply plugin: 'com.android.application' diff --git a/lib/ResultPage.dart b/lib/ResultPage.dart index b97f952..951d0de 100644 --- a/lib/ResultPage.dart +++ b/lib/ResultPage.dart @@ -27,9 +27,9 @@ class _ResultPageState extends State { res = prefs.get('result'); if (res == 'dep') { msg = - "According to our screening assessment you have symptoms suggestive of Depression."; - - endMsg = + "According to our screening assessment you have symptoms suggestive of Depression."; + + endMsg = "Sadness is a human emotion that all people feel at certain times during their lives." " Feeling sad is a natural reaction to situations that cause emotional upset or pain." " Depression differs from sadness. The feelings you have will affect all aspects of your life." @@ -44,49 +44,51 @@ class _ResultPageState extends State { }) }; } else if (res == 'anx') { - msg ="According to our screening assessment you may have symptoms suggestive of an Anxiety disorder."; - - endMsg = "It’s normal to feel Anxious when faced with a potentially dangerous situation or worrying triggers," + msg = + "According to our screening assessment you may have symptoms suggestive of an Anxiety disorder."; + + endMsg = + "It’s normal to feel Anxious when faced with a potentially dangerous situation or worrying triggers," " our “nerves” become the warning signs we need to navigate the dangers around us." " The problem starts when you start experiencing these symptoms constantly or intensely even without a present danger."; - + title = "Anxiety"; imgUrl = "assets/icon_anxiety.png"; words = { "Anxiety": HighlightedWord( - textStyle: - TextStyle(color: Color(0xffF65158), fontWeight: FontWeight.bold), + textStyle: TextStyle( + color: Color(0xffF65158), fontWeight: FontWeight.bold), onTap: () { print("Anxiety"); }) }; } else if (res == 'str') { - msg = "Our screening assessment suggests that you may be under stress, which you’re unable to cope with."; - - endMsg ="We all go through stress in our lives, it’s important for your growth." + msg = + "Our screening assessment suggests that you may be under stress, which you’re unable to cope with."; + + endMsg = + "We all go through stress in our lives, it’s important for your growth." " Stress becomes a problem when it exceeds your ability to cope with them."; - + title = "Stress"; imgUrl = "assets/icon_stress.png"; words = { "Stress": HighlightedWord( - textStyle: - TextStyle(color: Color(0xffF65158), fontWeight: FontWeight.bold), + textStyle: TextStyle( + color: Color(0xffF65158), fontWeight: FontWeight.bold), onTap: () { print("Stress"); }) }; - } else if(res == 'no issues'){ - msg ="According to our screening assessment you don’t have any symptoms suggestive of Depression, anxiety disorder or stress."; - + } else if (res == 'no issues') { + msg = + "According to our screening assessment you don’t have any symptoms suggestive of depression, anxiety disorder or stress."; + endMsg = - "Strong mental health isn’t just the absence of mental health problems. Being mentally or emotionally healthy is much more than being free of depression, anxiety, or other psychological issues. Rather than the absence of mental illness, mental health refers to the presence of positive characteristics."; + "Strong mental health isn’t just the absence of mental health problems. Being mentally or emotionally healthy is much more than being free of depression, anxiety, or other psychological issues. Rather than the absence of mental illness, mental health refers to the presence of positive characteristics."; title = "No Issues"; imgUrl = "assets/icon_no problems.png"; - } - else { - - } + } else {} msgList[0] = title; msgList[1] = msg; msgList[2] = endMsg; @@ -125,7 +127,7 @@ class _ResultPageState extends State { return Column( children: [ SizedBox( - height: MediaQuery.of(context).size.height/10 , + height: MediaQuery.of(context).size.height / 10, ), Text( "Your result is loading....", @@ -147,10 +149,15 @@ class _ResultPageState extends State { Stack( children: [ Padding( - padding: EdgeInsets.only(top: MediaQuery.of(context).size.height/15), + padding: EdgeInsets.only( + top: MediaQuery.of(context).size.height / + 15), child: Container( - padding: EdgeInsets.symmetric(horizontal: MediaQuery.of(context).size.width/50, - ), + padding: EdgeInsets.symmetric( + horizontal: + MediaQuery.of(context).size.width / + 50, + ), decoration: BoxDecoration( color: Color(0xffEFBFC3), borderRadius: BorderRadius.circular(20), @@ -158,37 +165,45 @@ class _ResultPageState extends State { child: Column( children: [ SizedBox( - height: MediaQuery.of(context).size.height/10 , + height: MediaQuery.of(context) + .size + .height / + 10, ), Text( snapshot.data[1], // words: highlightMap.getMap, textAlign: TextAlign.center, style: TextStyle( - fontWeight: FontWeight.bold, + fontWeight: FontWeight.bold, fontSize: MediaQuery.of(context) - .size - .width / + .size + .width / 24, color: Colors.black), ), SizedBox( - height: MediaQuery.of(context).size.height / 50, + height: MediaQuery.of(context) + .size + .height / + 50, ), Text( - snapshot.data[2], - // words: highlightMap.getMap, + snapshot.data[2], + // words: highlightMap.getMap, textAlign: TextAlign.center, style: TextStyle( - fontSize: MediaQuery.of(context) - .size - .width / + .size + .width / 24, color: Colors.black), ), SizedBox( - height: MediaQuery.of(context).size.height / 40, + height: MediaQuery.of(context) + .size + .height / + 40, ), ], ), @@ -201,9 +216,11 @@ class _ResultPageState extends State { children: [ Container( child: Image( - image: AssetImage(snapshot.data[3]), - height: MediaQuery.of(context).size.height / 6, - )), + image: AssetImage(snapshot.data[3]), + height: + MediaQuery.of(context).size.height / + 6, + )), ], ), ), @@ -237,41 +254,47 @@ class _ResultPageState extends State { ), ), SizedBox( - height: MediaQuery.of(context).size.height / 30, + height: MediaQuery.of(context).size.height / 30, ), RichText( - textAlign:TextAlign.center, - text: TextSpan( - children: [ - TextSpan( - text: "To read more about common Mental Health Problems, we have a specially curated list of Articles you might benefit from. ", - style: TextStyle( - fontSize: - MediaQuery.of(context).size.width / 24, - color: Color(0xff28324B), - ), - ), - TextSpan( - text:"Click Here!", - recognizer: TapGestureRecognizer()..onTap = () { - Navigator.push(context, MaterialPageRoute(builder: (context) => ArticlePage())); - }, - style: TextStyle( + textAlign: TextAlign.center, + text: TextSpan(children: [ + TextSpan( + text: + "To read more about common Mental Health Problems, we have a specially curated list of Articles you might benefit from. ", + style: TextStyle( fontSize: - MediaQuery.of(context).size.width / 24, + MediaQuery.of(context).size.width / + 24, color: Color(0xff28324B), - fontWeight: FontWeight.bold, - decoration: TextDecoration.underline), - ), - ] - )), + ), + ), + TextSpan( + text: "Click Here!", + recognizer: TapGestureRecognizer() + ..onTap = () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + ArticlePage())); + }, + style: TextStyle( + fontSize: + MediaQuery.of(context).size.width / + 24, + color: Color(0xff28324B), + fontWeight: FontWeight.bold, + decoration: TextDecoration.underline), + ), + ])), Padding( padding: EdgeInsets.only( top: MediaQuery.of(context).size.height / 30), child: ShowUp( child: Container( height: - MediaQuery.of(context).size.height / 15, + MediaQuery.of(context).size.height / 15, width: MediaQuery.of(context).size.width / 2, child: RaisedButton( // elevation: 10, @@ -293,8 +316,8 @@ class _ResultPageState extends State { "Home", style: TextStyle( fontSize: MediaQuery.of(context) - .size - .width / + .size + .width / 25), ), ),