From 90d84b7cc77ff1ee67b42ede07162431dc35117d Mon Sep 17 00:00:00 2001 From: eld_master Date: Mon, 24 Feb 2025 16:45:02 +0900 Subject: [PATCH] =?UTF-8?q?=ED=94=8C=EB=9E=98=EC=9D=B4=EC=8A=A4=ED=86=A0?= =?UTF-8?q?=EC=96=B4=20=EC=83=88=20=EC=95=B1=EC=9C=BC=EB=A1=9C=20=EC=B6=9C?= =?UTF-8?q?=EC=8B=9C,=20=EC=84=A4=EB=AC=B8=EC=A1=B0=EC=82=AC=20=ED=82=A4?= =?UTF-8?q?=EB=B3=B4=EB=93=9C=20=EC=95=88=EB=8B=AB=ED=9E=98=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- android/app/build.gradle | 8 +- android/app/google-services.json | 21 ++- android/app/src/main/AndroidManifest.xml | 3 +- .../com/example/allscore_app/MainActivity.kt | 2 +- lib/survey/survey_page.dart | 126 ++++++++++-------- pubspec.yaml | 4 +- 7 files changed, 90 insertions(+), 76 deletions(-) diff --git a/README.md b/README.md index 9c3dd5e..10ad78e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# allscore_app +# allscore A new Flutter project. diff --git a/android/app/build.gradle b/android/app/build.gradle index 5ef6650..7d36696 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -13,15 +13,15 @@ if (keystorePropertiesFile.exists()) { } android { - namespace = "com.allscore_app" + namespace = "com.allscore" compileSdkVersion 34 defaultConfig { - applicationId "com.allscore_app" + applicationId "com.allscore" minSdkVersion 23 targetSdkVersion 34 - versionCode 19 - versionName "1.1.0" + versionCode 22 + versionName "1.1.3" } signingConfigs { release { diff --git a/android/app/google-services.json b/android/app/google-services.json index fbdbbf0..531b02d 100644 --- a/android/app/google-services.json +++ b/android/app/google-services.json @@ -8,33 +8,33 @@ "client": [ { "client_info": { - "mobilesdk_app_id": "1:452355332155:android:152995468604d10d13e41e", + "mobilesdk_app_id": "1:452355332155:android:fc70db048c73540513e41e", "android_client_info": { - "package_name": "com.allscore_app" + "package_name": "com.allscore" } }, "oauth_client": [ { - "client_id": "452355332155-jcnodseb4t2bgq2mo1a6h3bn4ncp5o8c.apps.googleusercontent.com", + "client_id": "452355332155-ebejb33njonaur1f9q9kmeto910kcgd4.apps.googleusercontent.com", "client_type": 1, "android_info": { - "package_name": "com.allscore_app", - "certificate_hash": "0f5c83605937a4aa55d6097253473b285bb18418" + "package_name": "com.allscore", + "certificate_hash": "95d683602b8d4c6194547823c2001007408e40ec" } }, { - "client_id": "452355332155-lqtr6l2qg0pn62vi5nccggldmcm21qdl.apps.googleusercontent.com", + "client_id": "452355332155-g7hpnu3lk0ak9nb9nr174ms81ch319ha.apps.googleusercontent.com", "client_type": 1, "android_info": { - "package_name": "com.allscore_app", + "package_name": "com.allscore", "certificate_hash": "761f8d2290ebb091acdf3cf8400df65245047fb8" } }, { - "client_id": "452355332155-t29ceato8o62c9kq9drefe7b6hd1ka1d.apps.googleusercontent.com", + "client_id": "452355332155-u1vmjm9o71aogjfe2qnonmkoe6s5gso0.apps.googleusercontent.com", "client_type": 1, "android_info": { - "package_name": "com.allscore_app", + "package_name": "com.allscore", "certificate_hash": "83fe36945bd0f037a7b934f9737a4fa94c47872d" } }, @@ -64,8 +64,7 @@ } ] } - }, - "admob_app_id": "ca-app-pub-6461991944599918~9492697896" + } } ], "configuration_version": "1" diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 618ed29..5dcd9b2 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,10 +1,11 @@ + package="com.allscore"> + { _onExitSurvey(); return false; }, - child: Scaffold( - appBar: AppBar( - leadingWidth: 120, - leading: TextButton( - onPressed: _onExitSurvey, - child: const Text( - 'Stop Survey', - style: TextStyle(color: Colors.white), - ), - ), - title: Text('Survey ($pageNumber/$totalPage)'), - backgroundColor: Colors.black, - ), - body: SingleChildScrollView( - child: Container( - alignment: Alignment.center, - padding: const EdgeInsets.all(16), - child: Column( - children: [ - // 현재 페이지의 질문 - Text( - questionText, - style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold), - textAlign: TextAlign.center, - ), - const SizedBox(height: 24), - // 페이지별 UI - _buildSurveyPage(_currentIndex), - ], - ), - ), - ), - bottomNavigationBar: Container( - color: Colors.white, - padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), - child: Row( - children: [ - if (_currentIndex > 0) - Expanded( - child: ElevatedButton( - style: ElevatedButton.styleFrom(backgroundColor: Colors.grey), - onPressed: _onPrev, - child: const Text('Previous'), - ), - ), - if (_currentIndex > 0) const SizedBox(width: 8), - Expanded( - child: ElevatedButton( - style: ElevatedButton.styleFrom(backgroundColor: Colors.black), - onPressed: (_currentIndex < totalPage - 1) ? _onNext : _onSubmit, - child: Text( - (_currentIndex < totalPage - 1) ? 'Next' : 'Submit', - style: const TextStyle(color: Colors.white), - ), - ), + child: GestureDetector( // 화면 터치시 키보드 닫기 위해 추가 + onTap: () { + FocusScope.of(context).unfocus(); + }, + child: Scaffold( + resizeToAvoidBottomInset: true, // 키보드가 올라올 때 화면 리사이즈 + appBar: AppBar( + leadingWidth: 120, + leading: TextButton( + onPressed: _onExitSurvey, + child: const Text( + 'Stop Survey', + style: TextStyle(color: Colors.white), ), - ], + ), + title: Text('Survey ($pageNumber/$totalPage)'), + backgroundColor: Colors.black, + ), + body: SingleChildScrollView( + child: Container( + alignment: Alignment.center, + padding: const EdgeInsets.all(16), + child: Column( + children: [ + Text( + questionText, + style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold), + textAlign: TextAlign.center, + ), + const SizedBox(height: 24), + _buildSurveyPage(_currentIndex), + const SizedBox(height: 100), // 하단 여백 추가 + ], + ), + ), + ), + bottomNavigationBar: Padding( + padding: EdgeInsets.only( + bottom: MediaQuery.of(context).viewInsets.bottom, // 키보드 높이만큼 버튼도 올라가도록 + ), + child: Container( + color: Colors.white, + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), + child: Row( + children: [ + if (_currentIndex > 0) + Expanded( + child: ElevatedButton( + style: ElevatedButton.styleFrom(backgroundColor: Colors.grey), + onPressed: _onPrev, + child: const Text('Previous'), + ), + ), + if (_currentIndex > 0) const SizedBox(width: 8), + Expanded( + child: ElevatedButton( + style: ElevatedButton.styleFrom(backgroundColor: Colors.black), + onPressed: (_currentIndex < totalPage - 1) ? _onNext : _onSubmit, + child: Text( + (_currentIndex < totalPage - 1) ? 'Next' : 'Submit', + style: const TextStyle(color: Colors.white), + ), + ), + ), + ], + ), + ), ), ), ), @@ -329,6 +339,8 @@ class _SurveyPageState extends State { labelText: 'Your country', border: OutlineInputBorder(), ), + textInputAction: TextInputAction.done, + onSubmitted: (_) => FocusScope.of(context).unfocus(), ), ], ); @@ -351,6 +363,8 @@ class _SurveyPageState extends State { labelText: 'Age', border: OutlineInputBorder(), ), + textInputAction: TextInputAction.done, + onSubmitted: (_) => FocusScope.of(context).unfocus(), ), ], ); diff --git a/pubspec.yaml b/pubspec.yaml index cdefc97..2b4b4db 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ -name: allscore_app +name: allscore description: "A new Flutter project." publish_to: 'none' -version: 1.1.0+19 +version: 1.1.3+22 environment: sdk: '>=3.5.3 <4.0.0' flutter: ">=3.16.0"