diff --git a/README.md b/README.md
index c9a4ccd..7827e17 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,28 @@
-# pupmory
\ No newline at end of file
+

+
+
+
+
+
+
+## ๐ Manual Deployment
+
+Fill out all **curly brackets** in `deploy.sh`.
+
+The following are required:
+- `DB_URL`: Database endpoint
+- `DB_USERNAME`: Database username
+- `DB_PASSWORD`: Database password
+- `MAIL_USERNAME`: Email SMTP username
+- `MAIL_PASSWORD`: Email SMTP password
+- `GPT_KEY`: OpenAI API key
+- `AWS_REGION`: AWS region
+- `S3_BUCKET`: AWS S3 bucket name
+- `S3_ACCESS_KEY`: AWS S3 access key
+- `S3_SECRET_KEY`: AWS S3 secret key
+- `JWT_SECRET`: JWT secret key
+
+Make sure `docker` is installed in your system then execute:
+```
+./deploy.sh
+```
diff --git a/client/lib/check_user.dart b/client/lib/check_user.dart
new file mode 100644
index 0000000..ea26f78
--- /dev/null
+++ b/client/lib/check_user.dart
@@ -0,0 +1,49 @@
+/// ์ฎ๊ธฐ๊ธฐ ๊ฐ๋ฅ
+import 'package:flutter/material.dart';
+import 'dart:async';
+import 'package:flutter/cupertino.dart';
+//import 'package:client/memorial/watch_others.dart';
+import 'conversation/intro/intro.dart';
+import 'home.dart';
+import 'memorial/memorial_main.dart';
+import 'memorial/watch_others.dart';
+import 'mypage/mypage_main.dart';
+import 'main.dart' as main;
+import 'screen.dart';
+//import 'memorial/memorial_main0919.dart';
+
+
+class CheckUserPage extends StatefulWidget {
+ const CheckUserPage({super.key, required this.title});
+
+ final String title;
+
+ @override
+ State createState() => _CheckUserPageState();
+}
+
+class _CheckUserPageState extends State {
+
+ @override
+ void initState() {
+ super.initState();
+
+ }
+ int _selectedIndex = 0;
+
+
+
+ // ๋ฉ์ธ ์์ ฏ
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+
+ return Scaffold(
+ body: Container(
+ width: screenSize.width,
+ child: Text("๋ฏธ์ณ๋ ๋ฐ๋์ค~"),
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/client/lib/conversation/early_period/early_coach_mark.dart b/client/lib/conversation/early_period/early_coach_mark.dart
new file mode 100644
index 0000000..d23a522
--- /dev/null
+++ b/client/lib/conversation/early_period/early_coach_mark.dart
@@ -0,0 +1,215 @@
+import 'dart:async';
+import 'dart:convert';
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/services.dart';
+import 'package:client/conversation/early_period/memory2.dart';
+import 'package:client/style.dart';
+
+
+/// ์ด๊ธฐ_์ฝ์น๋งํฌ
+class EarlyMarkCoachPage extends StatefulWidget {
+
+ static Future navigatorPush(BuildContext context) async {
+ return Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (_) => EarlyMarkCoachPage(),
+ ),
+ );
+ }
+
+ @override
+ _EarlyMarkCoachPageState createState() => _EarlyMarkCoachPageState();
+}
+
+class _EarlyMarkCoachPageState extends State {
+
+ FocusNode _focusNode = FocusNode();
+
+ @override
+ void initState() {
+ super.initState();
+ _focusNode.addListener(_onFocusChange);
+ }
+
+ void _onFocusChange() {
+ if (_focusNode.hasFocus) {
+ // ํค๋ณด๋ ์ฌ๋ฆฌ๊ธฐ
+ FocusScope.of(context).requestFocus(_focusNode);
+ }
+ }
+
+ @override
+ void dispose() async {
+ super.dispose();
+ }
+
+ int nextPage = 0;
+
+ List questions0 =[
+ "๋ค๋ฅธ ์ฌ๋๋ค์\n๊ธฐ์ตํ ๊ฐ๋ฅผ ๊ตฌ๊ฒฝํ ์ ์์ต๋๋ค.",
+ "ํํฐ๋ก ๋์ ๋น์ทํ ์ฌ๋๋ค์\n์๊ธฐ๋ฅผ ๋ค์ด๋ณด์ผ์.",
+ "๋์ ์์ฒญํ๊ธฐ:\n๋ค๋ฅธ ๋ฐ๋ ค์ธ์๊ฒ\n๋์์ ์์ฒญํ ์ ์์ต๋๋ค.",
+ "๋์ ๋ณด๋ด๊ธฐ:\n๋ค๋ฅธ ๋ฐ๋ ค์ธ์ด ๋์์ ์์ฒญํ๋ฉด\n๋์์ ๋ณด๋ผ์ ์์ต๋๋ค.\n๊ฐ์ ์ ๊ต๋ฅํ๊ฑฐ๋ ์ ๋ณด๋ฅผ ๋๋์ด๋ณด์ธ์!",
+ ];
+
+ int nextQuestion = 0;
+
+
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+ return
+ Container(
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.topRight,
+ end: Alignment.bottomLeft,
+ colors: [
+ Color(0xffE4ECFF),
+ Color(0xffA2BEFF),
+ ],
+ )
+ ),
+ child: GestureDetector(
+ onTap: (){
+ print(nextQuestion);
+ if(nextPage == 3){
+
+ } else if(nextPage < 3){
+ nextPage++;
+ }
+
+ setState(() {
+ });
+ },
+ child: Scaffold(
+ backgroundColor: Colors.transparent,
+ appBar: AppBar(
+ //title: Text("๊ธฐ์ตํ ๊ฐ", style: TextStyle(fontSize:16, color: Colors.white ),),
+ //centerTitle: true,
+ backgroundColor: Colors.transparent,
+ elevation: 0.0,
+ automaticallyImplyLeading: false,
+ ),extendBodyBehindAppBar: true,
+
+ body:
+ Container(
+ width: screenSize.width,
+ child: Column(
+ children: [
+ Stack(
+ children: [
+
+ if(nextPage == 0)...[
+ Padding(padding: EdgeInsets.only(left: 6, top: 145),
+ child: Container(
+ width: 260,
+ height: 575,
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(24.0),
+ child: Image.asset('assets/images/conversation/early/screen01.png',
+ fit: BoxFit.fill,)
+ ),
+ ),
+ ),
+ ] else if(nextPage == 1)...[
+ Padding(padding: EdgeInsets.only(left: 6, top: 145),
+ child: Container(
+ width: 260,
+ height: 575,
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(24.0),
+ child: Image.asset('assets/images/conversation/early/screen02.png',
+ fit: BoxFit.fill,)
+ ),
+ ),
+ ),
+ ] else if(nextPage == 2)...[
+ Padding(padding: EdgeInsets.only(left:6, top: 145),
+ child: Container(
+ width: 260,
+ height: 575,
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(24.0),
+ child: Image.asset('assets/images/conversation/early/screen03.png',
+ fit: BoxFit.fill,)
+ ),
+ ),
+ ),
+ ] else if(nextPage == 3)...[
+ Padding(padding: EdgeInsets.only(left: 6, top: 145),
+ child: Container(
+ width: 260,
+ height: 575,
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(24.0),
+ child: Image.asset('assets/images/conversation/early/screen04.png',
+ fit: BoxFit.fill,)
+ ),
+ ),
+ ),
+ ],
+
+ Padding(padding: EdgeInsets.only(left: 120, top: 706),
+ child: Container(
+ width: 40,
+ height: 2,
+ child: Container(
+ width: 40, height: 2,
+ color: Colors.white,
+ )
+ ),
+ ),
+ ],
+ )
+ ],
+ ),
+ ),
+
+ bottomSheet: Padding(
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).viewInsets.bottom * 0.001),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ if(nextPage == 3)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ // ์ด๊ธฐ2๋ก ์ด๋
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => Memory2Page()));
+ },
+ child: Text("๋ค์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ ],
+ ),
+ ),
+
+ ),
+ )
+
+ );
+
+ }
+}
diff --git a/client/lib/conversation/early_period/farewell.dart b/client/lib/conversation/early_period/farewell.dart
new file mode 100644
index 0000000..b2fb0ab
--- /dev/null
+++ b/client/lib/conversation/early_period/farewell.dart
@@ -0,0 +1,1591 @@
+import 'dart:async';
+import 'dart:convert';
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:client/screen.dart';
+import 'package:http/http.dart' as http;
+import 'package:client/progressbar/animation_progressbar.dart';
+import 'package:client/sign/sign_in.dart';
+import 'package:client/style.dart';
+import 'package:intl/intl.dart';
+import 'package:just_audio/just_audio.dart';
+import 'package:flutter_gif/flutter_gif.dart';
+import 'package:client/home.dart' as home;
+import 'package:client/sign/sign_in.dart' as sign_in;
+import 'package:client/main.dart'as main;
+
+/// ์ด๊ธฐ๋ํ-๊ธฐ์ต
+
+AudioPlayer player2 = AudioPlayer();
+
+late FlutterGifController controller1, controller2, controller3;
+
+List voice =[
+ "assets/voice/early/farewell/farewell1.mp3",
+ "assets/voice/early/farewell/farewell2.mp3",
+ "assets/voice/early/farewell/farewell_modi.mp3",
+ "assets/voice/early/farewell/farewell4.mp3",
+ "assets/voice/early/farewell/farewell5.mp3",
+ "assets/voice/early/farewell/farewell6.mp3",
+ "",
+ "assets/voice/early/farewell/farewell7.mp3",
+ "assets/voice/early/farewell/farewell8.mp3",
+ "assets/voice/early/farewell/farewell9.mp3",
+ "",
+ "assets/voice/early/farewell/farewell10.mp3",
+ "assets/voice/early/farewell/farewell11.mp3",
+ "assets/voice/early/farewell/farewell12.mp3",
+];
+
+List yesVoice =[
+ "assets/voice/early/farewell/regyes1.mp3",
+ "assets/voice/early/farewell/regyes2.mp3",
+ "assets/voice/early/farewell/regyes3.mp3",
+ "assets/voice/early/farewell/regyes4.mp3",
+ "assets/voice/early/farewell/regyes5.mp3",
+ "assets/voice/early/farewell/regyes6.mp3",
+ "assets/voice/early/farewell/regyes7.mp3",
+ "assets/voice/early/farewell/regyes8.mp3",
+ "assets/voice/early/farewell/regyes9.mp3",
+];
+
+List noVoice =[
+ "assets/voice/early/farewell/regno1.mp3",
+ "assets/voice/early/farewell/regno2.mp3",
+ "assets/voice/early/farewell/regno3.mp3",
+ "assets/voice/early/farewell/regno4.mp3",
+ "assets/voice/early/farewell/regno5.mp3",
+ "assets/voice/early/farewell/regno6.mp3",
+ "assets/voice/early/farewell/regno7.mp3",
+ "assets/voice/early/farewell/regno8.mp3",
+ "assets/voice/early/farewell/regno9.mp3",
+ "assets/voice/early/farewell/regno10.mp3",
+ "assets/voice/early/farewell/regno11.mp3",
+ "assets/voice/early/farewell/regno12.mp3",
+];
+
+List endVoice =[
+ "assets/voice/early/farewell/endfarewell1.mp3",
+ "assets/voice/early/farewell/endfarewell2.mp3",
+ "assets/voice/early/farewell/endfarewell3.mp3",
+ "assets/voice/intro/intro2_8.mp3",
+ "",
+ "assets/voice/intro/intro2_9.mp3",
+];
+
+
+class FarewellPage extends StatefulWidget {
+
+ static Future navigatorPush(BuildContext context) async {
+ return Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (_) => FarewellPage(),
+ ),
+ );
+ }
+
+ @override
+ _FarewellPageState createState() => _FarewellPageState();
+}
+
+class _FarewellPageState extends State with TickerProviderStateMixin {
+
+ bool yes = false; // ํํํจ -> ๋ค ์ ํ
+ bool ui_yes = false;
+ bool no = false; //ํํํจ -> ์๋์ค ์ ํ
+ bool ui_no = false;
+
+ bool end = false; // ๋ํ ๋ง๋ฌด๋ฆฌ ๋จ๊ณ ์ง์
+
+ int nextEnd = 0;
+
+ int nextYes = 0;
+ int nextNo = 0;
+
+ bool finish = false; // ๋ฉ๋ชจ๋ฆฌ์ผ ๋ฐ ๋ง๋ฌด๋ฆฌ
+
+ bool selectedWeather = false;
+ bool chooseWeather = false;
+ String whatWeather = "";
+
+ bool selectedLocate = false;
+ bool chooseLocate = false;
+ String whatLocate = "";
+
+ bool selectedHow = false;
+ bool chooseHow = false;
+ String whatHow = "";
+
+ bool selectedNextTime = false;
+ bool chooseTime = false;
+ int whatTime = 0;
+
+ // ํ
์คํธ ์๋ํ
์ปจํธ๋กค๋ฌ๋ฅผ ์์ฑํ์ฌ ํ๋์ ํ ๋น
+ final weatherController = TextEditingController(); // nextQuestion = 7์ผ๋
+ final nextTimeController = TextEditingController(); // nextQuestion = 7์ผ๋
+ final locateController = TextEditingController(); // nextQuestion = 7์ผ๋
+ final regretController = TextEditingController(); // nextQuestion = 7์ผ๋
+ final wantController = TextEditingController(); // nextQuestion = 7์ผ๋
+ final emotionController = TextEditingController(); // nextQuestion = 7์ผ๋
+
+ bool selectRegret = false;
+ bool selectWant = false;
+
+ List questions0 =[
+ "์ข์์, ${home.user}๋.", //0
+ "์ค๋์ ${home.puppy}์์\n์ด๋ณ์ ๋ํด์ ์๊ธฐํด๋ณด๋๋ก ํด์.", //1
+ "๋ง๋จ์ด ์์ผ๋ฉด ์ด๋ณ์ด ์๋ฏ์ด\n์ด๋ณ์ ์๊ฐ์ ๊ฒฐ๊ตญ ์ฐพ์์์. ", //2
+ "์กฐ๊ธ ํ๋ค๋๋ผ๋\n์ด๋ณ์ ์๊ฐ์ ๋ ์ฌ๋ฆฌ๋ฉฐ", //3
+ "${home.user}๋์ ๊ฐ์ ๋ค์\n๊ฐ์ด ์ ๋ฆฌํด๋ณด์์.", //4
+ "์ด๋ณ์ ์๊ฐ,\n๊ทธ๋ ์ ๋ ์จ๋ ์ด๋ ๋์?", //5
+ "์ด๋ณ์ ์๊ฐ,\n๊ทธ๋ ์ ๋ ์จ๋ ์ด๋ ๋์?", //6
+
+ // "์์ด์์ ์ด๋ณ์ ์๊ฐ์\n() ๋ ์ด์๊ตฐ์.", //7
+ //
+ // "์ฐ๋ฆฌ ๋ณดํธ์๋๊ณผ\n์์ด๋", //8
+ // "์ด๋ค ์ฅ์์ ์์๋์? ", //9
+ // "์ด๋ค ์ฅ์์ ์์๋์? ", //10
+ //
+ // "๊ทธ๋ ๊ตฐ์", //11
+ // "()์์", //12
+ //
+ // "์์ด์ ์ด๋ณํ๋\n์๊ฐ์ ๋ ์ฌ๋ฆฌ๋ฉฐ ํํ๋๋ ๋ถ๋ถ์ด ์๋์?", //13
+ ];
+// ๋ค ์ ํ์
+ List questionYes= [
+ "์ด๋ค ๋ถ๋ถ์ด ํํ๊ฐ ๋๋์?",
+ "${home.user}๋์ ์๊ธฐ๋ฅผ ๋ค์ด๋ณด๋",
+ "${home.puppy}๋ฅผ ํฅํ ๊ทธ๋ฆฌ์, ํํโฆ",
+ "๊ทธ ์ธ์๋\n๋ค์ํ ๊ฐ์ ๋ค์ด ๋๊ปด์ง๋ ๊ฒ ๊ฐ์์.",
+ "์ด๋ณ์ ์๊ฐ์ ์ง๋๊ฐ๋๋ผ๋",
+ "${home.puppy}๋ฅผ ๊ทธ๋ฆฌ์ํ๋ ๋ง์์\n์ปค์ ธ๋ง ๊ฐ๋ ๊ทธ๋ฐ ๊ฒ ๊ฐ์์.",
+ "๊ทธ๋๋ ${home.user}๋์ด\n${home.puppy}๋ฅผ ์ถ์ตํ ์ ์๊ฒ",
+ "โ๊ธฐ์ตํ ๊ฐโ์์ ${home.puppy}์์\n์ถ์ต์ ์ ์ฅํด๋ณด๋ ๊ฒ๋",
+ "๊ทธ๋ฆฌ์ด ๋ง์์ ๋ฌ๋๋๋ฐ\n๋์์ด ๋ ๊ฒ ๊ฐ์์.",
+ ];
+
+// ์๋์ค ์ ํ์
+ List questionNo =[
+ "๊ทธ๋ ๋ค๋ฉด, ๋คํ์ด์์.",
+ "์ด๋ณ์ ์๊ฐ์ด ์ง๋๊ณ \nํํ๊ฐ ๋จ์ ์ ์์ง๋ง,",
+ "ํํ๊ฐ ๋จ์ง ์์๋ค๋ฉด\n๊ทธ๊ฒ๋ ์ ๋ง ๋๋จํ ์ผ์ด๋ผ๊ณ ์๊ฐํด์.",
+ "${home.user}๋.\n๋ง์ฝ ${home.puppy}์์",
+ "์ด๋ณ์ ์๊ฐ์ผ๋ก ๋ค์ ๋์๊ฐ๋ค๋ฉด\nํ๊ณ ์ถ์ ๊ฒ๋ค์ด ์์๊น์?",
+ "${home.user}๋์\n์ด๋ณ์ ์๊ฐ์ ์ ๋ณด๋ด์ ๊ฒ ๊ฐ์์.",
+ "๊ทธ ์๊ฐ์ ${home.puppy}๋",
+ "${home.user}๋์ ๋ง์์\n์จ์ ํ ๋๊ผ์๊ฑฐ์์.",
+ "๊ทธ๋ผ์๋ ${home.puppy}๋ฅผ ํฅํ\n๊ทธ๋ฆฌ์ด ๋ง์์",
+ "์ฌ์ ํ๊ฒ ๋จ์์์ง ์์๊น ์ถ์ด์.",
+ "โ๊ธฐ์ตํ ๊ฐโ์์ ${home.puppy}์์\n์ถ์ต์ ์ ์ฅํด๋ณด๋ฉด",
+ "๊ทธ๋ฆฌ์ด ๋ง์์ ๋ฌ๋๋๋ฐ\n ๋์์ด ๋ ๊ฒ ๊ฐ์์.",
+
+ ];
+
+ List questionsEnd =[
+ "${home.user}๋,\n์ ๊ฐ ์ค๋นํ ๋ํ๋ ์ฌ๊ธฐ๊น์ง์์. ",
+ "${home.puppy}์\n์ด๋ณ์ ์๊ฐ์ ๊ธฐ์ตํ๋ฉฐ ",
+ "ํ์ง ๋ชปํ ${home.user}๋์\n๊ฐ์ ๋ค์ด ํ์ด์ก์ผ๋ฉด ํ๋ ๋ฐ๋์ด์์.",
+ "์, ์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+ "์, ์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+ // "๋ค, ${home.user}๋.\n()์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+ // "๋ค, ${home.user}๋.\n()์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+ ];
+
+ String sentDate = "";
+ // ๋ํ ๋จ๊ณ ์ ์ฅ
+ void saveCon(String aToken, String con, String nextcon) async {
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/user/conversation-status';
+
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "conversationStatus": con,
+ "nextConversationAt": nextcon,
+ };
+
+ // ํค๋ ์ ๋ณด ์ค์
+ Map headers = {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ };
+
+ // HTTP GET ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.put(
+ Uri.parse(apiUrl),
+ body: json.encode(data),
+ headers: headers, // ํค๋ ์ถ๊ฐ
+ );
+
+ ///var jsonResponse = utf8.decode(response.bodyBytes);
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ print("๋ํ ๋จ๊ณ ๋ฃ๊ธฐ ์ฑ๊ณต");
+ setState(() {
+ });
+
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ..?: ${response.statusCode}');
+ }
+ }
+
+ FocusNode _focusNode = FocusNode();
+
+ double containerWidth1 = 35.0;
+ void updateContainerWidth1() {
+ // TextField ๋ด์ฉ์ ๊ธธ์ด์ ๋ฐ๋ผ Container ๊ธธ์ด ์
๋ฐ์ดํธ
+ setState(() {
+ containerWidth1 = 35.0 + (nextTimeController.text.length.toDouble() * 5.0);
+ });
+ }
+ double containerWidth2 = 35.0;
+ void updateContainerWidth2() {
+ // TextField ๋ด์ฉ์ ๊ธธ์ด์ ๋ฐ๋ผ Container ๊ธธ์ด ์
๋ฐ์ดํธ
+ setState(() {
+ containerWidth2 = 35.0 + (nextTimeController.text.length.toDouble() * 5.0);
+ });
+ }
+
+ @override
+ void initState() {
+ super.initState();
+
+ main.play = true;
+ main.player.setAsset(main.musics[1]);
+ main.player.play();
+
+ // ์์ ์ ์ฉ
+ for(int i= 0 ; i < voice.length; i++){
+ player2.setAudioSource(AudioSource.uri(
+ Uri.parse(voice[i]))
+ );
+ }
+
+ controller1 = FlutterGifController(vsync: this);
+
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+
+ _callAPI();
+ _focusNode.addListener(_onFocusChange);
+ }
+
+ void _onFocusChange() {
+ if (_focusNode.hasFocus) {
+ // ํค๋ณด๋ ์ฌ๋ฆฌ๊ธฐ
+ FocusScope.of(context).requestFocus(_focusNode);
+ }
+ }
+
+ @override
+ void dispose() async {
+ super.dispose();
+ }
+
+
+ List introText =[];
+ int nextQuestion = 0;
+ int voiceCount = 0;
+
+ int voiceNoCount = 0;
+ int voiceYesCount = 0;
+
+ int voiceEndCount = 0;
+
+
+ void _callAPI() async {
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "stage" : "0",
+ "set" : "0",
+ "lineId" : "0"
+ };
+
+ var url = Uri.parse('http://3.38.1.125:8080/conversation/line'); // ์๋ํฌ์ธํธ URL ์ค์
+
+ try {
+ var response = await http.post(
+ url,
+ body: json.encode(data), // ์์ฒญ ๋ณธ๋ฌธ์ ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ์ธ์ฝ๋ฉํ์ฌ ์ ๋ฌ
+ headers: {'Content-Type': 'application/json',}, // ์์ฒญ ํค๋์ Content-Type ์ค์
+ );
+
+ if (response.statusCode == 200) {
+ // ์๋ต ์ฑ๊ณต ์์ ์ฒ๋ฆฌ
+
+ var jsonResponse = utf8.decode(response.bodyBytes); // ์๋ต ๋ณธ๋ฌธ์ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ // JSON ๊ฐ์ ํ์ฉํ ์ํ๋ ๋์ ์ํ
+ //utf8.decode(jsonResponse);
+ print(jsonResponse);
+
+ List contentList = [];
+
+ List parsedResponse = json.decode(jsonResponse);
+
+ setState(() {
+ for (var item in parsedResponse) {
+ if (item['content'] != null) {
+ introText.add(item['content']);
+ }
+ }
+ });
+
+
+ print(introText);
+
+ print('API ํธ์ถ ์ฑ๊ณต: ${response.statusCode}');
+ } else {
+ // ์์ฒญ ์คํจ ์์ ์ฒ๋ฆฌ
+ print('API ํธ์ถ ์คํจ: ${response.statusCode}');
+ }
+ } catch (e) {
+ // ์์ธ ๋ฐ์ ์์ ์ฒ๋ฆฌ
+ print('API ํธ์ถ ์ค ์์ธ ๋ฐ์: $e');
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+ return
+ Container(
+ color: Color(0xffFCCBCD),
+ child: GestureDetector(
+ onTap: (){
+ print("์ด๊ฑฐ๋ง ์ข ํ์ธ ๋ถํ: " + nextQuestion.toString());
+
+ if(nextQuestion < 6){
+ nextQuestion++; // ์ธํธ๋ก ์์ ํ count
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 1){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 2){
+ Timer(Duration(milliseconds: 5500), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 3){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 4){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 5){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 6){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(nextQuestion == 6){
+ // ์ด๋ค ๋ ์จ?
+ }
+ else if(nextQuestion>6 && nextQuestion<10){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 8){
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 9){
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(nextQuestion == 10){
+ // ์ด๋์ ์์๋์ง?
+ }
+ else if(nextQuestion >10 && nextQuestion <13){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 12){
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 13){
+ Timer(Duration(milliseconds: 5000), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(nextQuestion == 13){
+ // ํํ๋๋ ๋ถ๋ถ?
+ }
+ // ์ฌ๊ธฐ์ ๋ถํฐ ํํ์ ๋ํด์
+ else if(yes && nextYes == 0){
+
+ }
+ else if(yes && (nextYes > 0 && nextYes < 8) ){
+ nextYes++;
+ player2.setAsset(yesVoice[voiceYesCount]);
+ voiceYesCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ if(nextYes == 2){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextYes == 3){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextYes == 4){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextYes == 5){
+ Timer(Duration(milliseconds: 5000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextYes == 6){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextYes == 7){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextYes == 8){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(no && nextNo < 4){
+ nextNo++;
+ player2.setAsset(noVoice[voiceNoCount]);
+ voiceNoCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextNo == 1){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextNo == 2){
+ Timer(Duration(milliseconds: 5000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextNo == 3){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextNo == 4){
+ Timer(Duration(milliseconds: 5000), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(no && nextNo == 4){
+ }
+ else if(no && (nextNo > 4 && nextNo < 11)){
+ nextNo++;
+ player2.setAsset(noVoice[voiceNoCount]);
+ voiceNoCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextNo == 6){
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextNo == 7){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextNo == 8){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextNo == 9){
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextNo == 10){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextNo == 11){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(yes && nextYes == 8){
+ nextYes++;
+ end = true;
+ player2.setAsset(endVoice[voiceEndCount]);
+ voiceEndCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ else if(no && nextNo == 11){
+ nextNo++;
+ end = true;
+ player2.setAsset(endVoice[voiceEndCount]);
+ voiceEndCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ else if(end && nextEnd < 4){
+ nextEnd++;
+ player2.setAsset(endVoice[voiceEndCount]);
+ voiceEndCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextEnd == 1){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextEnd == 2){
+ Timer(Duration(milliseconds: 5000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextEnd == 3){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(end && nextEnd == 4){
+ // ์ธ์ ๋ง๋ ๊น์
+ }
+ else if(end && (nextEnd < 6 && nextEnd >4)){
+ nextEnd++;
+ player2.setAsset(endVoice[voiceEndCount]);
+ voiceEndCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextEnd == 6){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(end && nextEnd == 6){
+ // ํ๋จ ๋ฒํผ
+ }
+
+
+ setState(() {
+ });
+ },
+ child: Scaffold(
+ backgroundColor: Colors.transparent,
+ appBar: AppBar(
+ //title: Text("๊ธฐ์ตํ ๊ฐ", style: TextStyle(fontSize:16, color: Colors.white ),),
+ //centerTitle: true,
+ leading: IconButton(
+ icon: SvgPicture.asset(
+ 'assets/images/conversation/home_icon.svg',
+ ),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ backgroundColor: Colors.transparent,
+ elevation: 0.0,
+ ),
+ //extendBodyBehindAppBar: true,
+ body:
+ SingleChildScrollView(
+ child: Container(
+ child: Column(
+ children: [
+ SizedBox(height: 3,),
+ Container(
+ width: screenSize.width,
+ height: 25,
+ child: Padding(
+ padding: EdgeInsets.only( left:16, right: 16),
+ child: Center(
+ child: FAProgressBar(
+ currentValue: 40,
+ size: 5,
+ backgroundColor: Colors.white,
+ )
+ ),
+ ),
+ ),
+ Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children:[
+ SizedBox(
+ height: 10,
+ ),
+ Stack(
+ children: [
+ Container(
+ height: 157,
+ width: screenSize.width,
+ child:
+ Stack(
+ children: [
+ Center(child: SvgPicture.asset('assets/images/conversation/bubble.svg',fit: BoxFit.fill,),),
+ Container(
+ padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 12, ),
+ child: Center(
+ child: Column(
+ children: [
+ if(yes == false && no == false)...[
+ if(questions0[nextQuestion].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ questions0[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ questions0[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+ ]
+ // ํํ ๋ค
+ else if (yes && end == false) ...[
+ if(questionYes[nextYes].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ questionYes[nextYes],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ questionYes[nextYes],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+ // ํํ ์๋์ค
+ ] else if (no && end == false) ...[
+ if(questionNo[nextNo].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ questionNo[nextNo],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ questionNo[nextNo],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+ ] else if(end)...[
+ if(questionsEnd[nextEnd].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ questionsEnd[nextEnd],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ questionsEnd[nextEnd],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+ ]
+ ],
+ )
+ )
+ ),
+ ],
+ )
+ ),
+ // ๋ฌด์ง ์์น
+ if(nextQuestion < 6 || (nextQuestion>6 && nextQuestion<10) || (nextQuestion > 10 && nextQuestion < 13))...[
+ Stack(
+ children: [
+ // ์ ์ ์์น
+ Column(
+ children: [
+ SizedBox(height: 420,),
+ Container(
+ child: SvgPicture.asset(
+ 'assets/images/conversation/user7.svg',
+ height: 282,
+ width: screenSize.width,
+ ),
+ ),
+ ],
+ ),
+ Column(
+ children: [
+ SizedBox(height: 144,),
+ Container(
+ width: screenSize.width,
+ height: 375,
+ child:
+ Stack(
+ children: [
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_ear.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base.gif', fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base_eye.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child:GifImage(
+ controller: controller1,
+ image: const AssetImage("assets/images/conversation/gif/muji_mouth1.gif"),
+ ),
+ // Image.asset('assets/images/conversation/gif/muji_mouth1.gif', fit: BoxFit.cover,),
+ )
+ ],
+ )
+
+ // SvgPicture.asset(
+ // 'assets/images/conversation/con_muji.svg', fit: BoxFit.cover,
+ // ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ]
+ else if(nextQuestion == 6)...[
+ Padding(
+ padding: EdgeInsets.only(top:175, left:45),
+ child: Container(
+ width: 275,
+ height: 120,
+ child: Column(
+ children: [
+ Row(
+ children: [
+ SizedBox(width: 75,),
+ Container(width: containerWidth1,
+ child: TextField(
+ style: textStyle.inputfield,
+ onTap: (){
+ chooseWeather = true;
+ whatWeather = weatherController.text;
+ setState(() {
+ });
+ },
+ onChanged: (text){
+ updateContainerWidth1();
+ selectedWeather = true;
+ whatWeather = weatherController.text;
+ },
+ controller: weatherController,
+ decoration: InputDecoration(
+ hintText: '์ด๋ค',
+ suffixStyle: TextStyle(color: Color(0xff83A8FF), fontSize: 20,),
+ hintStyle: textStyle.field,
+ counterText:'',
+ ),
+ maxLength: 10,
+ ),),
+ Text("๋ ์จ์์ด์.", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 20, fontWeight: FontWeight.w500, color: Colors.black),),
+ ],),
+ SizedBox(height: 15,),
+ // DateFormat('MM/dd HH:mm').format(DateTime.parse(parsedResponseHR[index]['createdAt']))
+ // DateFormat('MM/dd HH:mm').format(DateTime.now().add(Duration(hours: whatTime)))
+ Text("10์ ์ด๋ด", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffAAAAAA)),),
+
+ ],),
+ ),
+ ),
+ ]
+ else if(nextQuestion == 10)...[
+ Padding(
+ padding: EdgeInsets.only(top:175, left:45),
+ child: Container(
+ width: 275,
+ height: 120,
+ child: Column(
+ children: [
+ Row(
+ children: [
+ SizedBox(width: 75,),
+ Container(width: containerWidth2,
+ child: TextField(
+ style: textStyle.inputfield,
+ onTap: (){
+ chooseLocate = true;
+ whatLocate = locateController.text;
+ setState(() {
+ });
+ },
+ onChanged: (text){
+ updateContainerWidth2();
+ selectedLocate = true;
+ whatLocate = locateController.text;
+ },
+ controller: locateController,
+ decoration: InputDecoration(
+ hintText: '์ด๋',
+ suffixStyle: TextStyle(color: Color(0xff83A8FF), fontSize: 20,),
+ hintStyle: textStyle.field,
+ counterText:'',
+ ),
+ maxLength: 10,
+ ),),
+ Text("์ ์์์ด์.", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 20, fontWeight: FontWeight.w500, color: Colors.black),),
+ ],),
+ SizedBox(height: 15,),
+ // DateFormat('MM/dd HH:mm').format(DateTime.parse(parsedResponseHR[index]['createdAt']))
+ // DateFormat('MM/dd HH:mm').format(DateTime.now().add(Duration(hours: whatTime)))
+ Text("10์ ์ด๋ด", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffAAAAAA)),),
+
+ ],),
+ ),
+ ),
+ ]
+ else if(nextQuestion == 13)...[
+ Stack(
+ children: [
+
+ Column(
+ children: [
+ SizedBox(height: 418,),
+ Container(
+ height: 280,
+ width: screenSize.width,
+ color: Color(0xffFFFFF7),
+ )
+ ],
+ ),
+ Column(
+ children: [
+ SizedBox(height: 418,),
+ SvgPicture.asset(
+ 'assets/images/conversation/shadow.svg', fit: BoxFit.cover,
+ ),
+ ],
+ ),
+
+ Column(
+ children: [
+ SizedBox(height: 144,),
+ Container(
+ width: screenSize.width,
+ height: 375,
+ child:
+ Stack(
+ children: [
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_ear.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base.gif', fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base_eye.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child:GifImage(
+ controller: controller1,
+ image: const AssetImage("assets/images/conversation/gif/muji_mouth1.gif"),
+ ),
+ // Image.asset('assets/images/conversation/gif/muji_mouth1.gif', fit: BoxFit.cover,),
+ )
+ ],
+ )
+
+ // SvgPicture.asset(
+ // 'assets/images/conversation/con_muji.svg', fit: BoxFit.cover,
+ // ),
+ ),
+ ],
+ ),
+
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ SizedBox(height: 444,),
+ Row(
+ children: [
+ SizedBox(width: 16,),
+ Container(
+ width: 168,
+ height: 168,
+ child: ElevatedButton(
+ style: ui_yes? buttonChart().bluebtn2_1 : buttonChart().whitebtn_1,
+ onPressed: () {
+ //miss = true;
+ ui_no = false;
+ if(ui_yes == false){
+ ui_yes = true;
+ } else{
+ ui_yes = false;
+ }
+ // nextQuestion++;
+ setState(() {});
+ },
+ child: Container(
+ padding: EdgeInsets.all(8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 16,),
+ Text("๋ค,\n์์ด์.", style: TextStyle(fontFamily: 'Pretendard',fontSize: 16, color: ui_yes? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 16,),
+ Text("ํํ๋๋\n๋ถ๋ถ์ด ์์ด์.", style: TextStyle(fontFamily: 'Pretendard',fontSize: 12, color: ui_yes? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 3,),
+ Row(
+ children: [
+ SizedBox(width: 76,),
+ SvgPicture.asset('assets/images/conversation/early/yes.svg')
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ ),
+ SizedBox(width: 16,),
+ Container(
+ width: 168,
+ height: 168,
+ child: ElevatedButton(
+ style: ui_no? buttonChart().bluebtn2_1 : buttonChart().whitebtn_1,
+ onPressed: () {
+ // grief = true;
+ ui_yes = false;
+ if(ui_no == false){
+ ui_no = true;
+ } else{
+ ui_no = false;
+ }
+ // nextQuestion++;
+ setState(() {});
+ },
+ child: Container(
+ padding: EdgeInsets.all(8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 16,),
+ Text("์๋์,\n์๋๊ฒ ๊ฐ์์.", style: TextStyle(fontFamily: 'Pretendard',fontSize: 16, color: ui_no? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 16,),
+ Text("ํํ๋๋ ๋ถ๋ถ์ด\n์๋ ๊ฒ ๊ฐ์์.", style: TextStyle(fontFamily: 'Pretendard',fontSize: 12, color: ui_no? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 3,),
+ Row(
+ children: [
+ SizedBox(width: 76,),
+ SvgPicture.asset('assets/images/conversation/early/no.svg')
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ],
+ ),
+ ] else if((yes && nextYes < 9) || (no && nextNo < 12) || (end && nextEnd < 4) || (end && nextEnd > 4 && nextEnd < 7))...[
+ Stack(
+ children: [
+ // ์ ์ ์์น
+ Column(
+ children: [
+ SizedBox(height: 420,),
+ Container(
+ child: SvgPicture.asset(
+ 'assets/images/conversation/user7.svg',
+ height: 282,
+ width: screenSize.width,
+ ),
+ ),
+ ],
+ ),
+ Column(
+ children: [
+ SizedBox(height: 144,),
+ Container(
+ width: screenSize.width,
+ height: 375,
+ child:
+ Stack(
+ children: [
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_ear.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base.gif', fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base_eye.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child:GifImage(
+ controller: controller1,
+ image: const AssetImage("assets/images/conversation/gif/muji_mouth1.gif"),
+ ),
+ // Image.asset('assets/images/conversation/gif/muji_mouth1.gif', fit: BoxFit.cover,),
+ )
+ ],
+ )
+
+ // SvgPicture.asset(
+ // 'assets/images/conversation/con_muji.svg', fit: BoxFit.cover,
+ // ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ] else if(end && nextEnd == 4)...[
+ Padding(
+ padding: EdgeInsets.only(top:175, left:45),
+ child: Container(
+ width: 275,
+ height: 120,
+ child: Column(
+ children: [
+ Row(
+ children: [
+ SizedBox(width: 75,),
+ Container(width: 25,
+ child: TextField(
+ style: textStyle.inputfield,
+ onTap: (){
+ chooseTime = true;
+ whatTime = int.parse(nextTimeController.text);
+ setState(() {
+ });
+ },
+ onChanged: (text){
+ selectedNextTime = true;
+ whatTime = int.parse(nextTimeController.text);
+ },
+ keyboardType: TextInputType.number,
+ inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]'))],
+ controller: nextTimeController,
+ decoration: InputDecoration(
+ hintText: '๋ช',
+ suffixStyle: TextStyle(color: Color(0xff83A8FF), fontSize: 20,),
+ hintStyle: textStyle.field,
+ //labelText: '๋ช',
+ ),
+ ),),
+ Text("์๊ฐ ํ์ ๋ง๋์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 20, fontWeight: FontWeight.w500, color: Colors.black),),
+ ],),
+ SizedBox(height: 15,),
+ // DateFormat('MM/dd HH:mm').format(DateTime.parse(parsedResponseHR[index]['createdAt']))
+ // DateFormat('MM/dd HH:mm').format(DateTime.now().add(Duration(hours: whatTime)))
+ Text(chooseTime?"${DateFormat('MM์ dd์ผ HH์ mm๋ถ').format(DateTime.now().add(Duration(hours: whatTime)))}":"์ต์ 1์๊ฐ์์ 24์๊ฐ ์ฌ์ด๋ก ์ ํด์ฃผ์ธ์.", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffAAAAAA)),),
+
+ ],),
+ ),
+ ),
+ ]
+
+ ],
+ ),
+
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ // // nextQuestion ์ด 3๊ณผ 7์ผ๋ ๋ฑ์ฅ
+ bottomSheet: Padding(
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).viewInsets.bottom * 0.001),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ if(nextQuestion == 6 && selectedWeather)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0.0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ //decidedType = false;
+ questions0.insertAll(7, [
+ "${home.puppy}์์ ์ด๋ณ์ ์๊ฐ์\n${whatWeather}๋ ์ด์๊ตฐ์.", //7
+ "์ฐ๋ฆฌ ${home.user}๋๊ณผ\n${home.puppy}๋", //8
+ "์ด๋ค ์ฅ์์ ์์๋์? ", //9
+ "์ด๋ค ์ฅ์์ ์์๋์? ", //10
+ ]);
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ setState(() {});
+ },
+ child: Text("๋ค์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ else if(nextQuestion == 10 && selectedLocate)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0.0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ //decidedType = false;
+ questions0.insertAll(11, [
+ "๊ทธ๋ ๊ตฐ์.", //11
+ "${whatWeather}๋ \n${whatLocate}์์", //12
+ "${home.puppy}์ ์ด๋ณํ๋\n์๊ฐ์ ๋ ์ฌ๋ฆฌ๋ฉฐ ํํ๋๋ ๋ถ๋ถ์ด ์๋์?", //13
+ ]);
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 1000), () {
+ controller1.stop();
+ });
+ setState(() {});
+ },
+ child: Text("๋ค์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ else if(nextQuestion == 13 && (ui_no || ui_yes))...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0.0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ nextQuestion++;
+ if(ui_yes){
+ yes = true;
+ player2.setAsset(yesVoice[voiceYesCount]);
+ voiceYesCount++;
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+ }else if (ui_no){
+ no = true;
+ player2.setAsset(noVoice[voiceNoCount]);
+ voiceNoCount++;
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+ }
+
+ setState(() {});
+ },
+ child: Text("๋ค์"),
+ ),
+ ),),
+ ),
+ ]
+ else if (yes && nextYes == 0)...[
+ Container(
+ color: Colors.white,
+ height: 48,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 8.0, top: 8.0, left: 16,right: 16),
+ child: Stack(
+ children: [
+ Container(
+ width: screenSize.width,
+ height: 48,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(color: selectRegret?Color(colorChart.blue):Color(0xffDDE7FD),),
+ borderRadius: BorderRadius.circular(30),
+ ),
+ ),
+ Positioned(
+ left: 15,
+ right: 30,
+ bottom: -4,
+ child: TextField(
+ textAlignVertical: TextAlignVertical.center,
+ maxLines: 1,
+ controller: regretController,
+ style: textStyle.bk14normal,
+ decoration: InputDecoration(
+ hintStyle: textStyle.grey14normal,
+ border: InputBorder.none,
+ hintText: '๋ฌด์์ด ํํ๋๋๋ฉด...'),
+ onChanged: (s) {
+ //text = s;
+ selectRegret = true;
+ },
+ onTap: () {},
+ ),
+ ),
+ Positioned(
+ left: screenSize.width - 81,
+ //right: 30,
+ bottom: 3,
+ top: 3,
+ child: ElevatedButton(
+ onPressed: () {
+ if(selectRegret){
+ player2.setAsset(yesVoice[voiceYesCount]);
+ voiceYesCount++;
+ player2.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 20,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+
+ nextYes++;
+ setState(() {
+
+ });
+ }
+
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: selectRegret? Color(colorChart.blue):Color(0xffDDE7FD),
+ fixedSize: const Size(23, 23),
+ shape: const CircleBorder(),
+ ),
+ child: Icon(
+ Icons.arrow_upward,
+ color: Colors.white,
+ size: 16,
+ )),
+ ),
+ ],
+ ),
+ ),
+ )
+
+ ]
+ else if (no && nextNo == 4)...[
+ Container(
+ color: Colors.white,
+ height: 48,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 8.0, top: 8.0, left: 16,right: 16),
+ child: Stack(
+ children: [
+ Container(
+ width: screenSize.width,
+ height: 48,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(color: selectWant?Color(colorChart.blue):Color(0xffC0D2FC)),
+ borderRadius: BorderRadius.circular(30),
+ ),
+ ),
+ Positioned(
+ left: 15,
+ right: 30,
+ bottom: -4,
+ child: TextField(
+ textAlignVertical: TextAlignVertical.center,
+ maxLines: 1,
+ controller: regretController,
+ style: textStyle.bk14normal,
+ decoration: InputDecoration(
+ hintStyle: textStyle.grey14normal,
+ border: InputBorder.none,
+ hintText: '์ด๋ค ํ๋์ด๋ ๋ง์ ํ๊ณ ์ถ๋๋ฉด...'),
+ onChanged: (s) {
+ //text = s;
+ selectWant = true;
+ setState(() {
+
+ });
+ },
+ onTap: () {},
+ ),
+ ),
+ Positioned(
+ left: screenSize.width - 81,
+ //right: 30,
+ bottom: 3,
+ top: 3,
+ child: ElevatedButton(
+ onPressed: () {
+ if(selectWant){
+ player2.setAsset(noVoice[voiceNoCount]);
+ voiceNoCount++;
+ player2.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 20,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+
+ nextNo++;
+ setState(() {
+
+ });
+ }
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: selectWant? Color(colorChart.blue):Color(0xffDDE7FD),
+ fixedSize: const Size(23, 23),
+ shape: const CircleBorder(),
+ ),
+ child: Icon(
+ Icons.arrow_upward,
+ color: Colors.white,
+ size: 16,
+ )),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ]
+ else if(nextEnd == 4 && selectedNextTime)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0.0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ questionsEnd.insertAll(5, [
+ "๋ค, ${home.user}๋.\n${whatTime}์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+ "๋ค, ${home.user}๋.\n${whatTime}์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+ ]);
+ //decidedType = false;
+ nextEnd++;
+ player2.setAsset(endVoice[voiceEndCount]);
+ voiceEndCount++;
+ player2.play();
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ setState(() {});
+ },
+ child: Text("๋ค์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ else if(nextEnd == 6)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0.0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ //decidedType = false;
+ //checkSignUp = false;
+ //checkSignIn = true;
+ checkSignUp = false;
+ var now = DateTime.now();
+ sentDate = DateFormat('yyyy-MM-dd hh:mm:ss').format(now.toLocal());
+ saveCon(sign_in.userAccessToken, "1B", sentDate);
+
+ setState(() {});
+ main.player.stop();
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => MyScreenPage(title: '์คํฌ๋ฆฐ ํ์ด์ง',)));
+ },
+ child: Text("์๋ฃ", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ ],
+ ),
+ )),
+ )
+
+ );
+
+ }
+}
+
diff --git a/client/lib/conversation/early_period/memory.dart b/client/lib/conversation/early_period/memory.dart
new file mode 100644
index 0000000..48af964
--- /dev/null
+++ b/client/lib/conversation/early_period/memory.dart
@@ -0,0 +1,1393 @@
+import 'dart:async';
+import 'dart:convert';
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:client/conversation/early_period/early_coach_mark.dart';
+import 'package:client/home.dart' as home;
+import 'package:http/http.dart' as http;
+import 'package:client/progressbar/animation_progressbar.dart';
+import 'package:client/style.dart';
+import 'package:just_audio/just_audio.dart';
+import 'package:flutter_gif/flutter_gif.dart';
+import 'package:client/sign/sign_in.dart' as sign_in;
+import 'package:client/main.dart'as main;
+
+/// ์ด๊ธฐ๋ํ-๊ธฐ์ต
+
+AudioPlayer player2 = AudioPlayer();
+
+late FlutterGifController controller1, controller2, controller3;
+
+List voice =[
+ "assets/voice/early/memory/memory1.mp3", "assets/voice/early/memory/memory2.mp3", "assets/voice/early/memory/memory3.mp3",
+ "assets/voice/early/memory/memory4.mp3", "assets/voice/early/memory/memory5.mp3", "assets/voice/early/memory/memory6.mp3",
+ "assets/voice/early/memory/memory7.mp3","assets/voice/early/memory/memory8.mp3","", "assets/voice/early/memory/memory9.mp3","",
+ "assets/voice/early/memory/memory10.mp3", "assets/voice/early/memory/memory11.mp3", "assets/voice/early/memory/memory12.mp3", "",
+ "assets/voice/early/memory/memory13.mp3", "assets/voice/early/memory/memory14.mp3", "assets/voice/early/memory/memory15.mp3",
+];
+
+List griefVoice =[
+ "assets/voice/early/memory/memorysad1.mp3", "assets/voice/early/memory/memorysad2.mp3", "assets/voice/early/memory/memorysad3.mp3",
+ "assets/voice/early/memory/memorysad4.mp3", "assets/voice/early/memory/memorysad5.mp3", "assets/voice/early/memory/memorysad6.mp3",
+ "assets/voice/early/memory/memorysad7.mp3",
+];
+
+List happyVoice =[
+ "assets/voice/early/memory/memoryhappy1.mp3", "assets/voice/early/memory/memoryhappy2.mp3", "assets/voice/early/memory/memoryhappy3.mp3",
+ "assets/voice/early/memory/memoryhappy4.mp3", "assets/voice/early/memory/memoryhappy5.mp3", "assets/voice/early/memory/memoryhappy6.mp3",
+ "assets/voice/early/memory/memoryhappy7.mp3", "assets/voice/early/memory/memoryhappy8.mp3", "assets/voice/early/memory/memoryhappy9.mp3",
+ "assets/voice/early/memory/memoryhappy10.mp3", "assets/voice/early/memory/memoryhappy11.mp3",
+];
+
+
+class MemoryPage extends StatefulWidget {
+
+ static Future navigatorPush(BuildContext context) async {
+ return Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (_) => MemoryPage(),
+ ),
+ );
+ }
+
+ @override
+ _MemoryPageState createState() => _MemoryPageState();
+}
+
+class _MemoryPageState extends State with TickerProviderStateMixin {
+
+ bool grief = false; //gpt๊ฒฐ๊ณผ๊ฐ ์ฌํ
+ bool happy = false; //gpt๊ฒฐ๊ณผ๊ฐ ํ๋ณต
+
+ int nextGrief = 0;
+ int nextHappy = 0;
+
+ bool finish = false; // ๋ฉ๋ชจ๋ฆฌ์ผ ๋ฐ ๋ง๋ฌด๋ฆฌ
+
+ bool selectedNextTime = false;
+ bool chooseTime = false;
+ String whatTime = "";
+
+ bool selectedLocate = false;
+ bool chooseLocate = false;
+ String whatLocate = "";
+
+ bool selectedHow = false;
+ bool chooseHow = false;
+ String whatHow = "";
+
+ // ํ
์คํธ ์๋ํ
์ปจํธ๋กค๋ฌ๋ฅผ ์์ฑํ์ฌ ํ๋์ ํ ๋น
+ final nextTimeController = TextEditingController(); // nextQuestion = 7์ผ๋
+ final locateController = TextEditingController(); // nextQuestion = 7์ผ๋
+ final howController = TextEditingController(); // nextQuestion = 7์ผ๋
+ final whatController = TextEditingController(); // nextQuestion = 7์ผ๋
+ final emotionController = TextEditingController(); // nextQuestion = 7์ผ๋
+
+ bool setWhat = false;
+ bool setEmotion = false;
+
+
+ FocusNode _focusNode = FocusNode();
+
+ @override
+ void initState() {
+ super.initState();
+
+ main.play = true;
+ main.player.setAsset(main.musics[1]);
+ main.player.play();
+
+ // ์์ ์ ์ฉ
+ for(int i= 0 ; i < voice.length; i++){
+ player2.setAudioSource(AudioSource.uri(
+ Uri.parse(voice[i]))
+ );
+ }
+
+ controller1 = FlutterGifController(vsync: this);
+ controller2 = FlutterGifController(vsync: this);
+ controller3 = FlutterGifController(vsync: this);
+
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 1500), () {
+ controller1.stop();
+ });
+
+
+ controller3.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 2000)
+ );
+ Timer(Duration(milliseconds: 1000), () {
+ controller3.stop();
+ });
+
+ _focusNode.addListener(_onFocusChange);
+ }
+
+ void _onFocusChange() {
+ if (_focusNode.hasFocus) {
+ // ํค๋ณด๋ ์ฌ๋ฆฌ๊ธฐ
+ FocusScope.of(context).requestFocus(_focusNode);
+ }
+ }
+
+ @override
+ void dispose() async {
+ super.dispose();
+ }
+
+
+ List introText =[];
+ int nextQuestion = 0;
+ int voiceCount = 0;
+
+ int happyVoiceCount = 0;
+ int griefVoiceCount = 0;
+
+ double containerWidth1 = 35.0;
+ void updateContainerWidth1() {
+ // TextField ๋ด์ฉ์ ๊ธธ์ด์ ๋ฐ๋ผ Container ๊ธธ์ด ์
๋ฐ์ดํธ
+ setState(() {
+ containerWidth1 = 35.0 + (nextTimeController.text.length.toDouble() * 5.0);
+ });
+ }
+ double containerWidth2 = 35.0;
+ void updateContainerWidth2() {
+ // TextField ๋ด์ฉ์ ๊ธธ์ด์ ๋ฐ๋ผ Container ๊ธธ์ด ์
๋ฐ์ดํธ
+ setState(() {
+ containerWidth2 = 35.0 + (nextTimeController.text.length.toDouble() * 5.0);
+ });
+ }
+ double containerWidth3 = 35.0;
+ void updateContainerWidth3() {
+ // TextField ๋ด์ฉ์ ๊ธธ์ด์ ๋ฐ๋ผ Container ๊ธธ์ด ์
๋ฐ์ดํธ
+ setState(() {
+ containerWidth3 = 35.0 + (nextTimeController.text.length.toDouble() * 5.0);
+ });
+ }
+
+ // ${home.user}
+
+ List questions0 =[
+ "์ข์์, ${home.user}๋.", // 0
+ "์ฌ์ค...\n${home.user}๋์ ๋ง์์", // 1
+ "${home.puppy}๋ฅผ ํฅํ\n๊ทธ๋ฆฌ์์ด ๊ฐ๋ํด ๋ณด์ฌ์.", // 2
+ "${home.puppy}์์ ๊ธฐ์ต์\n๋ ์ฌ๋ฆฌ๋ฉด", // 3
+ "${home.user}๋์\n๊ทธ๋ฆฌ์ด ๋ง์์ ๋ฌ๋ ์ ์์ง ์์๊น์?", // 4
+ "์ค๋์ ${home.puppy}์์\n๊ธฐ์ต์ ๋ํด ์๊ธฐํด๋ด์.", // 5
+ "${home.puppy}์ ํจ๊ปํ\nํ ๊ฐ์ง ๊ธฐ์ต์ ๋ ์ฌ๋ ค์ฃผ์ธ์.", // 6
+ "๊ทธ๋ ์ ์ด๋ค ๋ ์จ์๋์?", // 7
+ "๊ทธ๋ ์ ์ด๋ค ๋ ์จ์๋์?", // 8
+
+ // "๊ทธ๋ ๊ตฐ์. ()ํ ๋ ์จ์\n์์ด์ ์ด๋์ ์์๋์?", // 9
+ // "๊ทธ๋ ๊ตฐ์. ()ํ ๋ ์จ์\n์์ด์ ์ด๋์ ์์๋์?", // 10
+ //
+ // "()ํ ๋ ์จ์\n()์์ ์์๊ตฐ์!", // 11
+ // "๋ณดํธ์๋๊ณผ\n์์ด๋ ๋ญ ํ๊ณ ์์์๊น์?", // 12
+ // "๋ณดํธ์๋๊ณผ\n์์ด๋ ๋ญ ํ๊ณ ์์์๊น์?", // 13 ๋
ธ
+ //
+ // "๊ทธ๋ ๋ค๋ฉด ๋ณดํธ์๋๊ณผ\n์์ด๋ ์ด๋ค ๋ชจ์ต์ผ๋ก ๋ณด์ด๋์?", // 14 13
+ // "๊ทธ๋ ๋ค๋ฉด ๋ณดํธ์๋๊ณผ\n์์ด๋ ์ด๋ค ๋ชจ์ต์ผ๋ก ๋ณด์ด๋์?", // 15 14
+ //
+ // "์ฐ๋ฆฌ ์์ด์\n๋ณดํธ์๋์", // 16 15
+ // "()ํ ๋ชจ์ต์\n๋ ์ฌ๋ ค๋ณด๋ฉด", // 17 16
+ // "๋ณดํธ์๋์ ๋ง์์\n์ด๋ค ๊ฒ ๊ฐ๋์?", // 18 17
+ // "๊ณ ๋ฏผ์ค" // 19 18
+ ];
+// ์ฌํ ์ ํ์
+ List question1_0= [
+ "${home.user}๋!",
+ "์ง๊ธ ${home.puppy}์์\n๊ธฐ์ต์ ์๊ฐํ๋ฉฐ ๋๋ผ๋ ๊ฐ์ ์",
+ "๋๋ฌด๋ ๋น์ฐํ ๊ฒ์ด์์.",
+ "๊ทธ๋ฆฌ๊ณ ์ด ๊ฐ์ ์\n์ถฉ๋ถํ ๋๋ผ๋ ๊ฒ๋ ์ ๋ง ์ค์ํด์.",
+ "ํ์ง๋ง\n์ ์ ๋์๋ง์ผ๋ก ๋ถ์กฑํ ์ ์๊ธฐ์",
+ "โํจ๊ปํ ๊ฐโ์์\n๋ค๋ฅธ ์ฌ๋๋ค์ ์ด์ผ๊ธฐ๋ฅผ ๋ฃ๊ณ ",
+ "๋์์ ์์ฒญํด ๋ณด๋ ๊ฒ์ ์ถ์ฒ๋๋ ค์!",
+ ];
+
+// ํ๋ณต ์ ํ์
+ List questions1_1 =[
+ "${home.user}๋!",
+ "${home.puppy}์์\n๊ธฐ์ต์ ๋ ์ฌ๋ ค๋ณด๋ฉด",
+ "๋ง๋ฅ ์ฌํ๊ธฐ๋ง ํ์ง๋\n์์ ๊ฒ ๊ฐ์์!",
+ "${home.user}๋์ ๋ง์์ด\n์ ์๋์์ ํ๋ณตํ๊ธธ ๋ฐ๋ผ์.",
+ "์ดํ์๋ ${home.user}๋์\n${home.puppy}๋ฅผ ์๊ฐํ๋ค๋ณด๋ฉด",
+ "๋ถ๋ช
์ฌํ ๊ฐ์ ์ด ์๊ฒจ๋ ์ ์์ด์.",
+ "๊ทธ๋ด๋๋ โํจ๊ปํ ๊ฐโ์์\n๋ค๋ฅธ ์ฌ๋๋ค์ ์ด์ผ๊ธฐ๋ฅผ ๋ฃ๊ณ ",
+ "๋์์ ์์ฒญํด ๋ณด๋ ๊ฒ์ ์ถ์ฒ๋๋ ค์!",
+
+ ];
+
+ List questions1_2 =[
+ /// "๋ณดํธ์๋โฆ",
+ // "๋ค๋ฅธ ์ฌ๋๋ค๊ณผ ํจ๊ป\n๋์์ ์ฃผ๊ณ ๋ฐ์ผ๋ฉด์",
+ // "์์ผ๋ก ๋ณดํธ์๋์ ๋ง์์\n์์ ์ด ์ฐพ์์ค๊ธฐ๊น์ง",
+ // "๋์์ด ๋์์ผ๋ฉด\nํ๋ ๋ฐ๋์ด์์.",
+ ];
+
+ List questionsEnd =[
+ /// "๋ณดํธ์๋โฆ",
+ // "์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+ // "๋ค, ๋ณดํธ์๋.\n()์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+ ];
+
+ String result = "์ฌํ";
+ late Map parsedResponseUser;
+ void sendAnswer(String aToken, String con) async {
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/conversation/emotion/stage1/1';
+
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "userAnswer": con,
+ };
+
+ // ํค๋ ์ ๋ณด ์ค์
+ Map headers = {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ };
+
+ // HTTP GET ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.post(
+ Uri.parse(apiUrl),
+ body: json.encode(data),
+ headers: headers, // ํค๋ ์ถ๊ฐ
+ );
+
+ ///var jsonResponse = utf8.decode(response.bodyBytes);
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ print("๋ํ ๋จ๊ณ ๋ฃ๊ธฐ ์ฑ๊ณต");
+ print('์๋ฒ๋ก๋ถํฐ ๋ฐ์ ๋ด์ฉ ๋ฐ์ดํฐ(์ฌ์ฉ์ ๊ฐ์ ์ ๋ณด): ${response.body}');
+ var jsonResponse = utf8.decode(response.bodyBytes);
+ parsedResponseUser = json.decode(jsonResponse);
+ result = parsedResponseUser['emotion'];
+ print(result);
+
+ if(result == "์ฌํ"){
+ grief = true;
+
+ nextQuestion++;
+ player2.setAsset(griefVoice[happyVoiceCount]);
+ griefVoiceCount++;
+ player2.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(seconds: 1), () {
+ controller1.stop();
+ });
+ }else{
+ happy = true;
+
+ nextQuestion++;
+ player2.setAsset(happyVoice[happyVoiceCount]);
+ happyVoiceCount++;
+ player2.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(seconds: 1), () {
+ controller1.stop();
+ });
+ }
+
+
+ setState(() {
+ });
+
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ: ${response.statusCode}');
+ }
+ }
+
+
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+ return
+ Container(
+ color: Color(0xffFCCBCD),
+ child: GestureDetector(
+ onTap: (){
+ SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top]);
+ print("ํ์ธ: " + nextQuestion.toString());
+
+ if(nextQuestion < 8){
+ nextQuestion++; // ์ธํธ๋ก ์์ ํ count
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ controller2.repeat(
+ min: 0,
+ max: 32,
+ period: const Duration(milliseconds: 2000)
+ );
+ if(nextQuestion == 1){
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+ Timer(Duration(milliseconds: 2000), () {
+ controller2.stop();
+ });
+ } else if(nextQuestion == 2){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ }); // ok
+ Timer(Duration(milliseconds: 2000), () {
+ controller2.stop();
+ });
+ } else if(nextQuestion == 3){
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 4){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 5){
+ Timer(Duration(milliseconds: 3500), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 6){
+ Timer(Duration(milliseconds: 3500), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 7){
+ Timer(Duration(milliseconds: 2500), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 8){
+ // ํ์์์
+ // Timer(Duration(milliseconds: 3000), () {
+ // controller1.stop();
+ // });
+ }
+ }
+ else if(nextQuestion == 8){
+ // ์ด๋ค ๋ ์จ?
+ // controller1.repeat(
+ // min: 0,
+ // max: 30,
+ // period: const Duration(milliseconds: 1000)
+ // );
+ // Timer(Duration(seconds: 3), () {
+ // controller1.stop();
+ // });
+ }
+ else if(nextQuestion == 9){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ // 2.5์ด ์ ์
+ // controller1.repeat(
+ // min: 0,
+ // max: 30,
+ // period: const Duration(milliseconds: 1000)
+ // );
+ // Timer(Duration(seconds: 4), () {
+ // controller1.stop();
+ // });
+ }
+ else if(nextQuestion == 10){
+ // ์ด๋์ ์์๋์ง?
+ }
+ else if(nextQuestion >10 && nextQuestion <12){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 12){
+ Timer(Duration(milliseconds: 3500), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(nextQuestion == 12){
+ // ๋ญํ๊ณ ์์๋์ง?
+ // controller1.repeat(
+ // min: 0,
+ // max: 30,
+ // period: const Duration(milliseconds: 1000)
+ // );
+ // Timer(Duration(milliseconds: 4000), () {
+ // controller1.stop();
+ // });
+
+ }
+ else if(nextQuestion == 13){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ // controller1.repeat(
+ // min: 0,
+ // max: 30,
+ // period: const Duration(milliseconds: 1000)
+ // );
+ // Timer(Duration(seconds: 5), () {
+ // controller1.stop();
+ // });
+ }
+ else if(nextQuestion == 14){
+ // ์ด๋ค ๋ชจ์ต์ผ๋ก ๋ณด์ด๋์ง?
+ }
+ else if(nextQuestion > 14 && nextQuestion < 17){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 16){
+ Timer(Duration(milliseconds: 2500), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 17){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(nextQuestion == 17){
+
+ }
+ else if(nextQuestion == 18){
+ // gpt๋ก๋ถํฐ ๋ต๋ณ ๊ฐ์ ธ์ค๊ธฐ
+ // happy = true;
+ // nextQuestion++;
+ // player2.setAsset(happyVoice[happyVoiceCount]);
+ // happyVoiceCount++;
+ // player2.play();
+
+ // grief = true;
+ // nextQuestion++;
+ // player2.setAsset(griefVoice[happyVoiceCount]);
+ // griefVoiceCount++;
+ // player2.play();
+ //
+ // controller1.repeat(
+ // min: 0,
+ // max: 30,
+ // period: const Duration(milliseconds: 1000)
+ // );
+ // Timer(Duration(seconds: 1), () {
+ // controller1.stop();
+ // });
+ }
+ // ์ฌ๊ธฐ์๋ถํฐ๋ ๊ฐ์
+ else if(happy && nextHappy < 7){
+ nextHappy++;
+ player2.setAsset(happyVoice[happyVoiceCount]);
+ happyVoiceCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ controller3.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 2000)
+ );
+
+ if(nextHappy == 1){
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextHappy == 2){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ Timer(Duration(milliseconds: 1000), () {
+ controller3.stop();
+ });
+ }
+ else if(nextHappy == 3){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextHappy == 4){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextHappy == 5){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextHappy == 6){
+ Timer(Duration(seconds: 4), () {
+ controller1.stop();
+ });
+ }
+ else if(nextHappy == 7){
+ Timer(Duration(seconds: 3), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(grief && nextGrief<6){
+ nextGrief++;
+ player2.setAsset(griefVoice[griefVoiceCount]);
+ griefVoiceCount++;
+ player2.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ controller2.repeat(
+ min: 0,
+ max: 32,
+ period: const Duration(milliseconds: 2000)
+ );
+
+ if(nextGrief == 1){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ Timer(Duration(milliseconds: 2000), () {
+ controller2.stop();
+ });
+ }
+ else if(nextGrief == 2){
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+ Timer(Duration(milliseconds: 2000), () {
+ controller2.stop();
+ });
+ }
+ else if(nextGrief == 3){
+ Timer(Duration(milliseconds: 5000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextGrief == 4){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextGrief == 5){
+ Timer(Duration(milliseconds: 3500), () {
+ controller1.stop();
+ });
+ }
+ else if(nextGrief == 6){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(happy && nextHappy == 7){
+ // ๋ฐ์ ๋ฒํผ์ด ์๊ฒจ์ ์ด๋
+ }
+ else if(grief && nextGrief == 6){
+ // ๋ฐ์ ๋ฒํผ์ด ์๊ฒจ์ ์ด๋
+ }
+
+ setState(() {
+ });
+ },
+ child: Scaffold(
+ backgroundColor: Colors.transparent,
+ appBar: AppBar(
+ //title: Text("๊ธฐ์ตํ ๊ฐ", style: TextStyle(fontSize:16, color: Colors.white ),),
+ //centerTitle: true,
+ leading: IconButton(
+ icon: SvgPicture.asset(
+ 'assets/images/conversation/home_icon.svg',
+ ),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ backgroundColor: Colors.transparent,
+ elevation: 0.0,
+ ),
+ //extendBodyBehindAppBar: true,
+ body:
+ SingleChildScrollView(
+ child: Container(
+ child: Column(
+ children: [
+ SizedBox(height: 3,),
+ Container(
+ width: screenSize.width,
+ height: 25,
+ child: Padding(
+ padding: EdgeInsets.only( left:16, right: 16),
+ child: Center(
+ child: FAProgressBar(
+ currentValue: 40,
+ size: 5,
+ backgroundColor: Colors.white,
+ )
+ ),
+ ),
+ ),
+ Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children:[
+ SizedBox(
+ height: 10,
+ ),
+ Stack(
+ children: [
+ Container(
+ height: 157,
+ width: screenSize.width,
+ child:
+ Stack(
+ children: [
+ Center(child: SvgPicture.asset('assets/images/conversation/bubble.svg',fit: BoxFit.fill,),),
+ Container(
+ padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 12, ),
+ child: Center(
+ child: Column(
+ children: [
+ if(grief == false && happy == false)...[
+ if(questions0[nextQuestion].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ questions0[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ questions0[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+ ]
+ // ํ๋ณต์ผ์
+ else if (happy) ...[
+ if(questions1_1[nextHappy].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ questions1_1[nextHappy],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ questions1_1[nextHappy],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+ // ์ฌํ์ผ ์
+ ] else if (grief) ...[
+ if(question1_0[nextGrief].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ question1_0[nextGrief],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ question1_0[nextGrief],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+ ]
+ ],
+ )
+ )
+ ),
+ ],
+ )
+ ),
+ // ๋ฌด์ง ์์น
+ if(nextQuestion < 8 || nextQuestion == 9 || (nextQuestion>10 && nextQuestion<14) || (nextQuestion > 14 && nextQuestion < 18) || nextQuestion>18)...[
+ Stack(
+ children: [
+ // ์ ์ ์์น
+ Column(
+ children: [
+ SizedBox(height: 420,),
+ Container(
+ child: SvgPicture.asset(
+ 'assets/images/conversation/user7.svg',
+ height: 282,
+ width: screenSize.width,
+ ),
+ ),
+ ],
+ ),
+ Column(
+ children: [
+ SizedBox(height: 144,),
+ Container(
+ width: screenSize.width,
+ height: 375,
+ child:
+ Stack(
+ children: [
+
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_ear.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base.gif', fit: BoxFit.cover,),),
+
+ if(nextQuestion == 2 || nextGrief == 1 || nextGrief == 2)...[
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: GifImage(
+ controller: controller2,
+ image: const AssetImage("assets/images/conversation/gif/sad_muji.gif"),
+ ),
+ ),
+ ] else if(nextQuestion == 0 || nextQuestion == 11 || nextHappy == 2)...[
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: GifImage(
+ controller: controller3,
+ image: const AssetImage("assets/images/conversation/gif/smile_muji.gif"),
+ ),
+ ),
+ ]
+ else...[
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base_eye.gif',
+ fit: BoxFit.cover,),),
+ ],
+
+
+ // Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ // child: Image.asset('assets/images/conversation/gif/muji_base_eye.gif',
+ // fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child:GifImage(
+ controller: controller1,
+ image: const AssetImage("assets/images/conversation/gif/muji_mouth1.gif"),
+ ),
+ // Image.asset('assets/images/conversation/gif/muji_mouth1.gif', fit: BoxFit.cover,),
+ )
+ ],
+ )
+
+ // SvgPicture.asset(
+ // 'assets/images/conversation/con_muji.svg', fit: BoxFit.cover,
+ // ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ]
+ else if(nextQuestion == 8)...[
+ Padding(
+ padding: EdgeInsets.only(top:175, left:45),
+ child: Container(
+ width: 275,
+ height: 120,
+ child: Column(
+ children: [
+ Row(
+ children: [
+ SizedBox(width: 75,),
+ Container(
+ padding: EdgeInsets.only(bottom:16),
+ width: containerWidth1,
+ child: TextField(
+ style: textStyle.inputfield,
+ onTap: (){
+ chooseTime = true;
+ whatTime = nextTimeController.text;
+ setState(() {
+ });
+
+ },
+ onChanged: (text){
+ selectedNextTime = true;
+ whatTime = nextTimeController.text;
+ updateContainerWidth1();
+ },
+ controller: nextTimeController,
+ decoration: InputDecoration(
+ hintText: '์ด๋ค',
+ contentPadding: EdgeInsets.only(top: 16),
+ suffixStyle: TextStyle(color: Color(0xff83A8FF), fontSize: 20,),
+ hintStyle: textStyle.field,
+ counterText:'',
+ ),
+ maxLength: 10,
+ ),),
+ Text(" ๋ ์จ์์ด์.", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 20, fontWeight: FontWeight.w500, color: Colors.black),),
+ ],),
+ SizedBox(height: 8,),
+ // DateFormat('MM/dd HH:mm').format(DateTime.parse(parsedResponseHR[index]['createdAt']))
+ // DateFormat('MM/dd HH:mm').format(DateTime.now().add(Duration(hours: whatTime)))
+ Text("10์ ์ด๋ด", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffAAAAAA)),),
+
+ ],),
+ ),
+ ),
+ ]
+ else if(nextQuestion == 10)...[
+ Padding(
+ padding: EdgeInsets.only(top:175, left:45),
+ child: Container(
+ width: 275,
+ height: 120,
+ child: Column(
+ children: [
+ Row(
+ children: [
+ SizedBox(width: 75,),
+ Container(width: containerWidth2,
+ padding: EdgeInsets.only(bottom:16),
+ child: TextField(
+ style: textStyle.inputfield,
+ onTap: (){
+ chooseLocate = true;
+ whatLocate = locateController.text;
+ setState(() {
+ });
+ },
+ onChanged: (text){
+ updateContainerWidth2();
+ selectedLocate = true;
+ whatLocate = locateController.text;
+ },
+ controller: locateController,
+ decoration: InputDecoration(
+ hintText: '์ด๋',
+ contentPadding: EdgeInsets.only(top: 16),
+ suffixStyle: TextStyle(color: Color(0xff83A8FF), fontSize: 20,),
+ hintStyle: textStyle.field,
+ counterText:'',
+ //labelText: '๋ช',
+ ),
+ maxLength: 10,
+ ),),
+ Text("์ ์์์ด์.", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 20, fontWeight: FontWeight.w500, color: Colors.black),),
+ ],),
+ SizedBox(height: 8,),
+ // DateFormat('MM/dd HH:mm').format(DateTime.parse(parsedResponseHR[index]['createdAt']))
+ // DateFormat('MM/dd HH:mm').format(DateTime.now().add(Duration(hours: whatTime)))
+ Text("10์ ์ด๋ด", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffAAAAAA)),),
+
+ ],),
+ ),
+ ),
+ ]
+ else if(nextQuestion == 14)...[
+ Padding(
+ padding: EdgeInsets.only(top:175, left:45),
+ child: Container(
+ width: 275,
+ height: 120,
+ child: Column(
+ children: [
+ Row(
+ children: [
+ SizedBox(width: 75,),
+ Container(
+ padding: EdgeInsets.only(bottom:16),
+ width: containerWidth3,
+ child: TextField(
+ style: textStyle.inputfield,
+ onTap: (){
+ chooseHow = true;
+
+ whatHow = howController.text;
+ setState(() {
+ });
+ },
+ onChanged: (text){
+ updateContainerWidth3();
+ selectedHow = true;
+ whatHow = howController.text;
+ },
+ controller: howController,
+ decoration: InputDecoration(
+ hintText: '์ด๋ค',
+ contentPadding: EdgeInsets.only(top: 16),
+ suffixStyle: TextStyle(color: Color(0xff83A8FF), fontSize: 20,),
+ hintStyle: textStyle.field,
+ counterText:'',
+ ),
+ maxLength: 300,
+ ),),
+ Text("๋ชจ์ต์ด์์.", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 20, fontWeight: FontWeight.w500, color: Colors.black),),
+ ],),
+ SizedBox(height: 8,),
+ // DateFormat('MM/dd HH:mm').format(DateTime.parse(parsedResponseHR[index]['createdAt']))
+ // DateFormat('MM/dd HH:mm').format(DateTime.now().add(Duration(hours: whatTime)))
+ Text("10์ ์ด๋ด", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffAAAAAA)),),
+
+ ],),
+ ),
+ ),
+ ]
+ // chat gpt ๋ต๋ณ ๋ฐ์์ค๊ธฐ ์ ๊ณ ๋ฏผํ๋ ๋ฌด์ง
+ else if(nextQuestion == 18)...[
+ Stack(
+ children: [
+ // ์ ์ ์์น
+ Column(
+ children: [
+ SizedBox(height: 420,),
+ Container(
+ child: SvgPicture.asset(
+ 'assets/images/conversation/user7.svg',
+ height: 282,
+ width: screenSize.width,
+ ),
+ ),
+ ],
+ ),
+ Column(
+ children: [
+ SizedBox(height: 144,),
+ Container(
+ width: screenSize.width,
+ height: 375,
+ child:
+ Stack(
+ children: [
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/think_back.gif',
+ fit: BoxFit.cover,),
+ ),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child:
+ Image.asset('assets/images/conversation/gif/thinking1.gif', fit: BoxFit.cover,),
+ // GifImage(
+ // controller: controller1,
+ // image: const AssetImage("assets/images/conversation/gif/think_muji.gif"),
+ // ),
+ ),
+ ],
+ )
+ // SvgPicture.asset(
+ // 'assets/images/conversation/con_muji.svg', fit: BoxFit.cover,
+ // ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ]
+ ],
+ ),
+
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+
+ // // nextQuestion ์ด 3๊ณผ 7์ผ๋ ๋ฑ์ฅ
+ bottomSheet: Padding(
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).viewInsets.bottom * 0.001),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ if(nextQuestion == 8 && selectedNextTime)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ //decidedType = false;
+ questions0.insertAll(9, [
+ "๊ทธ๋ ๊ตฐ์. ${whatTime} ๋ ์จ์\n${home.puppy}์ ์ด๋์ ์์๋์?", // 9
+ "๊ทธ๋ ๊ตฐ์. ${whatTime} ๋ ์จ์\n${home.puppy}์ ์ด๋์ ์์๋์?", // 10
+ ]);
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 3500), () {
+ controller1.stop();
+ });
+ setState(() {});
+ },
+ child: Text("๋ค์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ else if(nextQuestion == 10 && selectedLocate)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ //decidedType = false;
+ questions0.insertAll(11, [
+ "${whatTime} ๋ ์จ์\n${whatLocate}์์ ์์๊ตฐ์!", // 11
+ "${home.user}๋๊ณผ\n${home.puppy}๋ ๋ญ ํ๊ณ ์์์๊น์?", // 12
+ // "๋ณดํธ์๋๊ณผ\n์์ด๋ ๋ญ ํ๊ณ ์์์๊น์?", // 13
+ ]);
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 1000), () {
+ controller1.stop();
+ });
+
+ controller3.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 2000)
+ );
+ Timer(Duration(milliseconds: 1500), () {
+ controller3.stop();
+ });
+
+ setState(() {});
+ },
+ child: Text("๋ค์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ else if(nextQuestion == 12)...[
+ Container(
+ color: Colors.white,
+ height: 48,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 8.0, top: 8.0, left: 16,right: 16),
+ child: Stack(
+ children: [
+ Container(
+ width: screenSize.width,
+ height: 48,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(color: setWhat? Color(colorChart.blue):Color(0xffC0D2FC)),
+ borderRadius: BorderRadius.circular(30),
+ ),
+ ),
+ Positioned(
+ left: 15,
+ right: 30,
+ bottom:-4,
+ child: TextField(
+ textAlignVertical: TextAlignVertical.center,
+ maxLines: 1,
+ controller: whatController,
+ style: textStyle.bk14normal,
+ decoration: InputDecoration(
+ hintStyle: textStyle.grey14normal,
+ border: InputBorder.none,
+ hintText: '๋ญ ํ๊ณ ์์๋๋ฉด...'),
+ onChanged: (s) {
+ //text = s;
+ setWhat = true;
+ setState(() {
+
+ });
+ },
+ onTap: () {},
+ ),
+ ),
+ Positioned(
+ left: screenSize.width - 80,
+ //right: 30,
+ bottom: 3,
+ top: 3,
+ child: ElevatedButton(
+ onPressed: () {
+ if(setWhat){
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+
+ questions0.insertAll(13, [
+ "๊ทธ๋ ๋ค๋ฉด ${home.user}๋๊ณผ\n${home.puppy}๋ ์ด๋ค ๋ชจ์ต์ผ๋ก ๋ณด์ด๋์?", // 14
+ "๊ทธ๋ ๋ค๋ฉด ${home.user}๋๊ณผ\n${home.puppy}๋ ์ด๋ค ๋ชจ์ต์ผ๋ก ๋ณด์ด๋์?", // 15
+ ]);
+
+ nextQuestion++;
+ setState(() {
+
+ });
+ }
+
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: setWhat? Color(colorChart.blue):Color(0xffDDE7FD),
+ fixedSize: const Size(23, 23),
+ shape: const CircleBorder(),
+ ),
+ child: Icon(
+ Icons.arrow_upward,
+ color: Colors.white,size: 16,
+ )),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ]
+ else if(nextQuestion == 14 && selectedHow)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ //decidedType = false;
+ questions0.insertAll(15, [
+ "์ฐ๋ฆฌ ${home.puppy}์\n${home.user}๋์", // 15
+ "${whatHow} ๋ชจ์ต์\n๋ ์ฌ๋ ค๋ณด๋ฉด", // 16
+ "${home.user}๋์ ๋ง์์\n์ด๋ค ๊ฒ ๊ฐ๋์?", // 17
+ "๊ณ ๋ฏผ์ค", // 18
+ ]);
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+ setState(() {});
+ },
+ child: Text("๋ค์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ else if(nextQuestion == 17)...[
+ Container(
+ color: Colors.white,
+ height: 48,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 8.0, top: 8.0, left: 16,right: 16),
+ child: Stack(
+ children: [
+ Container(
+ width: screenSize.width,
+ height: 48,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(color: setEmotion?Color(colorChart.blue):Color(0xffC0D2FC)),
+ borderRadius: BorderRadius.circular(30),
+ ),
+ ),
+ Positioned(
+ left: 15,
+ right: 30,
+ bottom:-4,
+ child: TextField(
+ textAlignVertical: TextAlignVertical.center,
+ maxLines: 1,
+ controller: emotionController,
+ style: textStyle.bk14normal,
+ decoration: InputDecoration(
+ hintStyle: textStyle.grey14normal,
+ border: InputBorder.none,
+ hintText: '์ ๋ง์์...'),
+ onChanged: (s) {
+ //text = s;
+ setEmotion = true;
+ setState(() {
+
+ });
+ },
+ onTap: () {
+
+ },
+ ),
+ ),
+ Positioned(
+ left: screenSize.width - 80,
+ //right: 30,
+ bottom: 3,
+ top: 3,
+ child: ElevatedButton(
+ onPressed: () {
+ sendAnswer(sign_in.userAccessToken, emotionController.text);
+ // ๊ณ ๋ฏผํ๋ ๋ฌด์ง ์์ง์ด๊ธฐ
+ if(setEmotion){
+ nextQuestion++;
+ setState(() {
+ controller1.repeat(
+ min: 2,
+ max: 30,
+ period: const Duration(milliseconds: 2000)
+ );
+ Timer(Duration(milliseconds: 1000), () {
+ controller1.stop();
+ });
+ });
+ }
+
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: setEmotion? Color(colorChart.blue):Color(0xffDDE7FD),
+ fixedSize: const Size(3, 3),
+ shape: const CircleBorder(),
+ ),
+ child: Icon(
+ Icons.arrow_upward,
+ color: Colors.white,size: 16,
+ )),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ]
+ else if((happy && nextHappy == 7) || (grief && nextGrief == 6))...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ // ํจ๊ปํ ๊ฐ ์ฝ์น๋งํฌ๋ก ์ด๋
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => EarlyMarkCoachPage()));
+ },
+ child: Text("๋ค์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ ],
+ ),
+ )),
+ )
+
+ );
+
+ }
+}
+
diff --git a/client/lib/conversation/early_period/memory2.dart b/client/lib/conversation/early_period/memory2.dart
new file mode 100644
index 0000000..f1ad732
--- /dev/null
+++ b/client/lib/conversation/early_period/memory2.dart
@@ -0,0 +1,555 @@
+import 'dart:async';
+import 'dart:convert';
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:client/screen.dart';
+import 'package:http/http.dart' as http;
+import 'package:client/progressbar/animation_progressbar.dart';
+import 'package:client/style.dart';
+import 'package:intl/intl.dart';
+import 'package:just_audio/just_audio.dart';
+import 'package:flutter_gif/flutter_gif.dart';
+import 'package:client/home.dart' as home;
+import 'package:client/sign/sign_in.dart' as sign_in;
+import 'package:client/main.dart'as main;
+
+/// ๊ธฐ์ต_๋ง๋ฌด๋ฆฌ
+
+AudioPlayer player2 = AudioPlayer();
+
+late FlutterGifController controller1, controller2, controller3;
+
+List voice =[
+ "assets/voice/early/memory/memoryhappy1.mp3",
+ "assets/voice/early/memory/memoryhappy9.mp3",
+ "assets/voice/early/memory/memoryhappy10.mp3",
+ "assets/voice/early/memory/memoryhappy11.mp3",
+ "assets/voice/intro/intro2_8.mp3",
+ "",
+ "assets/voice/intro/intro2_9.mp3",
+];
+
+class Memory2Page extends StatefulWidget {
+
+ static Future navigatorPush(BuildContext context) async {
+ return Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (_) => Memory2Page(),
+ ),
+ );
+ }
+
+ @override
+ _Memory2PageState createState() => _Memory2PageState();
+}
+
+class _Memory2PageState extends State with TickerProviderStateMixin {
+
+ bool finish = false; // ๋ฉ๋ชจ๋ฆฌ์ผ ๋ฐ ๋ง๋ฌด๋ฆฌ
+ bool selectedNextTime = false;
+ bool chooseTime = false;
+ int whatTime = 0;
+
+ // ํ
์คํธ ์๋ํ
์ปจํธ๋กค๋ฌ๋ฅผ ์์ฑํ์ฌ ํ๋์ ํ ๋น
+ final nextTimeController = TextEditingController(); // nextQuestion = 7์ผ๋
+
+
+ FocusNode _focusNode = FocusNode();
+
+ String sentDate = "";
+ // ๋ํ ๋จ๊ณ ์ ์ฅ
+ void saveCon(String aToken, String con, String nextcon) async {
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/user/conversation-status';
+
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "conversationStatus": con,
+ "nextConversationAt": nextcon,
+ };
+
+ // ํค๋ ์ ๋ณด ์ค์
+ Map headers = {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ };
+
+ // HTTP GET ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.put(
+ Uri.parse(apiUrl),
+ body: json.encode(data),
+ headers: headers, // ํค๋ ์ถ๊ฐ
+ );
+
+ ///var jsonResponse = utf8.decode(response.bodyBytes);
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ print("๋ํ ๋จ๊ณ ๋ฃ๊ธฐ ์ฑ๊ณต");
+ setState(() {
+ });
+
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ: ${response.statusCode}');
+ }
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ // ์์ ์ ์ฉ
+ for(int i= 0 ; i < voice.length; i++){
+ player2.setAudioSource(AudioSource.uri(
+ Uri.parse(voice[i]))
+ );
+ }
+
+ controller1 = FlutterGifController(vsync: this);
+
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 1000), () {
+ controller1.stop();
+ });
+
+ _callAPI();
+ _focusNode.addListener(_onFocusChange);
+ }
+
+ void _onFocusChange() {
+ if (_focusNode.hasFocus) {
+ // ํค๋ณด๋ ์ฌ๋ฆฌ๊ธฐ
+ FocusScope.of(context).requestFocus(_focusNode);
+ }
+ }
+
+ @override
+ void dispose() async {
+ super.dispose();
+ }
+
+ List introText =[];
+ int nextQuestion = 0;
+ int voiceCount = 0;
+
+ List questions1_4 =[
+ "${home.user}๋โฆ",
+ "๋ค๋ฅธ ์ฌ๋๋ค๊ณผ ํจ๊ป\n๋์์ ์ฃผ๊ณ ๋ฐ์ผ๋ฉด์",
+ "์์ผ๋ก ${home.user}๋์ ๋ง์์\n์์ ์ด ์ฐพ์์ค๊ธฐ๊น์ง",
+ "๋์์ด ๋์์ผ๋ฉด\nํ๋ ๋ฐ๋์ด์์.",
+ "์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+ "์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+ ];
+
+ void _callAPI() async {
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "stage" : "0",
+ "set" : "0",
+ "lineId" : "0"
+ };
+
+ var url = Uri.parse('http://3.38.1.125:8080/conversation/line'); // ์๋ํฌ์ธํธ URL ์ค์
+
+ try {
+ var response = await http.post(
+ url,
+ body: json.encode(data), // ์์ฒญ ๋ณธ๋ฌธ์ ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ์ธ์ฝ๋ฉํ์ฌ ์ ๋ฌ
+ headers: {'Content-Type': 'application/json',}, // ์์ฒญ ํค๋์ Content-Type ์ค์
+ );
+
+ if (response.statusCode == 200) {
+ // ์๋ต ์ฑ๊ณต ์์ ์ฒ๋ฆฌ
+
+ var jsonResponse = utf8.decode(response.bodyBytes); // ์๋ต ๋ณธ๋ฌธ์ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ // JSON ๊ฐ์ ํ์ฉํ ์ํ๋ ๋์ ์ํ
+ //utf8.decode(jsonResponse);
+ print(jsonResponse);
+
+ List contentList = [];
+
+ List parsedResponse = json.decode(jsonResponse);
+
+ setState(() {
+ for (var item in parsedResponse) {
+ if (item['content'] != null) {
+ introText.add(item['content']);
+ }
+ }
+ });
+
+
+ print(introText);
+
+ print('API ํธ์ถ ์ฑ๊ณต: ${response.statusCode}');
+ } else {
+ // ์์ฒญ ์คํจ ์์ ์ฒ๋ฆฌ
+ print('API ํธ์ถ ์คํจ: ${response.statusCode}');
+ }
+ } catch (e) {
+ // ์์ธ ๋ฐ์ ์์ ์ฒ๋ฆฌ
+ print('API ํธ์ถ ์ค ์์ธ ๋ฐ์: $e');
+ }
+ }
+
+
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+ return
+ Container(
+ color: Color(0xffFCCBCD),
+ child: GestureDetector(
+ onTap: (){
+ SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top]);
+ print("ํ์ธ: " + nextQuestion.toString());
+
+ if(nextQuestion <5){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 1){
+ Timer(Duration(milliseconds: 3500), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 2){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 3){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 4){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+
+ }
+ else if(nextQuestion == 5){
+ //nextQuestion++;
+ }
+ else if(nextQuestion == 6){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 7){
+
+ }
+
+ setState(() {
+ });
+ },
+ child: Scaffold(
+ backgroundColor: Colors.transparent,
+ appBar: AppBar(
+ //title: Text("๊ธฐ์ตํ ๊ฐ", style: TextStyle(fontSize:16, color: Colors.white ),),
+ //centerTitle: true,
+ leading: IconButton(
+ icon: SvgPicture.asset(
+ 'assets/images/conversation/home_icon.svg',
+ ),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ backgroundColor: Colors.transparent,
+ elevation: 0.0,
+ ),
+ //extendBodyBehindAppBar: true,
+ body: SingleChildScrollView(
+ child: Container(
+ child: Column(
+ children: [
+ SizedBox(height: 3,),
+ Container(
+ width: screenSize.width,
+ height: 25,
+ child: Padding(
+ padding: EdgeInsets.only( left:16, right: 16),
+ child: Center(
+ child: FAProgressBar(
+ currentValue: 40,
+ size: 5,
+ backgroundColor: Colors.white,
+ )
+ ),
+ ),
+ ),
+ Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children:[
+ SizedBox(
+ height: 10,
+ ),
+ Stack(
+ children: [
+ Container(
+ height: 157,
+ width: screenSize.width,
+ child:
+ Stack(
+ children: [
+ Center(child: SvgPicture.asset('assets/images/conversation/bubble.svg',fit: BoxFit.fill,),),
+ Container(
+ padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 12, ),
+ child: Center(
+ child: Column(
+ children: [
+ if(questions1_4[nextQuestion].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ questions1_4[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ questions1_4[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+ ],
+ )
+ )
+ ),
+ ],
+ )
+ ),
+ // ๋ฌด์ง ์์น
+ if(nextQuestion < 5 || nextQuestion > 5)...[
+ Stack(
+ children: [
+ // ์ ์ ์์น
+ Column(
+ children: [
+ SizedBox(height: 420,),
+ Container(
+ child: SvgPicture.asset(
+ 'assets/images/conversation/user7.svg',
+ height: 282,
+ width: screenSize.width,
+ ),
+ ),
+ ],
+ ),
+ Column(
+ children: [
+ SizedBox(height: 144,),
+ Container(
+ width: screenSize.width,
+ height: 375,
+ child:
+ Stack(
+ children: [
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_ear.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base.gif', fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base_eye.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child:GifImage(
+ controller: controller1,
+ image: const AssetImage("assets/images/conversation/gif/muji_mouth1.gif"),
+ ),
+ // Image.asset('assets/images/conversation/gif/muji_mouth1.gif', fit: BoxFit.cover,),
+ )
+ ],
+ )
+
+ // SvgPicture.asset(
+ // 'assets/images/conversation/con_muji.svg', fit: BoxFit.cover,
+ // ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ]
+ else if(nextQuestion == 5)...[
+ Padding(
+ padding: EdgeInsets.only(top:175, left:45),
+ child: Container(
+ width: 275,
+ height: 120,
+ child: Column(
+ children: [
+ Row(
+ children: [
+ SizedBox(width: 75,),
+ Container(width: 25,
+ padding: EdgeInsets.only(bottom:16),
+ child: TextField(
+ style: textStyle.inputfield,
+ onTap: (){
+ chooseTime = true;
+ selectedNextTime = true;
+ whatTime = int.parse(nextTimeController.text);
+ setState(() {
+ });
+ },
+ onChanged: (text){
+ whatTime = int.parse(nextTimeController.text);
+ },
+ keyboardType: TextInputType.number,
+ inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]'))],
+ controller: nextTimeController,
+ decoration: InputDecoration(
+ hintText: '๋ช',
+ contentPadding: EdgeInsets.only(top: 16),
+ suffixStyle: TextStyle(color: Color(0xff83A8FF), fontSize: 20,),
+ hintStyle: textStyle.field,
+ //labelText: '๋ช',
+ ),
+ ),),
+ Text("์๊ฐ ํ์ ๋ง๋์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 20, fontWeight: FontWeight.w500, color: Colors.black),),
+ ],),
+ SizedBox(height: 8,),
+ // DateFormat('MM/dd HH:mm').format(DateTime.parse(parsedResponseHR[index]['createdAt']))
+ // DateFormat('MM/dd HH:mm').format(DateTime.now().add(Duration(hours: whatTime)))
+ Text(chooseTime?"${DateFormat('MM์ dd์ผ HH์ mm๋ถ').format(DateTime.now().add(Duration(hours: whatTime)))}":"์ต์ 1์๊ฐ์์ 24์๊ฐ ์ฌ์ด๋ก ์ ํด์ฃผ์ธ์.", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffAAAAAA)),),
+
+ ],),
+ ),
+ ),
+
+ ]
+ ],
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),),
+
+ // // nextQuestion ์ด 3๊ณผ 7์ผ๋ ๋ฑ์ฅ
+ bottomSheet: Padding(
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).viewInsets.bottom * 0.001),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ if(nextQuestion == 5)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 3500), () {
+ controller1.stop();
+ });
+ questions1_4.insertAll(6, [
+ "๋ค, ${home.user}๋.\n${whatTime}์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+ "๋ค, ${home.user}๋.\n${whatTime}์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+ ]);
+ nextQuestion++;
+ setState(() {});
+ },
+ child: Text("๋ค์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ] else if(nextQuestion == 7)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ var now = DateTime.now();
+ sentDate = DateFormat('yyyy-MM-dd hh:mm:ss').format(now.toLocal());
+ saveCon(sign_in.userAccessToken, "1A", sentDate);
+ main.player.stop();
+ setState(() {});
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => MyScreenPage(title: '์คํฌ๋ฆฐ ํ์ด์ง',)));
+ setState(() {});
+ },
+ child: Text("์๋ฃ", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ ],
+ ),
+ )),
+ )
+
+ );
+
+ }
+}
diff --git a/client/lib/conversation/early_period/start_early.dart b/client/lib/conversation/early_period/start_early.dart
new file mode 100644
index 0000000..75f292e
--- /dev/null
+++ b/client/lib/conversation/early_period/start_early.dart
@@ -0,0 +1,1415 @@
+import 'dart:async';
+import 'dart:convert';
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:http/http.dart' as http;
+import 'package:intl/intl.dart';
+import 'package:client/conversation/early_period/memory.dart';
+import 'package:client/conversation/end_period/end.dart';
+import 'package:client/conversation/late_period/late.dart';
+import 'package:client/conversation/middle_period/the_truth_untold.dart';
+import 'package:client/progressbar/animation_progressbar.dart';
+import 'package:client/screen.dart';
+import 'package:client/style.dart';
+import 'package:client/sign/sign_in.dart' as sign_in;
+import 'package:just_audio/just_audio.dart';
+import 'package:flutter_gif/flutter_gif.dart';
+import 'package:client/home.dart' as home;
+import '../middle_period/sadness.dart';
+import 'farewell.dart';
+/// ๋ํ ์์
+
+String backColor = "";
+double perc = 0;
+
+class StartEarlyPage extends StatefulWidget {
+
+ static Future navigatorPush(BuildContext context) async {
+ return Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (_) => StartEarlyPage(),
+ ),
+ );
+ }
+
+ @override
+ _StartEarlyPageState createState() => _StartEarlyPageState();
+}
+
+class _StartEarlyPageState extends State with TickerProviderStateMixin {
+
+ late FlutterGifController controller1, controller2, controller3;
+
+ bool grief = false; // ์ด๋ณ ์ ํ ์
+ bool ui_grief = false;
+ bool miss = false; // ์ ๋ชป์ง ์ ํ ์
+ bool ui_miss = false;
+
+ bool no = false;
+ bool yes = false;
+
+ // ์ด๊ธฐ
+ bool early = false;
+ bool memory = false;
+ bool ui_memory = false;
+ bool farewell = false;
+ bool ui_farewell = false;
+
+ // ์ค๊ธฐ
+ bool middle = false;
+ bool sadness = false;
+ bool ui_sadness = false;
+ bool thetruthuntold = false;
+ bool ui_thetruthuntold = false;
+
+ // ํ๊ธฐ
+ bool late = false;
+
+ // ์ข
๊ฒฐ๊ธฐ
+ bool end = false;
+
+
+ FocusNode _focusNode = FocusNode();
+
+ // ๋ํ ๋จ๊ณ ์ ์ฅ
+ void saveCon(String aToken, String nextcon) async {
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/user/conversation-status';
+
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "nextConversationAt": nextcon,
+ };
+
+ // ํค๋ ์ ๋ณด ์ค์
+ Map headers = {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ };
+
+ // HTTP GET ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.put(
+ Uri.parse(apiUrl),
+ body: json.encode(data),
+ headers: headers, // ํค๋ ์ถ๊ฐ
+ );
+
+ ///var jsonResponse = utf8.decode(response.bodyBytes);
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ print("๋ํ ๋จ๊ณ ๋ฃ๊ธฐ ์ฑ๊ณต");
+ setState(() {
+ });
+
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ?????: ${response.statusCode}');
+ }
+ }
+
+
+ @override
+ void initState() {
+ super.initState();
+
+ conversationStage = home.convs;
+ setState(() {
+
+ });
+
+ // SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive, overlays: []);
+ // ์์ ์ ์ฉ
+ for(int i= 0 ; i < voice.length; i++){
+ _player.setAudioSource(AudioSource.uri(
+ Uri.parse(voice[i]))
+ );
+ }
+ controller1 = FlutterGifController(vsync: this);
+
+ _player.setAsset(voice[voiceCount]);
+ voiceCount++;
+ _player.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 2500), () {
+ controller1.stop();
+ });
+
+ _callAPI();
+ _focusNode.addListener(_onFocusChange);
+ }
+
+ void _onFocusChange() {
+ if (_focusNode.hasFocus) {
+ // ํค๋ณด๋ ์ฌ๋ฆฌ๊ธฐ
+ FocusScope.of(context).requestFocus(_focusNode);
+ }
+ }
+
+ @override
+ void dispose() async {
+ super.dispose();
+ }
+
+ String conversationStage = "";
+
+ int nextPage = 0;
+
+ List introText =[];
+
+ int nextQuestion = 0;
+ int nextYes = 0;
+ int nextNo = 0;
+
+ bool selectedNextTime = false;
+ bool chooseTime = false;
+ int whatTime = 0;
+
+ String sentDate = "";
+
+ final nextTimeController = TextEditingController();
+
+ final _player = AudioPlayer();
+ int voiceCount = 0;
+ int voiceNoCount = 0;
+ int voiceYesCount = 0;
+
+ List voice = [
+ "assets/voice/start1.mp3",
+ "",
+ ];
+
+ List voiceYes = [
+ "assets/voice/yes.mp3",
+ ];
+
+ List voiceNo = [
+ "assets/voice/no1.mp3", "", "assets/voice/no2.mp3", ""
+ ];
+
+ List question= [
+ "${home.user}๋!\n๊ธฐ๋ค๋ฆฌ๊ณ ์์์ด์!",
+ "๋ํ๋ฅผ ์์ํด๋ณผ๊น์?",
+ ];
+
+ List yesAns= [
+ "์ค๋์ ์ด๋ค ์ฃผ์ ๋ก ์๊ธฐํด๋ณผ๊น์?",
+ ];
+
+ List noAns= [
+ "๊ทธ๋ผ ์ฐ๋ฆฌ๋ ์ธ์ ๋ค์ ๋ง๋๋ฉด ์ข์๊น์?",
+ "๊ทธ๋ผ ์ฐ๋ฆฌ๋ ์ธ์ ๋ค์ ๋ง๋๋ฉด ์ข์๊น์?",
+ ];
+
+ void _callAPI() async {
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "stage" : "0",
+ "set" : "0",
+ "lineId" : "0"
+ };
+
+ var url = Uri.parse('http://3.38.1.125:8080/conversation/line'); // ์๋ํฌ์ธํธ URL ์ค์
+
+ try {
+ var response = await http.post(
+ url,
+ body: json.encode(data), // ์์ฒญ ๋ณธ๋ฌธ์ ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ์ธ์ฝ๋ฉํ์ฌ ์ ๋ฌ
+ headers: {'Content-Type': 'application/json',}, // ์์ฒญ ํค๋์ Content-Type ์ค์
+ );
+
+ if (response.statusCode == 200) {
+ // ์๋ต ์ฑ๊ณต ์์ ์ฒ๋ฆฌ
+
+ var jsonResponse = utf8.decode(response.bodyBytes); // ์๋ต ๋ณธ๋ฌธ์ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ // JSON ๊ฐ์ ํ์ฉํ ์ํ๋ ๋์ ์ํ
+ //utf8.decode(jsonResponse);
+ print(jsonResponse);
+
+ List contentList = [];
+
+ List parsedResponse = json.decode(jsonResponse);
+
+ setState(() {
+ for (var item in parsedResponse) {
+ if (item['content'] != null) {
+ introText.add(item['content']);
+ }
+ }
+ });
+ print(introText);
+
+ print('API ํธ์ถ ์ฑ๊ณต: ${response.statusCode}');
+ } else {
+ // ์์ฒญ ์คํจ ์์ ์ฒ๋ฆฌ
+ print('API ํธ์ถ ์คํจ: ${response.statusCode}');
+ }
+ } catch (e) {
+ // ์์ธ ๋ฐ์ ์์ ์ฒ๋ฆฌ
+ print('API ํธ์ถ ์ค ์์ธ ๋ฐ์: $e');
+ }
+ }
+
+ bool _visible = true;
+
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+ return
+ Container(
+ color: Color(int.parse('0xff$backColor')),
+ child: GestureDetector(
+ onTap: (){
+ SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top]);
+
+ if(nextQuestion == 0){
+ nextQuestion++;
+ _player.setAsset(voice[voiceCount]);
+ voiceCount++;
+ _player.play();
+
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 1 && yes == false && no == false){
+ nextQuestion++; // ์ธํธ๋ก ์์ ํ count
+ _player.setAsset(voice[voiceCount]);
+ voiceCount++;
+ _player.play();
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 2500), () {
+ controller1.stop();
+ });
+ }
+ else if(no && nextNo == 0){
+ nextNo++;
+ voiceNoCount++;
+ } else if(no && nextNo == 1){
+ //์๊ฐ ๋ฃ๊ธฐ
+ } else if(no && nextNo == 2){
+ nextNo++;
+ } else if(no && nextNo == 3){
+ //์๊ฐ ๋ฃ๊ธฐ
+ }
+ else if (yes && nextYes == 0){
+
+ }
+
+ setState(() {
+ });
+ },
+ child: Scaffold(
+ backgroundColor: Colors.transparent,
+ appBar: AppBar(
+ //title: Text("๊ธฐ์ตํ ๊ฐ", style: TextStyle(fontSize:16, color: Colors.white ),),
+ //centerTitle: true,
+ leading: IconButton(
+ icon: SvgPicture.asset(
+ 'assets/images/conversation/home_icon.svg',
+ ),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ backgroundColor: Colors.transparent,
+ elevation: 0.0,
+ ),
+ //extendBodyBehindAppBar: true,
+ body:
+ SingleChildScrollView(
+ child: Container(
+ child: Column(
+ children: [
+ SizedBox(height: 3,),
+ Container(
+ width: screenSize.width,
+ height: 25,
+ child: Padding(
+ padding: EdgeInsets.only( left:16, right: 16),
+ child: Center(
+ child: FAProgressBar(
+ currentValue: perc,
+ size: 5,
+ backgroundColor: Colors.white,
+ )
+ ),
+ ),
+ ),
+ Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children:[
+ SizedBox(
+ height: 10,
+ ),
+ Stack(
+ children: [
+ Container(
+ height: 157,
+ width: screenSize.width,
+ child:
+ Stack(
+ children: [
+ Center(child: SvgPicture.asset('assets/images/conversation/bubble.svg',fit: BoxFit.fill,),),
+ Container(
+ padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 12, ),
+ child: Center(
+ child: Column(
+ children: [
+ if(no == false && yes == false)...[
+ if(question[nextQuestion].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ question[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ question[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+ ] else if(no)...[
+ if(noAns[nextNo].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ noAns[nextNo],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ noAns[nextNo],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+
+ ] else if(yes)...[
+ if(yesAns[nextYes].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ yesAns[nextYes],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ yesAns[nextYes],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+
+ ]
+
+ ],
+ )
+ )
+ ),
+ ],
+ )
+ ),
+ // ๋ฌด์ง ์์น
+ if( (yes == false && no==false && nextQuestion < 2) || (no && nextNo == 0) || (no && nextNo > 1))...[
+ Stack(
+ children: [
+ // ์ ์ ์์น
+ Column(
+ children: [
+ SizedBox(height: 420,),
+ Container(
+ child: SvgPicture.asset(
+ 'assets/images/conversation/user7.svg',
+ height: 282,
+ width: screenSize.width,
+ ),
+ ),
+ ],
+ ),
+ Column(
+ children: [
+ SizedBox(height: 144,),
+ Container(
+ width: screenSize.width,
+ height: 375,
+ child:
+ Stack(
+ children: [
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_ear.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base.gif', fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base_eye.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child:GifImage(
+ controller: controller1,
+ image: const AssetImage("assets/images/conversation/gif/muji_mouth1.gif"),
+ ),
+ // Image.asset('assets/images/conversation/gif/muji_mouth1.gif', fit: BoxFit.cover,),
+ )
+ ],
+ )
+ ),
+ ],
+ ),
+ ],
+ ),
+ ]
+ else if(no && nextNo == 1)...[
+ Padding(
+ padding: EdgeInsets.only(top:175, left:45),
+ child: Container(
+ width: 275,
+ height: 120,
+ child: Column(
+ children: [
+ Row(
+ children: [
+ SizedBox(width: 75,),
+ Container(width: 25,
+ child: TextField(
+ style: textStyle.inputfield,
+ onTap: (){
+ chooseTime = true;
+ whatTime = int.parse(nextTimeController.text);
+ setState(() {
+ });
+ },
+ onChanged: (text){
+ selectedNextTime = true;
+ whatTime = int.parse(nextTimeController.text);
+ },
+ keyboardType: TextInputType.number,
+ inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]'))],
+ controller: nextTimeController,
+ decoration: InputDecoration(
+ hintText: '๋ช',
+ suffixStyle: TextStyle(color: Color(0xff83A8FF), fontSize: 20,),
+ hintStyle: textStyle.field,
+ //labelText: '๋ช',
+ ),
+ ),),
+ Text("์๊ฐ ํ์ ๋ง๋์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 20, fontWeight: FontWeight.w500, color: Colors.black),),
+ ],),
+ SizedBox(height: 15,),
+ // DateFormat('MM/dd HH:mm').format(DateTime.parse(parsedResponseHR[index]['createdAt']))
+ // DateFormat('MM/dd HH:mm').format(DateTime.now().add(Duration(hours: whatTime)))
+ Text(chooseTime?"${DateFormat('MM์ dd์ผ HH์ mm๋ถ').format(DateTime.now().add(Duration(hours: whatTime)))}":"์ต์ 1์๊ฐ์์ 24์๊ฐ ์ฌ์ด๋ก ์ ํด์ฃผ์ธ์.", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffAAAAAA)),),
+
+ ],),
+ ),
+ ),
+
+ ]
+ else if(yes && nextYes == 0)...[
+ Stack(
+ children: [
+ Column(
+ children: [
+ SizedBox(height: 418,),
+ Container(
+ height: 280,
+ width: screenSize.width,
+ color: Color(0xffFFFFF7),
+ )
+ ],
+ ),
+ Column(
+ children: [
+ SizedBox(height: 418,),
+ SvgPicture.asset(
+ 'assets/images/conversation/shadow.svg', fit: BoxFit.cover,
+ ),
+ ],
+ ),
+
+ Column(
+ children: [
+ SizedBox(height: 144,),
+ Container(
+ width: screenSize.width,
+ height: 375,
+ child:
+ Stack(
+ children: [
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_ear.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base.gif', fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base_eye.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child:GifImage(
+ controller: controller1,
+ image: const AssetImage("assets/images/conversation/gif/muji_mouth1.gif"),
+ ),
+ // Image.asset('assets/images/conversation/gif/muji_mouth1.gif', fit: BoxFit.cover,),
+ )
+ ],
+ )
+
+ // SvgPicture.asset(
+ // 'assets/images/conversation/con_muji.svg', fit: BoxFit.cover,
+ // ),
+ ),
+ ],
+ ),
+
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ SizedBox(height: 444,),
+ if(early)...[
+ if(conversationStage == "1")...[
+ Row(
+ children: [
+ SizedBox(width: 16,),
+ Container(
+ width: 168,
+ height: 168,
+ child: ElevatedButton(
+ style: ui_memory? buttonChart().bluebtn2_1 : buttonChart().whitebtn_1,
+ onPressed: () {
+ //miss = true;
+ ui_farewell = false;
+ if(ui_memory == false){
+ ui_memory = true;
+ } else{
+ ui_memory = false;
+ }
+ // nextQuestion++;
+ setState(() {});
+ },
+ child: Container(
+ padding: EdgeInsets.only(top:8.0,left: 8.0, bottom: 8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 16,),
+ Text("${home.puppy}์์\n๊ธฐ์ต", style: TextStyle(fontFamily: 'Pretendard',fontSize: 16, color: ui_miss? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 16,),
+ Text("ํจ๊ปํ ๊ธฐ์ต์ ๋ํด\n์ด์ผ๊ธฐํด์.", style: TextStyle(fontFamily: 'Pretendard',fontSize: 12, color: ui_miss? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 0,),
+ Row(
+ children: [
+ SizedBox(width: 76,),
+ SvgPicture.asset('assets/images/conversation/intro/miss.svg')
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ ),
+ SizedBox(width: 16,),
+ Container(
+ width: 168,
+ height: 168,
+ child: ElevatedButton(
+ style: ui_farewell? buttonChart().bluebtn2_1 : buttonChart().whitebtn_1,
+ onPressed: () {
+ ui_memory = false;
+ if(ui_farewell == false){
+ ui_farewell = true;
+ } else{
+ ui_farewell = false;
+ }
+ // nextQuestion++;
+ setState(() {});
+ },
+ child: Container(
+ padding: EdgeInsets.only(top:8.0,left: 8.0, bottom: 8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 16,),
+ Text("${home.puppy}์์\n์ด๋ณ", style: TextStyle(fontFamily: 'Pretendard',fontSize: 16, color: ui_grief? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 16,),
+ Text("์ด๋ณ์ ์๊ฐ์\n์ด์ผ๊ธฐํด์.", style: TextStyle(fontFamily: 'Pretendard',fontSize: 12, color: ui_grief? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 0,),
+ Row(
+ children: [
+ SizedBox(width: 76,),
+ SvgPicture.asset('assets/images/conversation/intro/grief.svg')
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ ),
+ ],
+ ),
+ ]
+ else if(conversationStage == "-1")...[
+ Row(
+ children: [
+ SizedBox(width: 16,),
+ Container(
+ width: 168,
+ height: 168,
+ child: ElevatedButton(
+ style: ui_memory? buttonChart().bluebtn2_1 : buttonChart().whitebtn_1,
+ onPressed: () {
+ //miss = true;
+ ui_farewell = false;
+ if(ui_memory == false){
+ ui_memory = true;
+ } else{
+ ui_memory = false;
+ }
+ // nextQuestion++;
+ setState(() {});
+ },
+ child: Container(
+ padding: EdgeInsets.only(top:8.0,left: 8.0, bottom: 8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 16,),
+ Text("${home.puppy}์์\n๊ธฐ์ต", style: TextStyle(fontFamily: 'Pretendard',fontSize: 16, color: ui_miss? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 16,),
+ Text("ํจ๊ปํ ๊ธฐ์ต์ ๋ํด\n์ด์ผ๊ธฐํด์.", style: TextStyle(fontFamily: 'Pretendard',fontSize: 12, color: ui_miss? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 0,),
+ Row(
+ children: [
+ SizedBox(width: 76,),
+ SvgPicture.asset('assets/images/conversation/intro/miss.svg')
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ ),
+ SizedBox(width: 16,),
+ Container(
+ width: 168,
+ height: 168,
+ child: ElevatedButton(
+ style: ui_farewell? buttonChart().bluebtn2_1 : buttonChart().whitebtn_1,
+ onPressed: () {
+ ui_memory = false;
+ if(ui_farewell == false){
+ ui_farewell = true;
+ } else{
+ ui_farewell = false;
+ }
+ // nextQuestion++;
+ setState(() {});
+ },
+ child: Container(
+ padding: EdgeInsets.only(top:8.0,left: 8.0, bottom: 8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 16,),
+ Text("${home.puppy}์์\n์ด๋ณ", style: TextStyle(fontFamily: 'Pretendard',fontSize: 16, color: ui_grief? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 16,),
+ Text("์ด๋ณ์ ์๊ฐ์\n์ด์ผ๊ธฐํด์.", style: TextStyle(fontFamily: 'Pretendard',fontSize: 12, color: ui_grief? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 0,),
+ Row(
+ children: [
+ SizedBox(width: 76,),
+ SvgPicture.asset('assets/images/conversation/intro/grief.svg')
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ ),
+ ],
+ ),
+ ]
+
+ else if(conversationStage == "1B")...[
+ Row(
+ children: [
+ SizedBox(width: 16,),
+ Container(
+ width: 168,
+ height: 168,
+ child: ElevatedButton(
+ style: ui_memory? buttonChart().bluebtn2_1 : buttonChart().whitebtn_1,
+ onPressed: () {
+ //miss = true;
+ ui_farewell = false;
+ if(ui_memory == false){
+ ui_memory = true;
+ } else{
+ ui_memory = false;
+ }
+ // nextQuestion++;
+ setState(() {});
+ },
+ child: Container(
+ padding: EdgeInsets.only(top:8.0,left: 8.0, bottom: 8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 16,),
+ Text("${home.puppy}์์\n๊ธฐ์ต", style: TextStyle(fontFamily: 'Pretendard',fontSize: 16, color: ui_miss? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 16,),
+ Text("ํจ๊ปํ ๊ธฐ์ต์ ๋ํด\n์ด์ผ๊ธฐํด์.", style: TextStyle(fontFamily: 'Pretendard',fontSize: 12, color: ui_miss? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 0,),
+ Row(
+ children: [
+ SizedBox(width: 76,),
+ SvgPicture.asset('assets/images/conversation/intro/miss.svg')
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ ),
+ SizedBox(width: 16,),
+ Stack(
+ children: [
+ Container(
+ width: 168,
+ height: 168,
+ child: ElevatedButton(
+ style: buttonChart().greybtn_1,
+ onPressed: () {
+
+ },
+ child: Container(
+ padding: EdgeInsets.only(top:8.0,left: 8.0, bottom: 8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 16,),
+ Text("${home.puppy}์์\n์ด๋ณ", style: textStyle.grey16semibold),
+ SizedBox(height: 16,),
+ Text("์ด๋ณ์ ์๊ฐ์\n์ด์ผ๊ธฐํด์.", style: textStyle.grey12normal),
+ SizedBox(height: 0,),
+ Row(
+ children: [
+ SizedBox(width: 76,),
+ SvgPicture.asset('assets/images/conversation/done_drop.svg')
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ] else if(conversationStage == "1A")...[
+ Row(
+ children: [
+ SizedBox(width: 16,),
+ Container(
+ width: 168,
+ height: 168,
+ child: ElevatedButton(
+ style: buttonChart().greybtn_1,
+ onPressed: () {
+
+ },
+ child: Container(
+ padding: EdgeInsets.only(top:8.0,left: 8.0, bottom: 8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 16,),
+ Text("${home.puppy}์์\n๊ธฐ์ต", style: textStyle.grey16semibold),
+ SizedBox(height: 16,),
+ Text("ํจ๊ปํ ๊ธฐ์ต์ ๋ํด\n์ด์ผ๊ธฐํด์.", style:textStyle.grey12normal),
+ SizedBox(height: 0,),
+ Row(
+ children: [
+ SizedBox(width: 76,),
+ SvgPicture.asset('assets/images/conversation/done_cloud.svg')
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ ),
+ SizedBox(width: 16,),
+ Container(
+ width: 168,
+ height: 168,
+ child: ElevatedButton(
+ style: ui_farewell? buttonChart().bluebtn2_1 : buttonChart().whitebtn_1,
+ onPressed: () {
+ ui_memory = false;
+ if(ui_farewell == false){
+ ui_farewell = true;
+ } else{
+ ui_farewell = false;
+ }
+ // nextQuestion++;
+ setState(() {});
+ },
+ child: Container(
+ padding: EdgeInsets.only(top:8.0,left: 8.0, bottom: 8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 16,),
+ Text("${home.puppy}์์\n์ด๋ณ", style: TextStyle(fontFamily: 'Pretendard',fontSize: 16, color: ui_grief? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 16,),
+ Text("์ด๋ณ์ ์๊ฐ์\n์ด์ผ๊ธฐํด์.", style: TextStyle(fontFamily: 'Pretendard',fontSize: 12, color: ui_grief? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 0,),
+ Row(
+ children: [
+ SizedBox(width: 76,),
+ SvgPicture.asset('assets/images/conversation/intro/grief.svg')
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ ),
+ ],
+ ),
+ ],
+ ]else if(middle)...[
+ if(conversationStage == "2")...[
+ Row(
+ children: [
+ SizedBox(width: 16,),
+ Container(
+ width: 168,
+ height: 168,
+ child: ElevatedButton(
+ style: ui_sadness? buttonChart().bluebtn2_1 : buttonChart().whitebtn_1,
+ onPressed: () {
+ //miss = true;
+ ui_thetruthuntold = false;
+ if(ui_sadness == false){
+ ui_sadness = true;
+ } else{
+ ui_sadness = false;
+ }
+ // nextQuestion++;
+ setState(() {});
+ },
+ child: Container(
+ padding: EdgeInsets.only(top:8.0,left: 8.0, bottom: 8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 16,),
+ Text("์ฌํ์\n๊ฐ์ ", style: TextStyle(fontFamily: 'Pretendard',fontSize: 16, color: ui_sadness? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 16,),
+ Text("์ด๋ณ๋ก ์ธํ ์ฌํ์\n์ด์ผ๊ธฐํด์.", style: TextStyle(fontFamily: 'Pretendard',fontSize: 12, color: ui_sadness? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 0,),
+ Row(
+ children: [
+ SizedBox(width: 76,),
+ SvgPicture.asset('assets/images/conversation/intro/grief.svg')
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ ),
+ SizedBox(width: 16,),
+ Container(
+ width: 168,
+ height: 168,
+ child: ElevatedButton(
+ style: ui_thetruthuntold? buttonChart().bluebtn2_1 : buttonChart().whitebtn_1,
+ onPressed: () {
+ // grief = true;
+ ui_sadness = false;
+ if(ui_thetruthuntold == false){
+ ui_thetruthuntold = true;
+ } else{
+ ui_thetruthuntold = false;
+ }
+ // nextQuestion++;
+ setState(() {});
+ },
+ child: Container(
+ padding: EdgeInsets.only(top:8.0,left: 8.0, bottom: 8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 16,),
+ Text("์ ํ์ง ๋ชปํ\n์ง์ฌ", style: TextStyle(fontFamily: 'Pretendard',fontSize: 16, color: ui_grief? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 16,),
+ Text("์ ํ๊ณ ํ ์ง์ฌ์\n์ด์ผ๊ธฐํด์.", style: TextStyle(fontFamily: 'Pretendard',fontSize: 12, color: ui_grief? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 0,),
+ Row(
+ children: [
+ SizedBox(width: 76,),
+ SvgPicture.asset('assets/images/conversation/intro/miss.svg')
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ ),
+ ],
+ ),
+ ] else if(conversationStage == "2B")...[
+ Row(
+ children: [
+ SizedBox(width: 16,),
+ Container(
+ width: 168,
+ height: 168,
+ child: ElevatedButton(
+ style: ui_sadness? buttonChart().bluebtn2_1 : buttonChart().whitebtn_1,
+ onPressed: () {
+ //miss = true;
+ ui_thetruthuntold = false;
+ if(ui_sadness == false){
+ ui_sadness = true;
+ } else{
+ ui_sadness = false;
+ }
+ // nextQuestion++;
+ setState(() {});
+ },
+ child: Container(
+ padding: EdgeInsets.only(top:8.0,left: 8.0, bottom: 8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 16,),
+ Text("์ฌํ์\n๊ฐ์ ", style: TextStyle(fontFamily: 'Pretendard',fontSize: 16, color: ui_miss? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 16,),
+ Text("์ด๋ณ๋ก ์ธํ ์ฌํ์\n์ด์ผ๊ธฐํด์.", style: TextStyle(fontFamily: 'Pretendard',fontSize: 12, color: ui_miss? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 0,),
+ Row(
+ children: [
+ SizedBox(width: 76,),
+ SvgPicture.asset('assets/images/conversation/intro/grief.svg')
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ ),
+ SizedBox(width: 16,),
+ Container(
+ width: 168,
+ height: 168,
+ child: ElevatedButton(
+ style: buttonChart().greybtn_1,
+ onPressed: () {
+
+ },
+ child: Container(
+ padding: EdgeInsets.only(top:8.0,left: 8.0, bottom: 8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 16,),
+ Text("์ ํ์ง ๋ชปํ\n์ง์ฌ", style: textStyle.grey16semibold),
+ SizedBox(height: 16,),
+ Text("์ ํ๊ณ ํ ์ง์ฌ์\n์ด์ผ๊ธฐํด์.", style: textStyle.grey12normal),
+ SizedBox(height: 0,),
+ Row(
+ children: [
+ SizedBox(width: 76,),
+ SvgPicture.asset('assets/images/conversation/done_cloud.svg')
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ ),
+ ],
+ ),
+ ] else if(conversationStage == "2A")...[
+ Row(
+ children: [
+ SizedBox(width: 16,),
+ Container(
+ width: 168,
+ height: 168,
+ child: ElevatedButton(
+ style: buttonChart().greybtn_1,
+ onPressed: () {
+
+ },
+ child: Container(
+ padding: EdgeInsets.only(top:8.0,left: 8.0, bottom: 8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 16,),
+ Text("์ฌํ์\n๊ฐ์ ", style: textStyle.grey16semibold),
+ SizedBox(height: 16,),
+ Text("์ด๋ณ๋ก ์ธํ ์ฌํ์\n์ด์ผ๊ธฐํด์.", style:textStyle.grey12normal),
+ SizedBox(height: 0,),
+ Row(
+ children: [
+ SizedBox(width: 76,),
+ SvgPicture.asset('assets/images/conversation/done_drop.svg')
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ ),
+ SizedBox(width: 16,),
+ Container(
+ width: 168,
+ height: 168,
+ child: ElevatedButton(
+ style: ui_thetruthuntold? buttonChart().bluebtn2_1 : buttonChart().whitebtn_1,
+ onPressed: () {
+ // grief = true;
+ ui_sadness = false;
+ if(ui_thetruthuntold == false){
+ ui_thetruthuntold = true;
+ } else{
+ ui_thetruthuntold = false;
+ }
+ // nextQuestion++;
+ setState(() {});
+ },
+ child: Container(
+ padding: EdgeInsets.only(top:8.0,left: 8.0, bottom: 8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 16,),
+ Text("์ ํ์ง ๋ชปํ\n์ง์ฌ", style: TextStyle(fontFamily: 'Pretendard',fontSize: 16, color: ui_grief? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 16,),
+ Text("์ ํ๊ณ ํ ์ง์ฌ์\n์ด์ผ๊ธฐํด์.", style: TextStyle(fontFamily: 'Pretendard',fontSize: 12, color: ui_grief? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 0,),
+ Row(
+ children: [
+ SizedBox(width: 76,),
+ SvgPicture.asset('assets/images/conversation/intro/miss.svg')
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ ),
+ ],
+ ),
+ ],
+ ],
+
+ ],
+ ),
+ ],
+ ),
+ ]
+ ],
+ )
+
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ // ์
๋ ฅ ๋ฐ ๋ฆฌ์คํธ ์ถ๊ฐ ์์
- ๋งค์ฐ ์ค์
+ // // nextQuestion ์ด 3๊ณผ 7์ผ๋ ๋ฑ์ฅ
+ bottomSheet: Padding(
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).viewInsets.bottom * 0.001),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ if(nextQuestion == 1 && no == false && yes == false)...[
+ Container(
+ height: 136,
+ width: screenSize.width,
+ padding: EdgeInsets.only(bottom: 24, left: 16, right:16),
+ child: Column(
+ children: [
+ ElevatedButton(
+ style: buttonChart().purplebtn,
+ onPressed: () {
+ if(conversationStage.contains("0")){
+ yes = true;
+ early = true;
+ setState(() {});
+
+ _player.setAsset(voiceYes[voiceYesCount]);
+ voiceCount++;
+ _player.play();
+
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+ } else if(conversationStage.contains("1")){
+ yes = true;
+ early = true;
+ setState(() {});
+
+ _player.setAsset(voiceYes[voiceYesCount]);
+ voiceCount++;
+ _player.play();
+
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ } else if(conversationStage.contains("-1")){
+ yes = true;
+ early = true;
+ setState(() {});
+
+ _player.setAsset(voiceYes[voiceYesCount]);
+ voiceCount++;
+ _player.play();
+
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+
+ else if(conversationStage.contains("2")){
+ yes = true;
+ middle = true;
+ setState(() {});
+ _player.setAsset(voiceYes[voiceYesCount]);
+ voiceCount++;
+ _player.play();
+
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ } else if(conversationStage.contains("3")){
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => LatePage()));
+ } else if(conversationStage.contains("4")){
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => EndPage()));
+ }
+ },
+ child: Text("๋ค, ์ข์์.", style: textStyle.white16semibold,),
+ ),
+ SizedBox(height: 8,),
+ ElevatedButton(
+ style: buttonChart().purplebtn3,
+ onPressed: () {
+ no = true;
+ setState(() {});
+
+ _player.setAsset(voiceNo[voiceNoCount]);
+ voiceCount++;
+ _player.play();
+
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+ },
+ child: Text("์๋์, ์์ง ์๊ฐ์ด ํ์ํด์.", style: textStyle.purple16midium,),
+ ),
+ ],
+ ),
+ ),
+ ]
+ else if(nextNo == 1 && selectedNextTime)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0.0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ print("์ผ๋งํผ ๋ค๋ก?:"+ whatTime.toString());
+ noAns.insertAll(2, [
+ "๋ค, ${home.user}๋.\n${whatTime}์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+ "๋ค, ${home.user}๋.\n${whatTime}์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+ ]);
+ //decidedType = false;
+ nextNo++;
+ // player2.setAsset(endVoice[voiceEndCount]);
+ // voiceEndCount++;
+ // player2.play();
+
+ _player.setAsset(voiceNo[2]);
+ //voiceNoCount++;
+ _player.play();
+
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ setState(() {});
+ },
+ child: Text("๋ค์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ else if(no && nextNo == 3)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0.0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ //decidedType = false;
+ //checkSignUp = false;
+ //checkSignIn = true;
+ //checkSignUp = false;
+ var now = DateTime.now().add(Duration(hours: whatTime));
+ sentDate = DateFormat('yyyy-MM-dd hh:mm:ss').format(now);
+ saveCon(sign_in.userAccessToken, sentDate);
+ setState(() {});
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => MyScreenPage(title: '์คํฌ๋ฆฐ ํ์ด์ง',)));
+ },
+ child: Text("์๋ฃ", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ else if(yes && nextYes == 0 && (ui_memory || ui_farewell || ui_sadness || ui_thetruthuntold) )...[
+ Container(
+ color: Color(0xffFFFFFF),
+ child: Padding(
+ padding: EdgeInsets.only(bottom: 24, left: 16, right:16),
+ child: Container(
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ if(ui_memory){
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => MemoryPage()));
+
+ } else if (ui_farewell){
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => FarewellPage()));
+ } else if (ui_sadness){
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => SadnessPage()));
+ } else if (ui_thetruthuntold){
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => TheTruthUntoldPage()));
+ }
+ setState(() {});
+ },
+ child: Text("๋ค์"),
+ ),
+ ),),
+ ),
+ ]
+ ],
+ ),
+ )
+ ),
+ )
+
+ );
+
+ }
+}
\ No newline at end of file
diff --git a/client/lib/conversation/end_period/end.dart b/client/lib/conversation/end_period/end.dart
new file mode 100644
index 0000000..ffa7f65
--- /dev/null
+++ b/client/lib/conversation/end_period/end.dart
@@ -0,0 +1,1124 @@
+import 'dart:async';
+import 'dart:convert';
+import 'dart:io';
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:client/conversation/end_period/end_coach_mark.dart';
+import 'package:http/http.dart' as http;
+import 'package:client/progressbar/animation_progressbar.dart';
+import 'package:client/style.dart';
+import 'package:just_audio/just_audio.dart';
+import 'package:flutter_gif/flutter_gif.dart';
+import 'package:image_picker/image_picker.dart';
+import 'package:client/main.dart'as main;
+
+/// ์ข
๊ฒฐ๊ธฐ ๋ํ
+
+
+List endConversation = [
+ "๋ค, ์ค๋์\n์๋ก์ด ๋์ ๋ํด ์๊ธฐํด๋ณด์์.", //0
+ "์ด์ ์์ด๊ฐ\n ๋ ๋ ๋น์๋ฆฌ์", //1
+ "์๋ก์ด ๊ฟ๊ณผ ์ด์ ์ ์ฌ์ ์ฐจ๋ก์์.", //2
+ "๊ทธ ์๊ฐ์ ๋ฐ์\n ์์๋ฅผ ํ์ํ๊ณ ๊ฐ์ ์ ๋ฐ๊ฒฌํ๋ฉฐ", //3
+ "๋ ํฐ ์๋ฏธ์ ๋ชฉ์ ์\n ์ฐพ์ ๋์๊ฐ๋ณผ๊น์?", //4
+ "์๋ก์ด ๋๋ฅผ ๋ฐ๊ฒฌํ๊ณ \n์ฑ์ฅํ๋ ๊ณผ์ ์์", //5
+ "์ฐ๋ฆฌ์ ์ธ์์\n ํ์๋กญ๊ณ ์๋ฏธ ์๋ ๊ฒ์ผ๋ก ์ด์ด์ง ๊ฑฐ์์.", //6
+ "๋ณดํธ์๋!", //7
+ "ํ์ ์์ ์ ๋ํด \n ํ ๋ฌธ์ฅ์ผ๋ก ์ค๋ช
ํด์ฃผ์ธ์!", //8
+ "๊ทธ๋ ๊ตฐ์, ์ด๋ฒ์๋\n โ๋ ์์ โ์ ๋ํด ๋ ์์๊ฐ๊ธฐ ์ํด", //9
+
+ "์ง๊ธ๊น์ง์ ์์ ์ ๊ฒฝํ๊ณผ\n ๋์ณค๋ ๊ฐ์ ์ ๋ฐ๊ฒฌํด๋ณด์์.", //10<< ๋ฐ๋์์
+ "์ต๊ทผ์ ์ด๋ค ๊ฒ ๋๋ฌธ์ ์์๋์?", //11
+ "๊ทธ ์๊ฐ์ ์ฌ์ง๊ณผ ํจ๊ป ์ถ์ตํ๋ฉฐ\n ๊ธฐ๋ถ์ ํ๋ณตํด๋ณด์์.", //12
+ "๊ทธ ์๊ฐ์ ์ฌ์ง๊ณผ ํจ๊ป ์ถ์ตํ๋ฉฐ\n ๊ธฐ๋ถ์ ํ๋ณตํด๋ณด์์.", //13
+ "์ข์์. ๊ทธ๋ ๋ค๋ฉด\n ์์ผ๋ก 1๋
ํ, 2๋
ํ, 3๋
ํ, 5๋
ํ", //14
+ "๋ณดํธ์๋์\n ๋ฌด์์ ํ๊ณ ์์๊น์?", //15
+ "๋ฏธ๋์ ๋์ ๋ํด ์๊ฐํ๋ ๊ฒ์\n ๋๋ผ์ด ๊ฒฝํ์ด์์.", //16
+ "์ด๋ค ๋ฏธ๋๋ฅผ ๋ง๋ค๊ณ ์ถ์์ง\n ํจ๊ป ์์ํด๋ณผ๊น์?", //17
+ "๋ณดํธ์๋์\n ๋ฏธ๋์ ์ด๋ค ์ฌ๋์ด ๋์ด์์๊น์?", //18
+ "๋ฏธ๋์ ๋ณดํธ์๋์ ๋ํ\n ๊ณํ์ ์์ํ๊ณ ", //19
+ "๊ตฌ์ฒดํํ๋ ๊ณผ์ ์\n ํฅ๋ฏธ๋ก์ด ์ฌ์ ์ด ๋ ๊ฑฐ์์!", //20
+ "์์ ์ด ์ค์ ํ ๋ชฉํ์\n ์ค๋ ์ ๋๋ผ๊ณ ์ฑ์ทจํ๋ฉฐ", //21
+ "๋ฏธ๋๋ฅผ ํฅํด ๋์๊ฐ\n ๋ ํ์๋ก์ด ์ถ์ ๋ง๋ค์ด ๋๊ฐ๋ณด์์!", //22
+ "์ด๋ ค์ด ์๊ฐ์ ๊ฒช์ ๋,", //23
+ "ํจ๊ปํ๋ ์ฌ๋๋ค์ ์ง์ง์ ์ดํด๋\n ํฐ ํ์ด ๋ผ์.", //24
+ "๊ทธ๋ฌ๋, \n ์ํ์ ํจ๊ป ๋๋๊ณ ๊ทน๋ณตํ ์ ์๋๋ก", //25
+ "๋ค๋ฅธ ๋ฐ๋ ค์ธ๋ค์๊ฒ\n ๋์์ ๋ณด๋ด๋ณด๋ ๊ฑด ์ด๋จ๊น์?", //26
+
+
+ // "๋ณดํธ์๋,", //27
+ // "์ด์ ๋ชจ๋ ๋ํ๊ฐ ๋์ด๋ฌ์ด์!", //28
+ // "๊ทธ๋์ ํจ๊ปํ ๋ํ๋\n ์์คํ๊ณ ์๋ฏธ ์๋ ์๊ฐ์ด์์ด์.", //29
+ // "์ด์ ๋ํ๋ ์ข
๋ฃ๋์ง๋ง,", //30
+ // "๊ทธ๋์์ ์๊ฐ๋ค์\n ๊ธฐ์ต ์์ ๊ฐ์ง๋๊ธธ ๋ฐ๋ผ์.", //31
+ // "์ง๊ธ๊น์ง\n ๋ํ์ ์ฌ์ ์ ํจ๊ป ํด์ค์ ๊ณ ๋ง์์!", //32
+ //
+ // "์ด์ โ๊ธฐ์ตํ ๊ฐโ ์ ์๋ก์ด ์ผ์์ด ๋น์ ์ ๊ธฐ๋ค๋ฆฌ๊ณ ์์ด์.", //33
+ // "์ด ๋ํ๋ฅผ ๋ซ๊ณ ๋๊ฐ๋ ์๊ฐ,", //34
+ // "์ถ์ ๋ค์ ์ฅ์ด ํผ์ณ์ง๊ธฐ๋ฅผ ๋ฐ๋๋๋ค.", //35
+];
+
+AudioPlayer player2 = AudioPlayer();
+
+late FlutterGifController controller1, controller2, controller3;
+
+List voice =[
+ "assets/voice/end/endp1.mp3",
+ "assets/voice/end/endp2.mp3",
+ "assets/voice/end/endp3.mp3",
+ "assets/voice/end/endp4.mp3",
+ "assets/voice/end/endp5.mp3",
+ "assets/voice/end/endp6.mp3",
+ "assets/voice/end/endp7.mp3",
+ "assets/voice/end/endp8.mp3",
+ "assets/voice/end/endp9.mp3",
+ "assets/voice/end/endp10.mp3",
+ "assets/voice/end/endp11.mp3",
+ "assets/voice/end/endp12.mp3",
+ "assets/voice/end/endp13.mp3",
+ "",
+ "assets/voice/end/endp15.mp3",
+ "assets/voice/end/endp16.mp3",
+ "assets/voice/end/endp17.mp3",
+ "assets/voice/end/endp18.mp3",
+ "assets/voice/end/endp19.mp3",
+ "assets/voice/end/endp20.mp3",
+ "assets/voice/end/endp21.mp3",
+ "assets/voice/end/endp22.mp3",
+ "assets/voice/end/endp23.mp3",
+ "assets/voice/end/endp24.mp3",
+ "assets/voice/end/endp25.mp3",
+ "assets/voice/end/endp26.mp3",
+ "assets/voice/end/endp27.mp3",
+];
+
+class EndPage extends StatefulWidget {
+
+ static Future navigatorPush(BuildContext context) async {
+ return Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (_) => EndPage(),
+ ),
+ );
+ }
+
+ @override
+ _EndPageState createState() => _EndPageState();
+}
+
+class _EndPageState extends State with TickerProviderStateMixin {
+
+ // ํ
์คํธ ์๋ํ
์ปจํธ๋กค๋ฌ๋ฅผ ์์ฑํ์ฌ ํ๋์ ํ ๋น
+ final meController = TextEditingController();
+ final memoryController = TextEditingController();
+ final futureController = TextEditingController();
+ final oneController = TextEditingController();
+ final twoController = TextEditingController();
+ final threeController = TextEditingController();
+ final fiveController = TextEditingController();
+
+ bool me = false;
+ bool memory = false;
+ bool future = false;
+ bool one = false;
+ bool two = false;
+ bool three = false;
+ bool five = false;
+
+ bool isPicSelected = false; // ์ฌ์ง์ด ๋ค์ด๊ฐ๋์ง ํ์ธํ๋ ์ฝ๋ -> UI ๋ฐ๋
+
+ XFile? _image; //์ด๋ฏธ์ง๋ฅผ ๋ด์ ๋ณ์ ์ ์ธ
+ final ImagePicker picker = ImagePicker(); //ImagePicker ์ด๊ธฐํ
+ bool modiImage = false;
+
+ //์ด๋ฏธ์ง๋ฅผ ๊ฐ์ ธ์ค๋ ํจ์
+ Future getImage(ImageSource imageSource) async {
+ //pickedFile์ ImagePicker๋ก ๊ฐ์ ธ์จ ์ด๋ฏธ์ง๊ฐ ๋ด๊ธด๋ค.
+ final XFile? pickedFile = await picker.pickImage(source: imageSource);
+ if (pickedFile != null) {
+ setState(() {
+ modiImage= true;
+ _image = XFile(pickedFile.path); //๊ฐ์ ธ์จ ์ด๋ฏธ์ง๋ฅผ _image์ ์ ์ฅ
+ });
+ }
+ }
+
+
+ FocusNode _focusNode = FocusNode();
+
+ @override
+ void initState() {
+ super.initState();
+
+ main.play = true;
+ main.player.setAsset(main.musics[4]);
+ main.player.play();
+
+ // ์์ ์ ์ฉ
+ for(int i= 0 ; i < voice.length; i++){
+ player2.setAudioSource(AudioSource.uri(
+ Uri.parse(voice[i]))
+ );
+ }
+
+ controller1 = FlutterGifController(vsync: this);
+
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+
+ _callAPI();
+ _focusNode.addListener(_onFocusChange);
+ }
+
+ void _onFocusChange() {
+ if (_focusNode.hasFocus) {
+ // ํค๋ณด๋ ์ฌ๋ฆฌ๊ธฐ
+ FocusScope.of(context).requestFocus(_focusNode);
+ }
+ }
+
+ @override
+ void dispose() async {
+ super.dispose();
+ }
+
+ List introText =[];
+ int nextQuestion = 0;
+ int voiceCount = 0;
+
+
+ void _callAPI() async {
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "stage" : "0",
+ "set" : "0",
+ "lineId" : "0"
+ };
+
+ var url = Uri.parse('http://3.38.1.125:8080/conversation/line'); // ์๋ํฌ์ธํธ URL ์ค์
+
+ try {
+ var response = await http.post(
+ url,
+ body: json.encode(data), // ์์ฒญ ๋ณธ๋ฌธ์ ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ์ธ์ฝ๋ฉํ์ฌ ์ ๋ฌ
+ headers: {'Content-Type': 'application/json',}, // ์์ฒญ ํค๋์ Content-Type ์ค์
+ );
+
+ if (response.statusCode == 200) {
+ // ์๋ต ์ฑ๊ณต ์์ ์ฒ๋ฆฌ
+
+ var jsonResponse = utf8.decode(response.bodyBytes); // ์๋ต ๋ณธ๋ฌธ์ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ // JSON ๊ฐ์ ํ์ฉํ ์ํ๋ ๋์ ์ํ
+ //utf8.decode(jsonResponse);
+ print(jsonResponse);
+
+ List contentList = [];
+
+ List parsedResponse = json.decode(jsonResponse);
+
+ setState(() {
+ for (var item in parsedResponse) {
+ if (item['content'] != null) {
+ introText.add(item['content']);
+ }
+ }
+ });
+
+ print(introText);
+
+ print('API ํธ์ถ ์ฑ๊ณต: ${response.statusCode}');
+ } else {
+ // ์์ฒญ ์คํจ ์์ ์ฒ๋ฆฌ
+ print('API ํธ์ถ ์คํจ: ${response.statusCode}');
+ }
+ } catch (e) {
+ // ์์ธ ๋ฐ์ ์์ ์ฒ๋ฆฌ
+ print('API ํธ์ถ ์ค ์์ธ ๋ฐ์: $e');
+ }
+ }
+
+
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+ return
+ Container(
+ color: Color(0xffDDE7FD),
+ child: GestureDetector(
+ onTap: (){
+ print("์ด๊ฑฐ๋ง ์ข ํ์ธ ๋ถํ: " + nextQuestion.toString());
+
+ if(nextQuestion < 8){
+ nextQuestion++; // ์ธํธ๋ก ์์ ํ count
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 1){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 2){
+ Timer(Duration(milliseconds: 3500), () {
+ controller1.stop();
+ }); // ok
+ } else if(nextQuestion == 3){
+ Timer(Duration(milliseconds: 5000), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 4){
+ Timer(Duration(milliseconds: 4500), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 5){
+ Timer(Duration(milliseconds: 4500), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 6){
+ Timer(Duration(milliseconds: 5000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 7){
+ Timer(Duration(milliseconds: 1500), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 8){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(nextQuestion == 8){
+ // ํ์์ ๋
+ }
+ else if(nextQuestion > 8 && nextQuestion < 13){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 10){
+ Timer(Duration(milliseconds: 5000), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 11){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ }); // ok
+ } else if(nextQuestion == 12){
+ Timer(Duration(milliseconds: 4500), () {
+ controller1.stop();
+ }); // ok
+ }
+
+ }
+ else if(nextQuestion == 13){
+ // ์ถ์ต ์ฌ๋ฆฌ๊ธฐ
+ }
+ else if(nextQuestion >13 && nextQuestion <15){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 15){
+ Timer(Duration(milliseconds: 2500), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(nextQuestion == 15){
+ // ๋ญํ๊ณ ์์๊น?
+
+ }
+ else if(nextQuestion >15 && nextQuestion < 18){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 17){
+ Timer(Duration(milliseconds: 4500), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 18){
+ Timer(Duration(milliseconds: 4500), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(nextQuestion == 18){
+ // ๋ฏธ๋์ ์ด๋ค ์ฌ๋์ด?
+
+ }
+ else if(nextQuestion > 18 && nextQuestion < 26){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 20){
+ Timer(Duration(milliseconds: 4500), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 21){
+ Timer(Duration(milliseconds: 4500), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 22){
+ Timer(Duration(milliseconds: 5000), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 23){
+ Timer(Duration(milliseconds: 2500), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 24){
+ Timer(Duration(milliseconds: 4500), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 25){
+ Timer(Duration(milliseconds: 4500), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 26){
+ Timer(Duration(milliseconds: 4500), () {
+ controller1.stop();
+ });
+ }
+
+ }
+ else if(nextQuestion == 26){
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => EndMarkCoachPage()));
+ }
+
+
+ setState(() {
+ });
+ },
+ child: Scaffold(
+ backgroundColor: Colors.transparent,
+ appBar: AppBar(
+ //title: Text("๊ธฐ์ตํ ๊ฐ", style: TextStyle(fontSize:16, color: Colors.white ),),
+ //centerTitle: true,
+ leading: IconButton(
+ icon: SvgPicture.asset(
+ 'assets/images/conversation/home_icon.svg',
+ ),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ backgroundColor: Colors.transparent,
+ elevation: 0.0,
+ ),
+ //extendBodyBehindAppBar: true,
+ body:
+ SingleChildScrollView(
+ child: Container(
+ child: Column(
+ children: [
+ SizedBox(height: 3,),
+ Container(
+ width: screenSize.width,
+ height: 25,
+ child: Padding(
+ padding: EdgeInsets.only( left:16, right: 16),
+ child: Center(
+ child: FAProgressBar(
+ currentValue: 95,
+ size: 5,
+ backgroundColor: Colors.white,
+ )
+ ),
+ ),
+ ),
+ Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children:[
+ SizedBox(
+ height: 10,
+ ),
+ Stack(
+ children: [
+ Container(
+ height: 157,
+ width: screenSize.width,
+ child:
+ Stack(
+ children: [
+ Center(child: SvgPicture.asset('assets/images/conversation/bubble.svg',fit: BoxFit.fill,),),
+ Container(
+ padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 12, ),
+ child: Center(
+ child: Column(
+ children: [
+ if(endConversation[nextQuestion].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ endConversation[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ endConversation[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+ ],
+ )
+ )
+ ),
+ ],
+ )
+ ),
+ // ๋ฌด์ง ์์น
+ if(nextQuestion < 13 || (nextQuestion > 13 && nextQuestion < 15) ||(nextQuestion > 15) )...[
+ Stack(
+ children: [
+ // ์ ์ ์์น
+ Column(
+ children: [
+ SizedBox(height: 420,),
+ Container(
+ child: SvgPicture.asset(
+ 'assets/images/conversation/user7.svg',
+ height: 282,
+ width: screenSize.width,
+ ),
+ ),
+ ],
+ ),
+ Column(
+ children: [
+ SizedBox(height: 144,),
+ Container(
+ width: screenSize.width,
+ height: 375,
+ child:
+ Stack(
+ children: [
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_ear.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base.gif', fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base_eye.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child:GifImage(
+ controller: controller1,
+ image: const AssetImage("assets/images/conversation/gif/muji_mouth1.gif"),
+ ),
+ // Image.asset('assets/images/conversation/gif/muji_mouth1.gif', fit: BoxFit.cover,),
+ )
+ ],
+ )
+
+ // SvgPicture.asset(
+ // 'assets/images/conversation/con_muji.svg', fit: BoxFit.cover,
+ // ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ]
+ else if(nextQuestion == 13)...[
+ Container(
+ width: screenSize.width,
+ height: 750,
+ child: Column(
+ children: [
+ Expanded(
+ child: Column(
+ children: [
+ Stack(
+ children: [
+ Padding(
+ padding: EdgeInsets.only(top: 160, left:16),
+ child: SvgPicture.asset('assets/images/conversation/end/paper.svg',
+ fit: BoxFit.contain,
+ height: 452,
+ width: screenSize.width,
+ ),
+ ),
+ Padding(
+ padding: EdgeInsets.only(top: 192, left:32),
+ child: InkWell(
+ onTap: (){
+ getImage(ImageSource.gallery);
+ },
+ child: modiImage?
+ Container(width: 320, height: 320,child: Image.file(File(_image!.path),fit: BoxFit.cover,),)
+ :
+ SvgPicture.asset('assets/images/conversation/end/add_btn.svg',
+ fit: BoxFit.contain,
+ height: 320,
+ width: screenSize.width,
+ ),
+ ),
+ ),
+ Padding(
+ padding: EdgeInsets.only(top:528,left: 32, right:32, bottom:16),
+ child: SizedBox(
+ width: screenSize.width,
+ //height: 150,
+ child: TextField(
+ style: textStyle.bubbletext,
+ controller: memoryController,
+ decoration: InputDecoration(
+ contentPadding: EdgeInsets.only(top:3, left: 0),
+ hintStyle: textStyle.bubbletext,
+ border: InputBorder.none,
+ focusedBorder: InputBorder.none,
+ hintText: '์ด๊ณณ์ ๊ทธ๋ ์ ์ถ์ต์ ์์ฑํด์ฃผ์ธ์.(75์)',
+ counterText:'',
+ ),
+ maxLines: 2,
+ maxLength: 75,
+ onTap: (){
+ // ํธ์ง์ง ์ฌ๋ฆฌ๊ธฐ?
+ },
+ onChanged: (text){
+ // ํธ์ง๋ฅผ ์จ์ผ ๋ค์์ผ๋ก ๋์ด๊ฐ ์ ์๋๋ก ์ค์
+ memory = true;
+ setState(() {});
+ },
+ ),
+ ),
+ ),
+ ],
+ )
+ ],
+ )
+ ),
+ ],
+ )
+ ),
+ // Stack(
+ // children: [
+ // Padding(
+ // padding: EdgeInsets.only(top: 160, left:16),
+ // child: SvgPicture.asset('assets/images/conversation/end/paper.svg',
+ // fit: BoxFit.contain,
+ // height: 452,
+ // width: screenSize.width,
+ // ),
+ // ),
+ // Padding(
+ // padding: EdgeInsets.only(top: 192, left:32),
+ // child: InkWell(
+ // onTap: (){
+ // getImage(ImageSource.gallery);
+ // },
+ // child: modiImage?
+ // Container(width: 320, height: 320,child: Image.file(File(_image!.path),fit: BoxFit.cover,),)
+ // :
+ // SvgPicture.asset('assets/images/conversation/end/add_btn.svg',
+ // fit: BoxFit.contain,
+ // height: 320,
+ // width: screenSize.width,
+ // ),
+ // ),
+ // ),
+ // Padding(
+ // padding: EdgeInsets.only(top:528,left: 32, right:32, bottom:16),
+ // child: SizedBox(
+ // width: screenSize.width,
+ // //height: 150,
+ // child: TextField(
+ // style: textStyle.bubbletext,
+ // controller: memoryController,
+ // decoration: InputDecoration(
+ // contentPadding: EdgeInsets.only(top:3, left: 0),
+ // hintStyle: textStyle.bubbletext,
+ // border: InputBorder.none,
+ // focusedBorder: InputBorder.none,
+ // hintText: '์ด๊ณณ์ ๊ทธ๋ ์ ์ถ์ต์ ์์ฑํด์ฃผ์ธ์.(75์)',
+ // counterText:'',
+ // ),
+ // maxLines: 2,
+ // maxLength: 75,
+ // onTap: (){
+ // // ํธ์ง์ง ์ฌ๋ฆฌ๊ธฐ?
+ // },
+ // onChanged: (text){
+ // // ํธ์ง๋ฅผ ์จ์ผ ๋ค์์ผ๋ก ๋์ด๊ฐ ์ ์๋๋ก ์ค์
+ // memory = true;
+ // setState(() {});
+ // },
+ // ),
+ // ),
+ // ),
+ // ],
+ // )
+ ]
+ else if(nextQuestion == 15)...[
+ Stack(
+ children: [
+ Column(
+ children: [
+ SizedBox(height: 160,),
+ Image.asset('assets/images/conversation/end/future.png',
+ fit: BoxFit.contain,
+ height: 400,
+ width: screenSize.width,
+ ),
+ // SvgPicture.asset('assets/images/conversation/end/future.png',
+ // fit: BoxFit.contain,
+ // height: 400,
+ // width: screenSize.width,
+ // ),
+ ],
+ ),
+ Column(
+ children: [
+ SizedBox(height: 182,),
+ Padding(padding: EdgeInsets.only(left: 29),
+ child: SvgPicture.asset('assets/images/conversation/end/one.svg',
+ fit: BoxFit.contain,
+ height: 28,
+ ),),
+ SizedBox(height: 72,),
+ Padding(padding: EdgeInsets.only(left: 29),
+ child: SvgPicture.asset('assets/images/conversation/end/two.svg',
+ fit: BoxFit.contain,
+ height: 28,
+ ),),
+ SizedBox(height: 68,),
+ Padding(padding: EdgeInsets.only(left: 29),
+ child: SvgPicture.asset('assets/images/conversation/end/three.svg',
+ fit: BoxFit.contain,
+ height: 28,
+ ),),
+ SizedBox(height: 68,),
+ Padding(padding: EdgeInsets.only(left: 29),
+ child: SvgPicture.asset('assets/images/conversation/end/five.svg',
+ fit: BoxFit.contain,
+ height: 28,
+ ),),
+
+ ],
+ ),
+
+ Padding(padding: EdgeInsets.only(left: 32, right: 32, top:200),
+ child: Column(
+ children: [
+ TextField(
+ style: textStyle.bk16normal,
+ controller: oneController,
+ decoration: InputDecoration(
+ contentPadding: EdgeInsets.only(top:3, left: 0),
+ hintStyle: textStyle.grey16normal,
+ border: InputBorder.none,
+ focusedBorder: InputBorder.none,
+ hintText: '1๋
ํ์ ๋๋...',
+ counterText:'',
+ ),
+ maxLines: 1,
+ maxLength: 50,
+ onTap: (){
+ // ํธ์ง์ง ์ฌ๋ฆฌ๊ธฐ?
+ },
+ onChanged: (text){
+ // ํธ์ง๋ฅผ ์จ์ผ ๋ค์์ผ๋ก ๋์ด๊ฐ ์ ์๋๋ก ์ค์
+ one = true;
+ setState(() {});
+ },
+ ),
+ SizedBox(height: 48,),
+ TextField(
+ style: textStyle.bk16normal,
+ controller: twoController,
+ decoration: InputDecoration(
+ contentPadding: EdgeInsets.only(top:3, left: 0),
+ hintStyle: textStyle.grey16normal,
+ border: InputBorder.none,
+ focusedBorder: InputBorder.none,
+ hintText: '2๋
ํ์ ๋๋...',
+ counterText:'',
+ ),
+ maxLines: 1,
+ maxLength: 50,
+ onTap: (){
+ // ํธ์ง์ง ์ฌ๋ฆฌ๊ธฐ?
+ },
+ onChanged: (text){
+ // ํธ์ง๋ฅผ ์จ์ผ ๋ค์์ผ๋ก ๋์ด๊ฐ ์ ์๋๋ก ์ค์
+ two = true;
+ setState(() {});
+ },
+ ),
+ SizedBox(height: 48,),
+ TextField(
+ style: textStyle.bk16normal,
+ controller: threeController,
+ decoration: InputDecoration(
+ contentPadding: EdgeInsets.only(top:3, left: 0),
+ hintStyle: textStyle.grey16normal,
+ border: InputBorder.none,
+ focusedBorder: InputBorder.none,
+ hintText: '3๋
ํ์ ๋๋...',
+ counterText:'',
+ ),
+ maxLines: 1,
+ maxLength: 50,
+ onTap: (){
+ // ํธ์ง์ง ์ฌ๋ฆฌ๊ธฐ?
+ },
+ onChanged: (text){
+ // ํธ์ง๋ฅผ ์จ์ผ ๋ค์์ผ๋ก ๋์ด๊ฐ ์ ์๋๋ก ์ค์
+ three = true;
+ setState(() {});
+ },
+ ),
+ SizedBox(height: 48,),
+ TextField(
+ style: textStyle.bk16normal,
+ controller: fiveController,
+ decoration: InputDecoration(
+ contentPadding: EdgeInsets.only(top:3, left: 0),
+ hintStyle: textStyle.grey16normal,
+ border: InputBorder.none,
+ focusedBorder: InputBorder.none,
+ hintText: '5๋
ํ์ ๋๋...',
+ counterText:'',
+ ),
+ maxLines: 1,
+ maxLength: 50,
+ onTap: (){
+ // ํธ์ง์ง ์ฌ๋ฆฌ๊ธฐ?
+ },
+ onChanged: (text){
+ // ํธ์ง๋ฅผ ์จ์ผ ๋ค์์ผ๋ก ๋์ด๊ฐ ์ ์๋๋ก ์ค์
+ five = true;
+ setState(() {});
+ },
+ ),
+ SizedBox(height: 48,),
+ ],
+ ),
+ ),
+
+
+ ],
+ )
+
+ ]
+ ],
+ ),
+
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+
+ // // nextQuestion ์ด 3๊ณผ 7์ผ๋ ๋ฑ์ฅ
+ bottomSheet: Padding(
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).viewInsets.bottom * 0.001),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ if(nextQuestion == 8)...[
+ Container(
+ color: Colors.white,
+ height: 48,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 8.0, top: 8.0, left: 16,right: 16),
+ child: Stack(
+ children: [
+ Container(
+ width: screenSize.width,
+ height: 48,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(color: me? Color(colorChart.blue): Color(0xffC0D2FC)),
+ borderRadius: BorderRadius.circular(30),
+ ),
+ ),
+ Positioned(
+ left: 15,
+ right: 30,
+ bottom: -4,
+ child: TextField(
+ textAlignVertical: TextAlignVertical.center,
+ maxLines: 1,
+ controller: meController,
+ style: textStyle.bk14normal,
+ decoration: InputDecoration(
+ hintStyle: textStyle.grey14normal,
+ border: InputBorder.none,
+ hintText: 'ํ์์ ๋ ์์ ์ ๋ํด ์ค๋ช
ํ์๋ฉด...'),
+ onChanged: (s) {
+ //text = s;
+ me = true;
+ setState(() {
+
+ });
+ },
+ onTap: () {},
+ ),
+ ),
+ Positioned(
+ left: screenSize.width - 81,
+ //right: 30,
+ bottom: 3,
+ top: 3,
+ child: ElevatedButton(
+ onPressed: () {
+ if(me){
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+
+ nextQuestion++;
+ setState(() {
+
+ });
+ }
+
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: me?Color(colorChart.blue):Color(0xffDDE7FD),
+ fixedSize: const Size(23, 23),
+ shape: const CircleBorder(),
+ ),
+ child: Icon(
+ Icons.arrow_upward,
+ color: Colors.white,
+ size: 16,
+ )),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ]
+ else if(nextQuestion == 13 && memory)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ //decidedType = false;
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 8000), () {
+ controller1.stop();
+ });
+ setState(() {});
+ },
+ child: Text("์๋ฃ", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ else if(nextQuestion == 15 && one && two && three && five)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ //decidedType = false;
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ setState(() {});
+ },
+ child: Text("์๋ฃ", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ else if(nextQuestion == 18)...[
+ Container(
+ color: Colors.white,
+ width: screenSize.width,
+ height: 48,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 8.0, top: 8.0, left: 16,right: 16),
+ child: Stack(
+ children: [
+ Container(
+ width: screenSize.width,
+ height: 48,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(color: future? Color(colorChart.blue):Color(0xffC0D2FC)),
+ borderRadius: BorderRadius.circular(30),
+ ),
+ ),
+ Positioned(
+ left: 15,
+ right: 30,
+ bottom:-4,
+ child: TextField(
+ textAlignVertical: TextAlignVertical.center,
+ maxLines: 1,
+ controller: futureController,
+ style: textStyle.bk14normal,
+ decoration: InputDecoration(
+ hintStyle: textStyle.grey14normal,
+ border: InputBorder.none,
+ hintText: '๋๋ ๋ฏธ๋์...'),
+ onChanged: (s) {
+ //text = s;
+ future = true;
+ setState(() {
+
+ });
+ },
+ onTap: () {},
+ ),
+ ),
+ Positioned(
+ left: screenSize.width - 81,
+ //right: 30,
+ bottom: 3,
+ top: 3,
+ child: ElevatedButton(
+ onPressed: () {
+ if(future){
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ Timer(Duration(milliseconds: 3500), () {
+ controller1.stop();
+ });
+
+ nextQuestion++;
+ setState(() {
+
+ });
+ }
+
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: future? Color(colorChart.blue):Color(0xffC0D2FC),
+ fixedSize: const Size(23, 23),
+ shape: const CircleBorder(),
+ ),
+ child: Icon(
+ Icons.arrow_upward,
+ color: Colors.white,
+ size: 16,
+ )),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ]
+
+ ],
+ ),
+ )),
+ )
+
+ );
+
+ }
+}
+
+
diff --git a/client/lib/conversation/end_period/end2.dart b/client/lib/conversation/end_period/end2.dart
new file mode 100644
index 0000000..30f2b5f
--- /dev/null
+++ b/client/lib/conversation/end_period/end2.dart
@@ -0,0 +1,480 @@
+import 'dart:async';
+import 'dart:convert';
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:client/screen.dart';
+import 'package:http/http.dart' as http;
+import 'package:client/progressbar/animation_progressbar.dart';
+import 'package:client/style.dart';
+import 'package:intl/intl.dart';
+import 'package:just_audio/just_audio.dart';
+import 'package:flutter_gif/flutter_gif.dart';
+import 'package:client/sign/sign_in.dart' as sign_in;
+import 'package:client/main.dart'as main;
+
+/// ์ข
๊ฒฐ๊ธฐ ๋ํ
+
+List endConversation = [
+ "๋ณดํธ์๋,", //27
+ "์ด์ ๋ชจ๋ ๋ํ๊ฐ ๋์ด ๋ฌ์ด์!", //28
+ "๊ทธ๋์ ํจ๊ปํ ๋ํ๋\n ์์คํ๊ณ ์๋ฏธ ์๋ ์๊ฐ์ด์์ด์.", //29
+ "์ด์ ๋ํ๋ ์ข
๋ฃ๋์ง๋ง,", //30
+ "๊ทธ๋์์ ์๊ฐ๋ค์\n ๊ธฐ์ต ์์ ๊ฐ์ง๋๊ธฐ๋ฅผ ๋ฐ๋ผ์.", //31
+ "์ง๊ธ๊น์ง\n ๋ํ์ ์ฌ์ ์ ํจ๊ป ํด์ค์ ๊ณ ๋ง์์!", //32
+
+ "์ด์ โ๊ธฐ์ตํ ๊ฐโ ์\n์๋ก์ด ์ผ์์ด ๋น์ ์ ๊ธฐ๋ค๋ฆฌ๊ณ ์์ด์.", //33
+ " ์ด ๋ํ๋ฅผ ๋ซ๊ณ ๋๊ฐ๋ ์๊ฐ,", //34
+ "์ถ์ ๋ค์ ์ฅ์ด ํผ์ณ์ง๊ธฐ๋ฅผ ๋ฐ๋๋๋ค.", //35
+];
+
+AudioPlayer player2 = AudioPlayer();
+
+late FlutterGifController controller1, controller2, controller3;
+
+List voice =[
+ "assets/voice/end/endp2_1.mp3",
+ "assets/voice/end/endp2_2.mp3",
+ "assets/voice/end/endp2_3.mp3",
+ "assets/voice/end/endp2_4.mp3",
+ "assets/voice/end/endp2_5.mp3",
+ "assets/voice/end/the_end.mp3",
+ "",""
+];
+
+class End2Page extends StatefulWidget {
+
+ static Future navigatorPush(BuildContext context) async {
+ return Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (_) => End2Page(),
+ ),
+ );
+ }
+
+ @override
+ _End2PageState createState() => _End2PageState();
+}
+
+class _End2PageState extends State with TickerProviderStateMixin {
+
+
+ // ํ
์คํธ ์๋ํ
์ปจํธ๋กค๋ฌ๋ฅผ ์์ฑํ์ฌ ํ๋์ ํ ๋น
+ final meController = TextEditingController();
+ final memoryController = TextEditingController();
+ final futureController = TextEditingController();
+ final oneController = TextEditingController();
+ final twoController = TextEditingController();
+ final threeController = TextEditingController();
+ final fiveController = TextEditingController();
+
+ bool me = false;
+ bool memory = false;
+ bool future = false;
+ bool one = false;
+ bool two = false;
+ bool three = false;
+ bool five = false;
+
+
+ FocusNode _focusNode = FocusNode();
+
+ @override
+ void initState() {
+ super.initState();
+ // ์์ ์ ์ฉ
+ for(int i= 0 ; i < voice.length; i++){
+ player2.setAudioSource(AudioSource.uri(
+ Uri.parse(voice[i]))
+ );
+ }
+
+ controller1 = FlutterGifController(vsync: this);
+
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 1000), () {
+ controller1.stop();
+ });
+
+ _focusNode.addListener(_onFocusChange);
+ }
+
+ void _onFocusChange() {
+ if (_focusNode.hasFocus) {
+ // ํค๋ณด๋ ์ฌ๋ฆฌ๊ธฐ
+ FocusScope.of(context).requestFocus(_focusNode);
+ }
+ }
+
+ @override
+ void dispose() async {
+ super.dispose();
+ }
+
+ List introText =[];
+ int nextQuestion = 0;
+ int voiceCount = 0;
+
+ // ${home.user}
+
+ String sentDate = "";
+ // ๋ํ ๋จ๊ณ ์ ์ฅ
+ void saveCon(String aToken, String con, String nextcon) async {
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/user/conversation-status';
+
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "conversationStatus": con,
+ "nextConversationAt": nextcon,
+ };
+
+ // ํค๋ ์ ๋ณด ์ค์
+ Map headers = {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ };
+
+ // HTTP GET ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.put(
+ Uri.parse(apiUrl),
+ body: json.encode(data),
+ headers: headers, // ํค๋ ์ถ๊ฐ
+ );
+
+ ///var jsonResponse = utf8.decode(response.bodyBytes);
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ print("๋ํ ๋จ๊ณ ๋ฃ๊ธฐ ์ฑ๊ณต");
+ setState(() {
+ });
+
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ: ${response.statusCode}');
+ }
+ }
+
+
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+ return
+ Container(
+ decoration: (nextQuestion > 5) ?
+ BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.topRight,
+ end: Alignment.bottomLeft,
+ colors: [
+ Color(0xffE4ECFF),
+ Color(0xffA2BEFF),
+ ],
+ )
+ ) :
+ BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.topRight,
+ end: Alignment.bottomLeft,
+ colors: [
+ Color(0xffDDE7FD),
+ Color(0xffDDE7FD),
+ ],
+ )
+ ),
+ child: GestureDetector(
+ onTap: (){
+ print("ํ์ธ: " + nextQuestion.toString());
+
+ if(nextQuestion < 8){
+ nextQuestion++; // ์ธํธ๋ก ์์ ํ count
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 1){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 2){
+ Timer(Duration(milliseconds: 4500), () {
+ controller1.stop();
+ }); // ok
+ } else if(nextQuestion == 3){
+ Timer(Duration(milliseconds: 2500), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 4){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 5){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 6){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 7){
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 8){
+ // ํ์์์
+ // Timer(Duration(milliseconds: 3000), () {
+ // controller1.stop();
+ // });
+ }
+ }
+ else if(nextQuestion == 8){
+ }
+
+ setState(() {
+ });
+ },
+ child: Scaffold(
+ backgroundColor: Colors.transparent,
+ appBar: AppBar(
+ //title: Text("๊ธฐ์ตํ ๊ฐ", style: TextStyle(fontSize:16, color: Colors.white ),),
+ //centerTitle: true,
+ leading: IconButton(
+ icon: SvgPicture.asset(
+ 'assets/images/conversation/home_icon.svg',
+ ),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ backgroundColor: Colors.transparent,
+ elevation: 0.0,
+ ),
+ //extendBodyBehindAppBar: true,
+ body:
+ SingleChildScrollView(
+ child: Container(
+ child: Column(
+ children: [
+ SizedBox(height: 3,),
+ Container(
+ width: screenSize.width,
+ height: 25,
+ child: Padding(
+ padding: EdgeInsets.only( left:16, right: 16),
+ child: Center(
+ child: FAProgressBar(
+ currentValue: 100,
+ size: 5,
+ backgroundColor: Colors.white,
+ )
+ ),
+ ),
+ ),
+ if(nextQuestion > 5)...[
+ Container(
+ width: screenSize.width,
+ height: screenSize.height,
+ child: Column(
+ //mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ SizedBox(height: 64,),
+ SvgPicture.asset('assets/images/conversation/intro/intro_star.svg',fit: BoxFit.fill,),
+ SizedBox(height: 64,),
+ Stack(
+ children: [
+ SvgPicture.asset('assets/images/conversation/intro/intro_bubble.svg',fit: BoxFit.fill,),
+ Padding(padding:nextQuestion >6? EdgeInsets.only(left:61, top:64) : EdgeInsets.only(left:52, top:48),
+ child: Text(
+ endConversation[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.introbubbletext
+ ),
+ ),
+
+ ],
+ ),
+ SizedBox(height: 96,),
+ Container(width: screenSize.width,
+ child: SvgPicture.asset('assets/images/conversation/intro/intro_cloud.svg',fit: BoxFit.fill,),
+ ),
+ ],
+ ),
+ ),
+ ] else...[
+ Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children:[
+ SizedBox(
+ height: 10,
+ ),
+ Stack(
+ children: [
+ Container(
+ height: 157,
+ width: screenSize.width,
+ child:
+ Stack(
+ children: [
+ Center(child: SvgPicture.asset('assets/images/conversation/bubble.svg',fit: BoxFit.fill,),),
+ Container(
+ padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 12, ),
+ child: Center(
+ child: Column(
+ children: [
+ if(endConversation[nextQuestion].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ endConversation[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ endConversation[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+ ],
+ )
+ )
+ ),
+ ],
+ )
+ ),
+ // ๋ฌด์ง ์์น
+ if(nextQuestion < 6)...[
+ Stack(
+ children: [
+ // ์ ์ ์์น
+ Column(
+ children: [
+ SizedBox(height: 420,),
+ Container(
+ child: SvgPicture.asset(
+ 'assets/images/conversation/user7.svg',
+ height: 282,
+ width: screenSize.width,
+ ),
+ ),
+ ],
+ ),
+ Column(
+ children: [
+ SizedBox(height: 144,),
+ Container(
+ width: screenSize.width,
+ height: 375,
+ child:
+ Stack(
+ children: [
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_ear.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base.gif', fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base_eye.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child:GifImage(
+ controller: controller1,
+ image: const AssetImage("assets/images/conversation/gif/muji_mouth1.gif"),
+ ),
+ // Image.asset('assets/images/conversation/gif/muji_mouth1.gif', fit: BoxFit.cover,),
+ )
+ ],
+ )
+
+ // SvgPicture.asset(
+ // 'assets/images/conversation/con_muji.svg', fit: BoxFit.cover,
+ // ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ]
+ else if(nextQuestion >= 6)...[
+ ]
+ ],
+ ),
+ ],
+ ),
+ ],
+
+ ],
+ ),
+ ),
+ ),
+
+ // // nextQuestion ์ด 3๊ณผ 7์ผ๋ ๋ฑ์ฅ
+ bottomSheet: Padding(
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).viewInsets.bottom * 0.001),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ if(nextQuestion == 8)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ var now = DateTime.now();
+ sentDate = DateFormat('yyyy-MM-dd hh:mm:ss').format(now.toLocal());
+ saveCon(sign_in.userAccessToken, "4", sentDate);
+
+ main.player.stop();
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => MyScreenPage(title: '์คํฌ๋ฆฐ ํ์ด์ง',)));
+ setState(() {});
+ },
+ child: Text("์๋ฃ", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ ],
+ ),
+ )),
+ )
+
+ );
+
+ }
+}
+
diff --git a/client/lib/conversation/end_period/end_coach_mark.dart b/client/lib/conversation/end_period/end_coach_mark.dart
new file mode 100644
index 0000000..8eba59d
--- /dev/null
+++ b/client/lib/conversation/end_period/end_coach_mark.dart
@@ -0,0 +1,236 @@
+import 'dart:async';
+import 'dart:convert';
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/services.dart';
+import 'package:http/http.dart' as http;
+import 'package:client/conversation/end_period/end2.dart';
+import 'package:client/style.dart';
+
+/// ์ข
๊ฒฐ๊ธฐ_์ฝ์น๋งํฌ
+class EndMarkCoachPage extends StatefulWidget {
+
+ static Future navigatorPush(BuildContext context) async {
+ return Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (_) => EndMarkCoachPage(),
+ ),
+ );
+ }
+
+ @override
+ _EndMarkCoachPageState createState() => _EndMarkCoachPageState();
+}
+
+class _EndMarkCoachPageState extends State {
+
+ FocusNode _focusNode = FocusNode();
+
+ @override
+ void initState() {
+ super.initState();
+ _callAPI();
+ _focusNode.addListener(_onFocusChange);
+ }
+
+ void _onFocusChange() {
+ if (_focusNode.hasFocus) {
+ // ํค๋ณด๋ ์ฌ๋ฆฌ๊ธฐ
+ FocusScope.of(context).requestFocus(_focusNode);
+ }
+ }
+
+ @override
+ void dispose() async {
+ super.dispose();
+ }
+
+ int nextPage = 0;
+
+ List questions0 =[
+ "๋์ ๋ด์ญ ์ฝ์น ๋งํฌ1:\n\n๋ค๋ฅธ ๋ฐ๋ ค์ธ๋ค์ด ๋์๊ฒ ์์ฒญํ\n๋์์ ํ์ธํด๋ณด์ธ์.",
+ "๋์ ๋ด์ญ ์ฝ์น ๋งํฌ2:\n\n์๋ก๋ฅผ ์ง์งํ๋ ๋ง์์ผ๋ก\n๋์์ ๋ณด๋ผ์ ์์ด์.",
+ ];
+
+ int nextQuestion = 0;
+
+
+ void _callAPI() async {
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "stage" : "0",
+ "set" : "0",
+ "lineId" : "0"
+ };
+
+ var url = Uri.parse('http://3.38.1.125:8080/conversation/line'); // ์๋ํฌ์ธํธ URL ์ค์
+
+ try {
+ var response = await http.post(
+ url,
+ body: json.encode(data), // ์์ฒญ ๋ณธ๋ฌธ์ ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ์ธ์ฝ๋ฉํ์ฌ ์ ๋ฌ
+ headers: {'Content-Type': 'application/json',}, // ์์ฒญ ํค๋์ Content-Type ์ค์
+ );
+
+ if (response.statusCode == 200) {
+ // ์๋ต ์ฑ๊ณต ์์ ์ฒ๋ฆฌ
+
+ var jsonResponse = utf8.decode(response.bodyBytes); // ์๋ต ๋ณธ๋ฌธ์ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ // JSON ๊ฐ์ ํ์ฉํ ์ํ๋ ๋์ ์ํ
+ //utf8.decode(jsonResponse);
+ print(jsonResponse);
+
+ List contentList = [];
+
+ List parsedResponse = json.decode(jsonResponse);
+
+
+ print('API ํธ์ถ ์ฑ๊ณต: ${response.statusCode}');
+ } else {
+ // ์์ฒญ ์คํจ ์์ ์ฒ๋ฆฌ
+ print('API ํธ์ถ ์คํจ: ${response.statusCode}');
+ }
+ } catch (e) {
+ // ์์ธ ๋ฐ์ ์์ ์ฒ๋ฆฌ
+ print('API ํธ์ถ ์ค ์์ธ ๋ฐ์: $e');
+ }
+ }
+
+
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+ return
+ Container(
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.topRight,
+ end: Alignment.bottomLeft,
+ colors: [
+ Color(0xffE4ECFF),
+ Color(0xffA2BEFF),
+ ],
+ )
+ ),
+ child: GestureDetector(
+ onTap: (){
+ print(nextQuestion);
+ if(nextPage == 1){
+ // Navigator.pop(context); // early2๋ก ๊ฐ๊ธฐ
+ // intro2.player2.setAsset(intro2.voice[2]);
+ // intro2.player2.play();
+ } else if(nextPage < 1){
+ nextPage++;
+ }
+
+ setState(() {
+ });
+ },
+ child: Scaffold(
+ backgroundColor: Colors.transparent,
+ appBar: AppBar(
+ //title: Text("๊ธฐ์ตํ ๊ฐ", style: TextStyle(fontSize:16, color: Colors.white ),),
+ //centerTitle: true,
+ backgroundColor: Colors.transparent,
+ elevation: 0.0,
+ automaticallyImplyLeading: false,
+ ),extendBodyBehindAppBar: true,
+ body:
+ Container(
+ child: Column(
+ children: [
+ Stack(
+ children: [
+ // Padding(padding: EdgeInsets.only(left: 12, top: 125),
+ // child: SvgPicture.asset('assets/images/conversation/intro/coach01.svg',
+ // height: 624,
+ // width: 380, fit: BoxFit.fill,),
+ // ),
+
+ if(nextPage == 0)...[
+ Padding(padding: EdgeInsets.only(left: 60, top: 145),
+ child: Container(
+ width: 260,
+ height: 575,
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(24.0),
+ child: Image.asset('assets/images/conversation/end/sc1.png',
+ fit: BoxFit.fill,)
+ ),
+ ),
+ ),
+ ] else if(nextPage == 1)...[
+ Padding(padding: EdgeInsets.only(left: 60, top: 145),
+ child: Container(
+ width: 260,
+ height: 575,
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(24.0),
+ child: Image.asset('assets/images/conversation/end/sc2.png',
+ fit: BoxFit.fill,)
+ ),
+ ),
+ ),
+ ],
+ Padding(padding: EdgeInsets.only(left: 170, top: 706),
+ child: Container(
+ width: 40,
+ height: 2,
+ child: Container(
+ width: 40, height: 2,
+ color: Colors.white,
+ )
+ ),
+ ),
+ ],
+ )
+ ],
+ ),
+ ),
+
+ bottomSheet: Padding(
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).viewInsets.bottom * 0.001),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ if(nextPage == 1)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ // ์ด๊ธฐ2๋ก ์ด๋
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => End2Page()));
+ },
+ child: Text("๋ค์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ ],
+ ),
+ ),
+
+ ),
+ )
+
+ );
+
+ }
+}
diff --git a/client/lib/conversation/helpme.dart b/client/lib/conversation/helpme.dart
new file mode 100644
index 0000000..65bbe17
--- /dev/null
+++ b/client/lib/conversation/helpme.dart
@@ -0,0 +1,620 @@
+"${intro.userName_}๋!\n ๊ธฐ์ตํ ๊ฐ๊ฐ ์์ฑ๋์์ด์.", // 0
+"๊ธฐ์ตํ ๊ฐ๋ฅผ ํ์ธํด๋ณด์ธ์!", //1
+"${intro.userName_}๋!", //2
+"์ค๋์ ${intro.userName_}๋๊ณผ์ \n์ฒซ๋ง๋จ์ด์์ง๋ง", //3
+"${intro.dogName_}๊ฐ ์ผ๋ง๋ ๋ง์ ์ฌ๋์ \n๋ฐ์๋์ง ๋๋ ์ ์์์ด์.", //4
+"์์ผ๋ก ์ ์ ํจ๊ป \n${intro.dogName_}์์ ์๊ฐ๋ค์ ๊ธฐ์ตํ๋ฉฐ,", //5
+"${intro.dogName_}๋์ ๋ง์ ์ ์์ ์ \n์ฐพ์๊ฐ๊ธธ ๋ฐ๋ผ์.", //6
+"์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์ ๋ง๋๊ฒ ๋ \n์๊ฐ์ ์๋ ค์ฃผ์ธ์.", //7
+"๋ค, ${intro.userName_}๋. ๊ทธ๋ ๋ค์ ๋ง๋์!" //8
+
+
+Timer(Duration(seconds: 2), () {
+controller2.stop();
+});
+
+controller2.repeat(
+min: 0,
+max: 30,
+period: const Duration(milliseconds: 4000)
+);
+
+์ฌํํ์ ~
+controller2.repeat(
+min: 0,
+max: 32,
+period: const Duration(milliseconds: 3500)
+);
+Timer(Duration(seconds: 3), () {
+controller2.stop();
+});
+
+
+
+-๋ํ ์์-
+
+"์๋
ํ์ธ์.", //0
+"์ ๋ ๋ฐ๋ ค๊ฒฌ๊ณผ์ ์ด๋ณ์ ๋์์ค\n์ด๋ณ ๋์ฐ๋ฏธ ๋ฌด์ง์์!", //1
+"์์ผ๋ก ์ ์ ๋ํ๋ฅผ ๋ค๋๋ฉด์", //2
+"๋ฐ๋ ค๊ฒฌ์ ๊ธฐ์ตํ๊ณ \n์ ๋ํ ์ ์๊ฒ ๋์๋๋ฆด๊ฒ์.", //3
+"์ ๋ ๋น์ ์ ๋ญ๋ผ๊ณ ๋ถ๋ฅด๋ฉด ์ข์๊น์?", //4
+
+// ํต์ผ๋ก ์ถ๊ฐ
+// "์ข์์. ๋ณดํธ์๋.", // this is modifi //5
+// "์ ๊ฐ ๋ณดํธ์๋๊ณผ์ ๋ํ๋ฅผ ์์ํ๊ธฐ ์ํด", //6
+// "๋ณดํธ์๋์ ๋ํด์\n๋ ์์๊ฐ๋ ค๊ณ ํด์.", //7
+// "๋ค์ ์ง๋ฌธ์ ๋ตํด์ฃผ์ธ์!", // 8
+// "๋ฐ๋ ค๊ฒฌ์ ์ด๋ฆ์ ๋ฌด์์ด์์๊น์?", // this is modifi //9
+//
+// // ํต์ผ๋ก ์ถ๊ฐ
+// "์์ด์ ๋ชจ์ต์ ์ด๋ ๋์? \n๋น์นธ์ ์ฑ์ ์๋ ค์ฃผ์ธ์.", // this is modifi //10
+// "์์ด์ ๋ชจ์ต์ ์ด๋ ๋์? \n๋น์นธ์ ์ฑ์ ์๋ ค์ฃผ์ธ์.", // this is modifi //11
+// "์ข์์, ๋ณดํธ์๋!", // 12
+// "์ง๋ฌธ์ ๋ตํ๋ฉฐ,\n์ ๊น์ด๋๋ง", //13
+// "์์ด์ ๋ํด์ ๋ ์ฌ๋ ค๋ดค๋ ๊ฒ ๊ฐ์์.", //14
+// "์์ด์ ๋ํด์ ์๊ฐํ๋", //15
+// "๋ณดํธ์๋์ ์ด๋ค ๋ง์์ด ๋ค์๋์?", //16
+];
+
+// ๊ทธ๋ฆฌ์ ์์ ํต์ผ๋ก ์ถ๊ฐํ์ธ์
+List questions1_2 =[
+// ์ด์ ๋ ์์ด์\n๋ชจ์ต์ ๋ณด๊ฑฐ๋ ๋ง์ง ์ ์์ง๋ง,
+// ์์ด๋ฅผ ์๊ฐํ๋ฉฐ\n๊ทธ๋ฆฌ์์ ์ฑ์๊ฐ ์ ์์ ๊ฒ ๊ฐ์์.
+// ์์ด์์ ๊ธฐ์ต์\n์ฒ์๋ถํฐ ๋ ์ฌ๋ ค๋ณผ๊น์?
+// ์์ด์์ ๊ธฐ์ต์ด ์์๋๋\n๊ทธ๋ ์ ์ฌ์ง๊ณผ ์ด์ผ๊ธฐ๋ฅผ ๊ธฐ๋กํด๋ด
์๋ค!
+];
+
+// ์ฌํ ์์ ํต์ผ๋ก ์ถ๊ฐํ์ธ์
+List questions1_3 =[
+// "์์ด๊ฐ ๊ณ์ ์๋ ์ง๊ธโฆ",
+// "๋ณดํธ์๋์\n์ฌํ ๋ง์์ด ์ ๊ฒ๋ ๋๊ปด์ ธ์.",
+// "ใ
ใ
์์\n๊ธฐ์ต์ ํ๋์ฉ ๋๋์๋ณด๋ฉด",
+// "์ฌํ ๋ง์์ ๋๊ธฐ์ ๋์์ด ๋ ๊ฑฐ์์.",
+// "์์ด์์ ๊ธฐ์ต์ด ์์๋๋\n๊ทธ๋ ์ ์ฌ์ง๊ณผ ์ด์ผ๊ธฐ๋ฅผ ๊ธฐ๋กํด๋ด
์๋ค!",
+];
+
+
+
+
+
+------
+List question= [
+ "๋!\n๊ธฐ๋ค๋ฆฌ๊ณ ์์์ด์!",
+ "๋ํ๋ฅผ ์์ํด๋ณผ๊น์?",
+];
+
+List yesAns= [
+ "์ค๋์ ์ด๋ค ์ฃผ์ ๋ก ์๊ธฐํด๋ณผ๊น์?",
+];
+
+List noAns= [
+ "๊ทธ๋ผ ์ฐ๋ฆฌ๋ ์ธ์ ๋ค์ ๋ง๋๋ฉด ์ข์๊น์?",
+"๊ทธ๋ผ ์ฐ๋ฆฌ๋ ์ธ์ ๋ค์ ๋ง๋๋ฉด ์ข์๊น์?",
+ "๋ค,()๋ 12์๊ฐ ๋ค์ ๋ค์ ๋ํํด์.",
+"๋ค,()๋ 12์๊ฐ ๋ค์ ๋ค์ ๋ํํด์.",
+];
+
+
+///
+
+List questions0 =[
+ "์ข์์, ๋ณดํธ์๋.", //0 2์ด
+ "์ค๋์ ์์ด์์\n์ด๋ณ์ ๋ํด์ ์๊ธฐํด๋ณด๋๋ก ํด์.", //1 4์ด
+ "๋ง๋จ์ด ์์ผ๋ฉด ์ด๋ณ์ด ์๋ฏ์ด\n์ด๋ณ์ ์๊ฐ์ ๊ฒฐ๊ตญ ์ฐพ์์์. ", //2 5์ด
+ "์กฐ๊ธ ํ๋ค๋๋ผ๋\n์ด๋ณ์ ์๊ฐ์ ๋ ์ฌ๋ฆฌ๋ฉฐ", //3 4์ด
+ "๋ณดํธ์๋์ ๊ฐ์ ๋ค์\n๊ฐ์ด ์ ๋ฆฌํด๋ณด์์.", //4 4์ด
+ "์ด๋ณ์ ์๊ฐ,\n๊ทธ๋ ์ ๋ ์จ๋ ์ด๋ ๋์?", //5 4์ด
+ "์ด๋ณ์ ์๊ฐ,\n๊ทธ๋ ์ ๋ ์จ๋ ์ด๋ ๋์?", //6 4์ด
+
+ // "์์ด์์ ์ด๋ณ์ ์๊ฐ์\n() ๋ ์ด์๊ตฐ์.", //7 4์ด
+ //
+ // "์ฐ๋ฆฌ ๋ณดํธ์๋๊ณผ\n์์ด๋", //8 3์ด
+ // "์ด๋ค ์ฅ์์ ์์๋์? ", //9 3์ด
+ // "์ด๋ค ์ฅ์์ ์์๋์? ", //10 3์ด
+ //
+ // "๊ทธ๋ ๊ตฐ์", //11 2์ด
+ // "()์์", //12 2์ด
+ //
+ // "์์ด์ ์ด๋ณํ๋\n์๊ฐ์ ๋ ์ฌ๋ฆฌ๋ฉฐ ํํ๋๋ ๋ถ๋ถ์ด ์๋์?", //13 5์ด
+];
+// ๋ค ์ ํ์
+List question1_0= [
+ /// "์ด๋ค ๋ถ๋ถ์ด ํํ๊ฐ ๋๋์?",
+ // "๋ณดํธ์๋์ ์๊ธฐ๋ฅผ ๋ค์ด๋ณด๋", // 1 3์ด
+ // "์์ด๋ฅผ ํฅํ ๊ทธ๋ฆฌ์, ํํโฆ", // 2 3์ด
+ // "๊ทธ ์ธ์๋\n๋ค์ํ ๊ฐ์ ๋ค์ด ๋๊ปด์ง๋ ๊ฒ ๊ฐ์์.", // 3 4์ด
+ // "์ด๋ณ์ ์๊ฐ์ ์ง๋๊ฐ๋๋ผ๋", // 4 3์ด
+ // "์์ด๋ฅผ ๊ทธ๋ฆฌ์ํ๋ ๋ง์์\n์ปค์ ธ๋ง ๊ฐ๋ ๊ทธ๋ฐ ๊ฒ ๊ฐ์์.", //5 5์ด
+ // "๊ทธ๋๋ ๋ณดํธ์๋์ด\n์์ด๋ฅผ ์ถ์ตํ ์ ์๊ฒ", //6 4์ด
+ // "โ๊ธฐ์ตํ ๊ฐโ์์ ์์ด์์\n์ถ์ต์ ์ ์ฅํด๋ณด๋ ๊ฒ๋", //7 4์ด
+ // "๊ทธ๋ฆฌ์ด ๋ง์์ ๋ฌ๋๋๋ฐ\n๋์์ด ๋ ๊ฒ ๊ฐ์์.", //8 4์ด
+];
+
+// ์๋์ค ์ ํ์
+List questions1_1 =[
+ /// "๊ทธ๋ ๋ค๋ฉด, ๋คํ์ด์์.", //0
+ // "์ด๋ณ์ ์๊ฐ์ด ์ง๋๊ณ \nํํ๊ฐ ๋จ์ ์ ์์ง๋ง,", //1
+ // "ํํ๊ฐ ๋จ์ง ์์๋ค๋ฉด\n๊ทธ๊ฒ๋ ์ ๋ง ๋๋จํ ์ผ์ด๋ผ๊ณ ์๊ฐํด์.", //2
+ // "๋ณดํธ์๋.\n๋ง์ฝ ์์ด์์", //3
+ // "์ด๋ณ์ ์๊ฐ์ผ๋ก ๋ค์ ๋์๊ฐ๋ค๋ฉด\nํ๊ณ ์ถ์ ๊ฒ๋ค์ด ์์๊น์?",//4 /// ์ฒดํฌ~~~~~~~
+ // "๋ณดํธ์๋์\n์ด๋ณ์ ์๊ฐ์ ์ ๋ณด๋ด์ ๊ฒ ๊ฐ์์.", //5
+ // "๊ทธ ์๊ฐ์ ์์ด๋", //6
+ // "๋ณดํธ์๋์ ๋ง์์\n์จ์ ํ ๋๊ผ์๊ฑฐ์์.", //7
+ // "๊ทธ๋ผ์๋ ์์ด๋ฅผ ํฅํ\n๊ทธ๋ฆฌ์ด ๋ง์์", //8
+ // "์ฌ์ ํ๊ฒ ๋จ์์์ง ์์๊น ์ถ์ด์.", //9
+ // "โ๊ธฐ์ตํ ๊ฐโ์์ ์์ด์์\n์ถ์ต์ ์ ๋ฆฌํด๋ณด๋ฉด", //10
+ // "๊ทธ๋ฆฌ์ด ๋ง์์ ๋ฌ๋๋๋ฐ\n ํฐ ๋์์ด ๋ ๊ฒ ๊ฐ์์.", //11 /// ์ฒดํฌ~~~
+
+];
+
+
+List questionsEnd =[
+ "${home.user}๋,\n์ ๊ฐ ์ค๋นํ ๋ํ๋ ์ฌ๊ธฐ๊น์ง์์. ",
+ "${home.puppy}์\n์ด๋ณ์ ์๊ฐ์ ๊ธฐ์ตํ๋ฉฐ ",
+ "ํ์ง ๋ชปํ ${home.user}๋์\n๊ฐ์ ๋ค์ด ํ์ด์ก์ผ๋ฉด ํ๋ ๋ฐ๋์ด์์.",
+ "์, ์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+ "์, ์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+ // "๋ค, ${home.user}๋.\n()์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+ // "๋ค, ${home.user}๋.\n()์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+];
+
+
+
+
+////
+
+List questions0 =[
+ "์ข์์, ๋ณดํธ์๋.", // 0
+ "์ฌ์ค...\n๋ณดํธ์๋์ ๋ง์์", // 1 ok
+ "์์ด๋ฅผ ํฅํ\n๊ทธ๋ฆฌ์์ด ๊ฐ๋ํด ๋ณด์ฌ์.", // 2 ok
+ "์์ด์์ ๊ธฐ์ต์\n๋ ์ฌ๋ฆฌ๋ฉด", // 3
+ "๋ณดํธ์๋์\n๊ทธ๋ฆฌ์ด ๋ง์์ ๋ฌ๋ ์ ์์ง ์์๊น์?", // 4
+ "์ค๋์ ์์ด์์\n๊ธฐ์ต์ ๋ํด ์๊ธฐํด๋ด์.", // 5
+ "์์ด์ ํจ๊ปํ\nํ ๊ฐ์ง ๊ธฐ์ต์ ๋ ์ฌ๋ ค์ฃผ์ธ์.", // 6
+ "๊ทธ๋ ์ ์ด๋ค ๋ ์จ์๋์?", // 7
+ "๊ทธ๋ ์ ์ด๋ค ๋ ์จ์๋์?", // 8
+
+ // "๊ทธ๋ ๊ตฐ์. ()ํ ๋ ์จ์\n์์ด์ ์ด๋์ ์์๋์?", // 9
+ // "๊ทธ๋ ๊ตฐ์. ()ํ ๋ ์จ์\n์์ด์ ์ด๋์ ์์๋์?", // 10
+ //
+ // "()ํ ๋ ์จ์\n()์์ ์์๊ตฐ์!", // 11
+ // "๋ณดํธ์๋๊ณผ\n์์ด๋ ๋ญ ํ๊ณ ์์์๊น์?", // 12
+ // "๋ณดํธ์๋๊ณผ\n์์ด๋ ๋ญ ํ๊ณ ์์์๊น์?", // 13 ๋
ธ
+ //
+ // "๊ทธ๋ ๋ค๋ฉด ๋ณดํธ์๋๊ณผ\n์์ด๋ ์ด๋ค ๋ชจ์ต์ผ๋ก ๋ณด์ด๋์?", // 14 13
+ // "๊ทธ๋ ๋ค๋ฉด ๋ณดํธ์๋๊ณผ\n์์ด๋ ์ด๋ค ๋ชจ์ต์ผ๋ก ๋ณด์ด๋์?", // 15 14
+ //
+ // "์ฐ๋ฆฌ ์์ด์\n๋ณดํธ์๋์", // 16 15
+ // "()ํ ๋ชจ์ต์\n๋ ์ฌ๋ ค๋ณด๋ฉด", // 17 16
+ // "๋ณดํธ์๋์ ๋ง์์\n์ด๋ค ๊ฒ ๊ฐ๋์?", // 18 17
+ // "๊ณ ๋ฏผ์ค" // 19 18
+];
+
+// ์ฌํ ์ ํ์
+List question1_0= [
+ "${home.user}๋!",
+ "์ง๊ธ ${home.puppy}์์\n๊ธฐ์ต์ ์๊ฐํ๋ฉฐ ๋๋ผ๋ ๊ฐ์ ์",
+ "๋๋ฌด๋ ๋น์ฐํ ๊ฒ์ด์์.",
+ "๊ทธ๋ฆฌ๊ณ ์ด ๊ฐ์ ์\n์ถฉ๋ถํ ๋๋ผ๋ ๊ฒ๋ ์ ๋ง ์ค์ํด์.",
+ "ํ์ง๋ง\n์ ์ ๋์๋ง์ผ๋ก ๋ถ์กฑํ ์ ์๊ธฐ์",
+ "โํจ๊ปํ ๊ฐโ์์\n๋ค๋ฅธ ์ฌ๋๋ค์ ์ด์ผ๊ธฐ๋ฅผ ๋ฃ๊ณ ",
+ "๋์์ ์์ฒญํด ๋ณด๋ ๊ฒ์ ์ถ์ฒ๋๋ ค์!",
+];
+
+// ํ๋ณต ์ ํ์
+List questions1_1 =[
+ "${home.user}๋!",
+ "${home.puppy}์์\n๊ธฐ์ต์ ๋ ์ฌ๋ ค๋ณด๋ฉด",
+ "๋ง๋ฅ ์ฌํ๊ธฐ๋ง ํ์ง๋\n์์ ๊ฒ ๊ฐ์์!",
+ "${home.user}๋์ ๋ง์์ด\n์ ์๋์์ ํ๋ณตํ๊ธธ ๋ฐ๋ผ์.",
+ "์ดํ์๋ ${home.user}๋์\n${home.puppy}๋ฅผ ์๊ฐํ๋ค๋ณด๋ฉด",
+ "๋ถ๋ช
์ฌํ ๊ฐ์ ์ด ์๊ฒจ๋ ์ ์์ด์.",
+ "๊ทธ๋ด๋๋ โํจ๊ปํ ๊ฐโ์์\n๋ค๋ฅธ ์ฌ๋๋ค์ ์ด์ผ๊ธฐ๋ฅผ ๋ฃ๊ณ ",
+ "๋์์ ์์ฒญํด ๋ณด๋ ๊ฒ์ ์ถ์ฒ๋๋ ค์!",
+
+];
+
+List questions1_4 =[
+ "${home.user}๋โฆ",
+ "๋ค๋ฅธ ์ฌ๋๋ค๊ณผ ํจ๊ป\n๋์์ ์ฃผ๊ณ ๋ฐ์ผ๋ฉด์",
+ "์์ผ๋ก ๋ณดํธ์๋์ ๋ง์์\n์์ ์ด ์ฐพ์์ค๊ธฐ๊น์ง",
+ "๋์์ด ๋์์ผ๋ฉด\nํ๋ ๋ฐ๋์ด์์.",
+ "์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+ "์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+];
+
+padding: EdgeInsets.only(bottom:16),
+contentPadding: EdgeInsets.only(top: 16),
+8
+
+
+--------
+
+// farewell
+
+List questions0 =[
+ "์ข์์, ๋ณดํธ์๋.", //0
+ "์ค๋์ ์์ด์์\n์ด๋ณ์ ๋ํด์ ์๊ธฐํด๋ณด๋๋ก ํด์.", //1
+ "๋ง๋จ์ด ์์ผ๋ฉด ์ด๋ณ์ด ์๋ฏ์ด\n์ด๋ณ์ ์๊ฐ์ ๊ฒฐ๊ตญ ์ฐพ์์์. ", //2
+ "์กฐ๊ธ ํ๋ค๋๋ผ๋\n์ด๋ณ์ ์๊ฐ์ ๋ ์ฌ๋ฆฌ๋ฉฐ", //3
+ "๋ณดํธ์๋์ ๊ฐ์ ๋ค์\n๊ฐ์ด ์ ๋ฆฌํด๋ณด์์.", //4
+ "์ด๋ณ์ ์๊ฐ,\n๊ทธ๋ ์ ๋ ์จ๋ ์ด๋ ๋์?", //5
+ "์ด๋ณ์ ์๊ฐ,\n๊ทธ๋ ์ ๋ ์จ๋ ์ด๋ ๋์?", //6
+
+ // "์์ด์์ ์ด๋ณ์ ์๊ฐ์\n() ๋ ์ด์๊ตฐ์.", //7
+ //
+ // "์ฐ๋ฆฌ ๋ณดํธ์๋๊ณผ\n์์ด๋", //8
+ // "์ด๋ค ์ฅ์์ ์์๋์? ", //9
+ // "์ด๋ค ์ฅ์์ ์์๋์? ", //10
+ //
+ // "๊ทธ๋ ๊ตฐ์", //11
+ // "()์์", //12
+ //
+ // "์์ด์ ์ด๋ณํ๋\n์๊ฐ์ ๋ ์ฌ๋ฆฌ๋ฉฐ ํํ๋๋ ๋ถ๋ถ์ด ์๋์?", //13
+];
+// ๋ค ์ ํ์
+List questionYes= [
+ "์ด๋ค ๋ถ๋ถ์ด ํํ๊ฐ ๋๋์?",
+ "๋ณดํธ์๋์ ์๊ธฐ๋ฅผ ๋ค์ด๋ณด๋",
+ "์์ด๋ฅผ ํฅํ ๊ทธ๋ฆฌ์, ํํโฆ",
+ "๊ทธ ์ธ์๋\n๋ค์ํ ๊ฐ์ ๋ค์ด ๋๊ปด์ง๋ ๊ฒ ๊ฐ์์.",
+ "์ด๋ณ์ ์๊ฐ์ ์ง๋๊ฐ๋๋ผ๋",
+ "์์ด๋ฅผ ๊ทธ๋ฆฌ์ํ๋ ๋ง์์\n์ปค์ ธ๋ง ๊ฐ๋ ๊ทธ๋ฐ ๊ฒ ๊ฐ์์.",
+ "๊ทธ๋๋ ๋ณดํธ์๋์ด\n์์ด๋ฅผ ์ถ์ตํ ์ ์๊ฒ",
+ "โ๊ธฐ์ตํ ๊ฐโ์์ ์์ด์์\n์ถ์ต์ ์ ์ฅํด๋ณด๋ ๊ฒ๋",
+ "๊ทธ๋ฆฌ์ด ๋ง์์ ๋ฌ๋๋๋ฐ\n๋์์ด ๋ ๊ฒ ๊ฐ์์.",
+];
+
+// ์๋์ค ์ ํ์
+List questionNo =[
+ "๊ทธ๋ ๋ค๋ฉด, ๋คํ์ด์์.",
+ "์ด๋ณ์ ์๊ฐ์ด ์ง๋๊ณ \nํํ๊ฐ ๋จ์ ์ ์์ง๋ง,",
+ "ํํ๊ฐ ๋จ์ง ์์๋ค๋ฉด\n๊ทธ๊ฒ๋ ์ ๋ง ๋๋จํ ์ผ์ด๋ผ๊ณ ์๊ฐํด์.",
+ "๋ณดํธ์๋.\n๋ง์ฝ ์์ด์์",
+ "์ด๋ณ์ ์๊ฐ์ผ๋ก ๋ค์ ๋์๊ฐ๋ค๋ฉด\nํ๊ณ ์ถ์ ๊ฒ๋ค์ด ์์๊น์?",
+ "๋ณดํธ์๋์\n์ด๋ณ์ ์๊ฐ์ ์ ๋ณด๋ด์ ๊ฒ ๊ฐ์์.",
+ "๊ทธ ์๊ฐ์ ์์ด๋",
+ "๋ณดํธ์๋์ ๋ง์์\n์จ์ ํ ๋๊ผ์๊ฑฐ์์.",
+ "๊ทธ๋ผ์๋ ์์ด๋ฅผ ํฅํ\n๊ทธ๋ฆฌ์ด ๋ง์์",
+ "์ฌ์ ํ๊ฒ ๋จ์์์ง ์์๊น ์ถ์ด์.",
+ "โ๊ธฐ์ตํ ๊ฐโ์์ ์์ด์์\n์ถ์ต์ ์ ๋ฆฌํด๋ณด๋ฉด",
+ "๊ทธ๋ฆฌ์ด ๋ง์์ ๋ฌ๋๋๋ฐ\n ํฐ ๋์์ด ๋ ๊ฒ ๊ฐ์์.",
+
+];
+
+
+List questionsEnd =[
+ "๋ณดํธ์๋,\n์ ๊ฐ ์ค๋นํ ๋ํ๋ ์ฌ๊ธฐ๊น์ง์์. ",
+ "์์ด์\n์ด๋ณ์ ์๊ฐ์ ๊ธฐ์ตํ๋ฉฐ ",
+ "ํ์ง ๋ชปํ ๋ณดํธ์๋์\n๊ฐ์ ๋ค์ด ํ์ด์ก์ผ๋ฉด ํ๋ ๋ฐ๋์ด์์.",
+ "์, ์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+ "์, ์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+ "๋ค, ๋ณดํธ์๋.\n()์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+ "๋ค, ๋ณดํธ์๋.\n()์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+];
+
+---- ์ค๊ธฐ ---
+
+// ์์
+List startQuestions =[
+ "์ข์์, ${home.user}๋", //0
+ "${home.puppy}์์\n์ด๋ณ๋ก ๊ฒช์ ์ฌํ ๊ฐ์ ๋ค์", //1
+ "${home.user}๋์ ์ถ์\n๋ณํ๋ฅผ ๊ฐ์ ธ์์ ๊ฑฐ์์.", //2
+ "์์ฆ ${home.user}๋์", //3
+ "์ด๋ป๊ฒ ์ง๋ด๊ณ ์๋์ง ๊ถ๊ธํด์.", //4
+ "ํ์ฌ ${home.user}๋์\n๊ฑด๊ฐ ์ํ๋ ์ด๋ค๊ฐ์?", //5
+ "๊ฑด๊ฐ ์ํ์ ์ ๋๋ฅผ ์๋ ค์ฃผ์ธ์.", //6
+
+];
+
+// ์ข์์
+List good= [
+ "${home.user}๋์ ์ฌํ์",
+ "๊ฑด๊ฐํ๊ฒ ๊ทน๋ณตํ๊ณ ๊ณ์๋ค์.",
+ "์์ผ๋ก๋ ${home.user}๋์\n์ผ์์ ์ ์งํ๋ฉด์.",
+ "์ฐจ์ฐจ ์ด๋ณ์ ๊ทน๋ณตํด๊ฐ๋ฉด ๋๋ต๋๋ค!",
+];
+
+// ์กฐ๊ธ ์ํ์
+List little =[
+ "์ด๋ณ์ ๋๊ตฌ์๊ฒ๋\nํฐ ํ์ ์ฆ์ ๋จ๊ธฐ์ฃ .",
+ "ํ์ง๋ง,\n์ด๋ณ์ ์ ๋ณด๋ด๊ธฐ ์ํด์๋",
+ "๊ฑด๊ฐํ ๋ชธ๋ ์ ๋ง ์ค์ํ๋ต๋๋ค.",
+ "์ฌ์ํ ์ผ์์ ์งํค๋ฉฐ\n์ด๋ณ์ ๊ฐ์ด ๊ทน๋ณตํด๋ด์!",
+];
+
+// ์ํ์
+List hard =[
+ "์ด๋ณ์ ๊ฒช์ผ๋ฉด ๋ง์์ ๋ฐ๋ผ\n๋ชธ๋ ๋๋ฌด๋ ์ํ์ค์ฃ .",
+ "๋ ๋ ํ ๋ฐฅ์ ๋จน๊ณ \n๊ฐ๋จํ ์ผ์ธํ๋์ ํ๋ฉด์",
+ "์ฐ๋ฆฌ ์ฌ์ํ ๊ฒ๋ถํฐ ์์ํด๋ณด์์!",
+];
+
+// ๋ค์ ์ง๋ฌธ
+List nextQuestions =[
+ "๋ค์ ์ง๋ฌธ์ด์์.",
+ "${home.user}๋,\nํ์ฌ ๋ง์์ ์ฌํ์",
+ "์ด๋ ์ ๋์ธ๊ฐ์?",
+ "์ฌํ์ ์ ๋๋ฅผ ์๋ ค์ฃผ์ธ์.", // ๋๋ฌด ๊ธบ
+];
+
+// ๊ณ ํต, ์ฌํผ์
+List sad =[
+ "${home.user}๋์\n์ํ ๋ง์์ด ์ ๊ฒ๋ ๋๊ปด์ ธ์.",
+ "์ฌํ๊ณ ๊ณ ํต์ค๋ฌ์ด ๋ง์์\n์ ์๊ฒ ํธ์ด๋์ผ๋ฉด์",
+ "์กฐ๊ธ์ด๋๋ง ๋์ด์ง๊ธธ\n๋ฐ๋ผ๋ ๋ง์์ด๋๋๋ค.",
+];
+
+// ๊ฒฌ๋ ์ ์์ด์
+List endure =[
+ "${home.user}๋,",
+ "์ฌํ์ ์๋ ๊ทธ๋๋ก ํํํ๋ ๊ณผ์ ์\n๋งค์ฐ ์ค์ํ๋ต๋๋ค.",
+ "๊ทธ๋๋ ${home.user}๋์\n์ฌํ์ผ๋ก ์ธํ ๊ฐ์ ์",
+ "์ ํ์ด๋๊ฐ๊ณ ์๋ ๊ฒ ๊ฐ์์.",
+ "์์ผ๋ก๋ ์ง๊ธ์ฒ๋ผ๋ง\n${home.user}๋์ ์ฌํ์",
+ "์๋ ๊ทธ๋๋ก ํํํด ๋ณด์์.",
+];
+
+List lastQuestion =[
+ "${home.user}๋", // 0
+ "${home.puppy}์์\n์ด๋ณ๋ก ๊ฒช์ ์ฌํ ๊ฐ์ ๋ค์ด", //1
+ "๋ชธ๊ณผ ๋ง์์\n์ฌ๋ฌ๊ฐ์ง ๋ณํ๋ฅผ ๊ฐ์ ธ์จ ๊ฒ ๊ฐ์์.", //2
+ "๋ง์ง๋ง์ผ๋ก\n${home.puppy}์์ ์ด๋ณ์ด", //3
+ "์ด๋ค ๋ณํ๋ค์ ๊ฐ์ ธ์๋์ง\n๊ตฌ์ฒด์ ์ผ๋ก ์๊ธฐํด๋ณด๋ ค๊ณ ํด์.", //4
+ "๊ตฌ์ฒด์ ์ผ๋ก ${home.user}๋์\n์ด๋ค ์ํฉ์ธ๊ฐ์?", //5
+
+ "์ด๋ณ์ ๋ฌด๊ธฐ๋ ฅํ๊ฒ\n๋๋ก๋ ํ์ผ์์ด ์ฌํ๊ฒ ๋ง๋ค๊ธฐ๋ ํด์.", //6
+ "์์ฃผ ๊ณ ํต์ค๋ฝ๊ฒ ๋ง๋ค๊ธฐ๋ ํ์ฃ .", //7
+ "${home.user}๋ ํผ์\n์ด ๊ฐ์ ๋ค์ ๊ฐ๋นํ๊ธฐ์", //8
+ "์ด๋ ค์์ด ์์ด ๋ณด์ฌ์.", //9
+ "๊ฐ์ ์ํฉ์ ๊ฒฝํํ\nํน์ ๊ฒฝํ์ค์ธ", //10
+ "๋ง์ ๋ฐ๋ ค์ธ๋ค์ ์๊ธฐ๋ฅผ\n๋ค์ด๋ณด๋ ๊ฑด ์ด๋จ๊น์?", //11
+ "${home.user}๋์๊ฒ\nโ๋์ ์์ฒญํ๊ธฐโ๋ฅผ ์ถ์ฒํด๋๋ฆด๊ฒ์!", //12
+ //"๋์์ ์์ฒญํ๋ฌ ์ด๋ํ์๊ฒ ์ต๋๊น?", ์์ ๊ธฐ
+];
+
+List questionsEnd =[
+ "${home.user}๋,",
+ "์ค๋ ์ ๊ฐ ์ค๋นํ ๋ํ๋\n์ฌ๊ธฐ๊น์ง์์.",
+ "${home.user}๋์\n์ฌํ ๊ฐ์ ๋ค์ ์๊ธฐํ๊ณ ",
+ "์ค์ค๋ก๋ฅผ ๋ค๋
์ผ ์ ์๊ธฐ๋ฅผ ๋ฐ๋ผ์!",
+ "์, ์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+ "์, ์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+ "๋ค, ${home.user}๋.\n()์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+ "๋ค, ${home.user}๋.\n()์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+];
+
+/// ์ ๋ชป์ง
+List questions0 =[
+ "์์ด๋ ์ง๊ธ", //0
+ "๋ฌด์ง๊ฐ๋ค๋ฆฌ ๋๋จธ์\n์ ๋์ฐฉํ์ ๊ฑฐ์์.", //1
+ "๋ถ๋ช
์ ์ง๋ด๊ณ ์์ ๊ฒ์ ์์๋", //2
+ "์ฌ์ ํ\n๋ณดํธ์๋์๊ฒ๋", //3
+ "์์ด์๊ฒ\nํด์ฃผ๊ณ ์ถ์ ๋ง์ด ๋จ์์๊ฒ ์ฃ .", //4
+ "์ค๋์ ์์ด์๊ฒ\n์ ํ์ง ๋ชปํ", //5
+ "๋ณดํธ์๋์\n์ง์ฌ์ ๋ด์", //6
+ "๋ฌด์ง๊ฐ ๋๋จธ๋ก ํธ์ง๋ฅผ ๋ณด๋ผ๊ฑฐ์์.", //7
+ "ํธ์ง๋ฅผ ์ฐ๊ธฐ ์ ์,\n๋จผ์ ํธ์ง๋ฅผ ๊พธ๋ฉฐ๋ณผ๊ฒ์.", //8
+ "์์ด๋\n์ด๋ค ๋ ์จ๋ฅผ ์ข์ํ๋์?", //9
+
+ "์์ด์๊ฒ ๋ณด๋ผ\nํธ์ง์ง๊ฐ ์์ฑ๋์์ด์!", // 10
+ "์์ด์๊ฒ ๋ณด๋ผ\nํธ์ง์ง๊ฐ ์์ฑ๋์์ด์!", // 11
+ "์์ฑ๋ ํธ์ง์ง์", // 12 ์ ๋ง์ ๋ชฌํด
+ "์์ด์๊ฒ\n์ ํ๊ณ ์ถ์๋ ์ง์ฌ์ ๋ด์", //13
+ "ํธ์ง๋ฅผ ์์ฑํด์ฃผ์ธ์", // 14
+ "", // ์์ฑ์ค 15
+
+ "๋ณดํธ์๋,", // 16
+ "ํธ์ง์ ์์ด๋ฅผ ํฅํ ์ง์ฌ์", //17
+ "์ ์ ์ด๋ณด์๋์?", //18
+ "๋ณดํธ์๋์\n์์คํ ๋ง์์ ๋ด์", // 19
+ "์์ด์๊ฒ\n์ง์ ํธ์ง๋ฅผ ์ ๋ฌํด๋๋ฆด๊ฒ์!", //20
+
+ "๋ฌด์ง๊ฐ ๋ค๋ฆฌ ๋๋จธ ์์ด์๊ฒ\nํธ์ง๊ฐ ์ ๋ฌ๋๋ ์ค...", //21
+ "์์ด์๊ฒ\nํธ์ง๊ฐ ์ ๋ฌ๋์์ต๋๋ค!", //22
+
+ "๋ณดํธ์๋์ ํธ์ง๊ฐ\n์์ด์๊ฒ ์ ๋ฌ๋์์ด์.", //23 ์ ๋ง ์ ํด
+ "์์ด๊ฐ\n๋ณดํธ์๋์ ํธ์ง๋ฅผ ๋ฐ๊ณ ", //24
+ "์ด ๋ง์ ๊ผญ ์ ํด๋ฌ๋ผ๊ณ ํ์ด์.", //25
+ "์์ด๋\n๋ณดํธ์๋์", //26
+ "์ ๋ง ๋ง์ด ์ฌ๋ํ๋ต๋๋ค.", //27
+ "๋ณดํธ์๋๊ณผ\n๋ค์ ๋ง๋๋ ๊ทธ๋ ๊น์ง", //28
+ "์น๊ตฌ๋ค๊ณผ ๊ธฐ๋ค๋ฆฌ๊ณ ์์๊ฑฐ๋ผ๊ณ ํ์ด์!", //29
+ "๋ณดํธ์๋์\n์์คํ ๋ง์์ด", //30
+ "์์ด์๊ฒ๋\n์ ์ ๋ฌ๋ ๊ฒ ๊ฐ์์!", //31
+ "ํธ์ง๋ฅผ ํตํด\n๋ณดํธ์๋์ ๋ง์ ์", //32
+ "์ ํ์ง ๋ชปํ๋ ์ง์ฌ๋ค์ด", //33 2.5์ด
+ "์กฐ๊ธ์ ๊ฐ๋ฒผ์์ก๊ธฐ๋ฅผ ๋ฐ๋ผ์.", // 34 2.5์ด
+];
+
+List questionsEnd =[
+ "์, ์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+ "์, ์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+ "๋ค, ๋ณดํธ์๋.\n()์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+ "๋ค, ๋ณดํธ์๋.\n()์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+];
+
+/// ํ๊ธฐ
+List lateConversation =[
+"๋ค, ์ค๋์ ", //0
+"์์ด์ ๋น์๋ฆฌ์ ๋ํด ์๊ธฐํด ๋ณด์์.", //1
+"์์ด๊ฐ ๊ณ์ ๋ ๋ ์๊ฐ,", //2 2.5์ด
+"๊ฐ์ ์ ์ธ ๊ณต๋ฐฑ์ ์ด๋ ๊ฐ์ ๊น์ด ๋จ์์์ ๊ฑฐ์์.", //3 4.5์ด
+"ํ์ง๋ง ๊ทธ ๊ฐ์ ์ ๋ค๋ฅด๊ฒ ๋ฐ์๋ค์ด๊ณ ,", //4
+"์์ด์ ํจ๊ปํ ์๊ฐ๋ค์ ์๊ฐํด๋ณธ๋ค๋ฉด", //5
+"๊ฐ์ ์ ์ธ ๊ณต๋ฐฑ์ด ์ฑ์์ง ๊ฑฐ์์.", //6
+"์์ด๊ฐ ์๋ ์ถ์์", //7
+"๋ณดํธ์๋์ ์ด๋ค ๊ฒฝํ์ ํ๋์? ", //8 <<<<
+"๋ค ๊ทธ๋ ๊ตฐ์. ", //9
+"์์ ๊ฒฝํ์ ํตํด์ ๋ณดํธ์๋์๊ฒ", // 10
+"์ด๋ค ๋ณํ๊ฐ ์๊ฒผ์๊น์?", //11 <<<<
+"๋ณดํธ์๋์๊ฒ ๊ทธ๋ฐ ๋ณํ๊ฐ ์์๊ตฐ์.", //12
+"๊ทธ๋ ๋ค๋ฉด ๊ทธ๋ฐ ๋ณํ๋ค์ ๋ง์ฃผํ๊ณ ", //13
+"์ฆ๊ฑฐ์ ๋ ์๊ฐ๋ค์ด ์๋์?", //14 <<<<
+"์ผ์ ์์์ ๋ณดํธ์๋์ ๊ดด๋กญํ๋", //15
+"๋ณต์กํ ์๊ฐ๋ค์ ์ ๋ฆฌํ๊ธฐ ์ํด์ ์ด๋ค ํ๋์ ํ๋์ง", //16
+"๊ณต๊ฐ, ์๊ฐ, ํ๋, ๊ด๊ณ๋ก ๋๋์ด ์๊ฐํด๋ณด์์.", //17
+"์ด๋ ๊ณณ์์ ์๊ฐ์ ์ ๋ฆฌํ๋์?", //18 <<<<
+"์ฃผ๋ก ์ธ์ ์๊ฐ์ ์ ๋ฆฌํ๋์?", //19 <<<<
+"๋ฌด์์ ํ๋ฉฐ ์๊ฐ์ ์ ๋ฆฌํ๋์?", //20 <<<<
+"๋๊ตฌ์ ์๊ฐ์ ์ ๋ฆฌํ๋์?", //21 <<<<
+"๊ทธ๋ ๊ตฐ์.", //22
+"ํ๋ ์ํฉ์์ ์ฌ๋๋ค๊ณผ ์ํตํ๊ณ ๊ต๋ฅํ๋ ๊ฑด ์ค์ํด์.", //23
+"์ธ์ ๋ ๋ณดํธ์๋ ๊ณ์ ์น๊ตฌ์ ๊ฐ์กฑ์ด ์๊ณ ,", //24
+"๊ทธ๋ถ๋ค์ ๋ณดํธ์๋์ ์ง์งํ๊ณ ๊ธฐ๋ค๋ฆฌ๊ณ ์์ด์.", //25
+"โํจ๊ปํ ๊ฒโ์์ ์๋ก์ ๋ง์ ์ฃผ๊ณ ๋ฐ์ผ๋ฉฐ", //26
+"ํจ๊ป ๊ฐ์ ์ ๋๋ ๋ณด์์.", // 27 <<<<<<<<<<<<<<<<<<<<<<<<<<<
+"๋ณดํธ์๋. ์์ด์ ํจ๊ปํ ์๊ฐ๋ค์", //28
+"๋ ์์ด ํน๋ณํ๊ณ ๊ฐ์ง ๊ฒฝํ์ด์ง๋ง,", //29
+"์์ด๊ฐ ์๋ ์ถ์์๋", //30
+"์๋ก์ด ๊ฒฝํ์ ์ฐพ์๋๊ฐ๋ฉฐ ํ๋ณต์ ๋ง๋ค์ด๊ฐ ์ ์์ด์.", //31
+"๊ทธ๋ฆฌ๊ณ ์ด ๊ณผ์ ์์ ๋์ฑ ๋ ๋ ์์ ์ ์ดํดํ๊ณ ", //32
+"๋ฐ์ ์ํฌ ์ ์๋ค๋ ๊ฒ๋ ์๊ฒ ๋์์ผ๋ฉด ์ข๊ฒ ์ด์.", //33
+];
+
+
+
+-----------------------------------------
+
+
+
+List endConversation = [
+"๋ค, ์ค๋์\n์๋ก์ด ๋์ ๋ํด ์๊ธฐํด๋ณด์์.", //0 4ch
+"์ด์ ์์ด๊ฐ\n ๋ ๋ ๋น์๋ฆฌ์", //1
+"์๋ก์ด ๊ฟ๊ณผ ์ด์ ์ ์ฌ์ ์ฐจ๋ก์์.", //2
+"๊ทธ ์๊ฐ์ ๋ฐ์\n ์์๋ฅผ ํ์ํ๊ณ ๊ฐ์ ์ ๋ฐ๊ฒฌํ๋ฉฐ", //3
+"๋ ํฐ ์๋ฏธ์ ๋ชฉ์ ์\n ์ฐพ์ ๋์๊ฐ๋ณผ๊น์?", //4
+"์๋ก์ด ๋๋ฅผ ๋ฐ๊ฒฌํ๊ณ \n์ฑ์ฅํ๋ ๊ณผ์ ์์", //5
+"์ฐ๋ฆฌ์ ์ธ์์\n ํ์๋กญ๊ณ ์๋ฏธ ์๋ ๊ฒ์ผ๋ก ์ด์ด์ง ๊ฑฐ์์.", //6
+"๋ณดํธ์๋!", //7
+"ํ์ ์์ ์ ๋ํด \n ํ ๋ฌธ์ฅ์ผ๋ก ์ค๋ช
ํด์ฃผ์ธ์!", //8
+"๊ทธ๋ ๊ตฐ์, ์ด๋ฒ์๋\n โ๋ ์์ โ์ ๋ํด ๋ ์์๊ฐ๊ธฐ ์ํด", //9
+"์ง๊ธ๊น์ง์ ์์ ์ ๊ฒฝํ๊ณผ\n ๋์ณค๋ ๊ฐ์ ์ ๋ฐ๊ฒฌํด๋ณด์์.", //10
+"์ต๊ทผ์ ์ด๋ค ๊ฒ ๋๋ฌธ์ ์์๋์?", //11
+"๊ทธ ์๊ฐ์ ์ฌ์ง๊ณผ ํจ๊ป ์ถ์ตํ๋ฉฐ\n ๊ธฐ๋ถ์ ํ๋ณตํด๋ณด์์.", //12
+"๊ทธ ์๊ฐ์ ์ฌ์ง๊ณผ ํจ๊ป ์ถ์ตํ๋ฉฐ\n ๊ธฐ๋ถ์ ํ๋ณตํด๋ณด์์.", //13
+"์ข์์. ๊ทธ๋ ๋ค๋ฉด\n ์์ผ๋ก 1๋
ํ, 2๋
ํ, 3๋
ํ, 5๋
ํ", //14
+"๋ณดํธ์๋์\n ๋ฌด์์ ํ๊ณ ์์๊น์?", //15
+"๋ฏธ๋์ ๋์ ๋ํด ์๊ฐํ๋ ๊ฒ์\n ๋๋ผ์ด ๊ฒฝํ์ด์์.", //16
+"์ด๋ค ๋ฏธ๋๋ฅผ ๋ง๋ค๊ณ ์ถ์์ง\n ํจ๊ป ์์ํด๋ณผ๊น์?", //17
+"๋ณดํธ์๋์\n ๋ฏธ๋์ ์ด๋ค ์ฌ๋์ด ๋์ด์์๊น์?", //18
+"๋ฏธ๋์ ๋ณดํธ์๋์ ๋ํ\n ๊ณํ์ ์์ํ๊ณ ", //19
+"๊ตฌ์ฒดํํ๋ ๊ณผ์ ์\n ํฅ๋ฏธ๋ก์ด ์ฌ์ ์ด ๋ ๊ฑฐ์์!", //20
+"์์ ์ด ์ค์ ํ ๋ชฉํ์\n ์ค๋ ์ ๋๋ผ๊ณ ์ฑ์ทจํ๋ฉฐ", //21
+"๋ฏธ๋๋ฅผ ํฅํด ๋์๊ฐ\n ๋ ํ์๋ก์ด ์ถ์ ๋ง๋ค์ด ๋๊ฐ๋ณด์์!", //22
+"์ด๋ ค์ด ์๊ฐ์ ๊ฒช์ ๋,", //23
+"ํจ๊ปํ๋ ์ฌ๋๋ค์ ์ง์ง์ ์ดํด๋\n ํฐ ํ์ด ๋ผ์.", //24
+"๊ทธ๋ฌ๋, \n ์ํ์ ํจ๊ป ๋๋๊ณ ๊ทน๋ณตํ ์ ์๋๋ก", //25
+"๋ค๋ฅธ ๋ฐ๋ ค์ธ๋ค์๊ฒ\n ๋์์ ๋ณด๋ด๋ณด๋ ๊ฑด ์ด๋จ๊น์?", //26
+
+
+"๋ณดํธ์๋,", //27
+"์ด์ ๋ชจ๋ ๋ํ๊ฐ ๋์ด๋ฌ์ด์!", //28
+"๊ทธ๋์ ํจ๊ปํ ๋ํ๋\n ์์คํ๊ณ ์๋ฏธ ์๋ ์๊ฐ์ด์์ด์.", //29
+"์ด์ ๋ํ๋ ์ข
๋ฃ๋์ง๋ง,", //30
+"๊ทธ๋์์ ์๊ฐ๋ค์\n ๊ธฐ์ต ์์ ๊ฐ์ง๋๊ธธ ๋ฐ๋ผ์.", //31
+"์ง๊ธ๊น์ง\n ๋ํ์ ์ฌ์ ์ ํจ๊ป ํด์ค์ ๊ณ ๋ง์์!", //32
+
+"์ด์ โ๊ธฐ์ตํ ๊ฐโ ์ ์๋ก์ด ์ผ์์ด ๋น์ ์ ๊ธฐ๋ค๋ฆฌ๊ณ ์์ด์.", //33
+"์ด ๋ํ๋ฅผ ๋ซ๊ณ ๋๊ฐ๋ ์๊ฐ,", //34
+"์ถ์ ๋ค์ ์ฅ์ด ํผ์ณ์ง๊ธฐ๋ฅผ ๋ฐ๋๋๋ค.", //35
+];
+
+setedUserName = parsedResponseUser['nickname'];
+setedDogName = parsedResponseUser['puppyName'];
+setedDogAge = parsedResponseUser['puppyAge'];
+setedDogType = parsedResponseUser['puppyType'];
+setedDogImage = parsedResponseUser['profileImage'];
+
+
+
+
+
+
+Container(
+color: Colors.white,
+height: 48,
+child: Padding(
+padding: const EdgeInsets.only(bottom: 8.0, top: 8.0, left: 16,right: 16),
+child: Stack(
+children: [
+Container(
+width: screenSize.width,
+height: 32,
+decoration: BoxDecoration(
+color: Colors.white,
+border: Border.all(color: setUserName? Color(colorChart.blue):Color(0xffC0D2FC)),
+borderRadius: BorderRadius.circular(30),
+),
+),
+Positioned(
+left: 15,
+right: 30,
+bottom: 23,
+top: 0,
+child: TextField(
+controller: userNameController,
+style: textStyle.bk14normal,
+decoration: InputDecoration(
+hintStyle: textStyle.grey14normal,
+border: InputBorder.none,
+hintText: '์ด๋ ๊ฒ ๋ถ๋ฌ์ฃผ์ธ์.'),
+onChanged: (s) {
+setUserName = true;
+setState(() {
+
+});
+//text = s;
+},
+onTap: () {},
+),
+),
+Positioned(
+left: screenSize.width - 80,
+//right: 30,
+bottom: 28,
+top: 3,
+child: ElevatedButton(
+onPressed: () {
+
+if(setUserName){
+nextQuestion++;
+_player.setAsset(voice[voiceCount]);
+voiceCount++;
+_player.play();
+controller1.repeat(
+min: 0,
+max: 53,
+period: const Duration(milliseconds: 1000)
+);
+
+Timer(Duration(milliseconds: 1500), () {
+controller1.stop();
+});
+
+// setUserName = true;
+userName = userNameController.text;
+userName_ = userName;
+setState(() {
+
+});
+}
+
+},
+style: ElevatedButton.styleFrom(
+backgroundColor: setUserName? Color(colorChart.blue):Color(0xffDDE7FD),
+fixedSize: const Size(3, 3),
+shape: const CircleBorder(),
+),
+child: Icon(
+Icons.arrow_upward,
+color: Colors.white,
+size: 16,
+)),
+),
+],
+),
+),
+),
+
+-------------
\ No newline at end of file
diff --git a/client/lib/conversation/intro/intro.dart b/client/lib/conversation/intro/intro.dart
new file mode 100644
index 0000000..d441db0
--- /dev/null
+++ b/client/lib/conversation/intro/intro.dart
@@ -0,0 +1,1604 @@
+import 'dart:async';
+import 'dart:convert';
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:fluttertoast/fluttertoast.dart';
+import 'package:http/http.dart' as http;
+import 'package:client/progressbar/animation_progressbar.dart';
+import 'package:client/style.dart';
+import 'intro_memorial.dart';
+import 'package:client/main.dart'as main;
+import 'package:client/sign/sign_in.dart' as sign_in;
+import 'package:just_audio/just_audio.dart';
+import 'package:flutter_gif/flutter_gif.dart';
+
+/// ์ธํธ๋ก
+String userName_ = "";
+String dogName_ ="";
+
+class IntroPage extends StatefulWidget {
+
+ static Future navigatorPush(BuildContext context) async {
+ return Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (_) => IntroPage(),
+ ),
+ );
+ }
+
+ @override
+ _IntroPageState createState() => _IntroPageState();
+}
+
+class _IntroPageState extends State with TickerProviderStateMixin {
+
+ late FlutterGifController controller1, controller2, controller3;
+
+ bool startIntro = false;
+ bool setUserName = false;
+ bool setDogName = false;
+ bool setDogAge = false;
+ bool setDogType = false;
+
+ bool isVisible = false;
+ void toggleVisibility() {
+ setState(() {
+ isVisible = !isVisible;
+ });
+ }
+
+ bool dogTypeinput = false; // ๊ฐ์์ง์ข
์ ์ฌ์ฉ์๊ฐ ์ง์ ์
๋ ฅํ๋๊ฐ
+
+ String userDogType = "";
+
+ bool decidedAge = false;
+ bool selectAT = false; // ์ค๋ฅ ๋ง๊ธฐ
+ bool chooseType = false; // ๊ฒฌ์ข
์ ์ ํํ๋ ์ฐฝ์ด ๋จ๋๋ก
+ bool decidedType = false; // ๊ฒฌ์ข
์ ์ ํํ์๋ค๋ฉด ๋ค์ ํ์ด์ง๋ก ๋์ด๊ฐ ์ ์๋๋ก ํจ
+
+ bool grief = false; // ์ฌํ ์ ํ ์
+ bool ui_grief = false;
+ bool miss = false; // ๊ทธ๋ฆฌ์ ์ ํ ์
+ bool ui_miss = false;
+
+ bool finish = false; // ๋ฉ๋ชจ๋ฆฌ์ผ ๋ฐ ๋ง๋ฌด๋ฆฌ
+
+ // ํ
์คํธ ์๋ํ
์ปจํธ๋กค๋ฌ๋ฅผ ์์ฑํ์ฌ ํ๋์ ํ ๋น
+ final userNameController = TextEditingController(); // nextQuestion = 3์ผ๋
+ final dogNameController = TextEditingController(); // nextQuestion = 7์ผ๋
+ final dogAgeController = TextEditingController(); // nextQuestion = 10์ผ๋
+ final dogTypeController = TextEditingController(); // nextQuestion = 10์ผ๋
+
+ String userName = "";
+ String dogName = "";
+ int dogAge = 0;
+ String dogType = "";
+
+ // โ๋น์ ํ๋ฆฌ์ โ, โํฌ๋ฉ๋ผ๋์โ, โํ๋ ์น ๋ถ๋
โ, โ์น์์โ, โ๋ชฐํฐ์ฆโ, โํ ์ด ํธ๋คโ, โ๋ผ๋ธ๋ผ๋ ๋ฆฌํธ๋ฆฌ๋ฒโ, โ์ง๋๊ฐโ, โ์ดํ๋ฆฌ์ ๊ทธ๋ ์ดํ์ด๋โ, โํจ๋ธ๋ก ์ฐ์ ์ฝ๊ธฐโ, โ๋ถ๋
โ, โ์
ํ๋๋ ์ฝ๋
โ,
+ // โ์๋ฐ๊ฒฌโ, โ๊ณจ๋ ๋ฆฌํธ๋ฆฌ๋ฒโ, โ๋กํธ์์ผ๋ฌโ, โ์ผ์ธ ์ฝ๋ฅด์โ, โํผ๊ทธโ, โ๋ฒ ๋ค๋งํด ํ
๋ฆฌ์ดโ, โ์ ๋จผ ์
ฐํผ๋โ, โ๋ฏธ๋์ด์ฒ ๋ฅ์คํํธโ, โ์ฐจ์ฐ์ฐจ์ฐโ, โ๋๋ฒ ๋ฅด๋งโ, โ์๋ฉ๋ฆฌ์นธ ์ฝ์นด ์คํ๋์โ, โ์นด๋ฐ๋ฆฌ์ ํน ์ฐฐ์ค ์คํ๋์โ,
+ // โํํค๋์ฆโ, โ์ฝ์นด์์ ์ค๋ธ์ฐจ์นดโ, โ์คํ ๋ค๋ ํธ๋คโ, โ์ํฌ์
ํ
๋ฆฌ์ดโ, โ์ฌ๋ชจ์๋โ, โ์ผํธ๋ด ์์์ ์ค๋ธ์ฐจ์นดโ, โ์๋ฒ ๋ฆฌ์ ํ์คํคโ, โํํโ, โ์๋ฉ๋ฆฌ์นธ ์ํคํโ, โ๋น ๋น์ฉโ, โ๋ณด๋์ฝ๋ฆฌโ, โ๊ผฌ๋ ๋ ํด๋ ์โ,
+ // โ๋ฏธ๋์ด์ฒ ๋ณผ ํ
๋ฆฌ์ดโ, โ๋ฏธ๋์ด์ฒ ์๋์ฐ์ โ, โ์ํ๊ฐ ํ์ด๋โ, โ๋๊ณ ์๋ฅดํจํฐ๋
ธโ, โํฐ๋ฒ ํ ๋ง์คํฐํโ, โ๋ฒจ์ง์ ์
ฐํผ๋โ, โ์ญ ๋ฌ์ ํ
๋ฆฌ์ดโ, โ๋ฏธ๋์ด์ฒ ํธ๋คโ, โ๋ฏธ๋์ ํธ๋คโ, โ์์ธโ, โ๋๋น ๋ฅ์คํํธโ, โ๋น๊ธโ, โ๊ธฐํ(์ฌ์ฉ์ ์ง์ ์
๋ ฅ)โ
+
+ List dogType_ = [
+ "๋น์ ํ๋ฆฌ์ ", "ํฌ๋ฉ๋ผ๋์", "ํ๋ ์น ๋ถ๋
","์น์์", "๋ชฐํฐ์ฆ","ํ ์ด ํธ๋ค","๋ผ๋ธ๋ผ๋ ๋ฆฌํธ๋ฆฌ๋ฒ","์ง๋๊ฐ","์ดํ๋ฆฌ์ ๊ทธ๋ ์ดํ์ด๋","์ฐ์์ฝ๊ธฐ","๋ถ๋
","์
ํ๋๋ ์ฝ๋
",
+ "์๋ฐ๊ฒฌ", "๊ณจ๋ ๋ฆฌํธ๋ฆฌ๋ฒ", "๋กํธ์์ผ๋ฌ", "์ผ์ธ ์ฝ๋ฅด์", "ํผ๊ทธ", "๋ฒ ๋ค๋งํด ํ
๋ฆฌ์ด", "์ ๋จผ ์
ฐํผ๋", "๋ฏธ๋์ด์ฒ ๋ฅ์คํํธ", "์ฐจ์ฐ์ฐจ์ฐ", "๋๋ฒ ๋ฅด๋ง", "์๋ฉ๋ฆฌ์นธ ์ฝ์นด ์คํ๋์", "์นด๋ฐ๋ฆฌ์ ํน์ฐฐ์ค ์คํ๋์",
+ "ํํค๋์ฆ", "์ฝ์นด์์ ์ค๋ธ์ฐจ์นด", "์คํ ๋ค๋ ํธ๋ค","์ํฌ์
ํ
๋ฆฌ์ด", "์ฌ๋ชจ์๋", "์ผํธ๋ด ์์์ ์ค๋ธ์ฐจ์นด", "์๋ฒ ๋ฆฌ์ ํ์คํค", "ํํ", "์๋ฉ๋ฆฌ์นธ ์ํคํ", "๋น ๋น์ฉ", "๋ณด๋์ฝ๋ฆฌ", "๊ผฌ๋ ๋ ํด๋ ์",
+ "๋ฏธ๋์ด์ฒ ๋ณผ ํ
๋ฆฌ์ด", "๋ฏธ๋์ด์ฒ ์๋์ฐ์ ", "์ํ๊ฐ ํ์ด๋","๋๊ณ ์๋ฅดํจํฐ๋
ธ", "ํฐ๋ฒ ํ ๋ง์คํฐํ","๋ฒจ์ง์ ์
ฐํผ๋","์ญ ๋ฌ์ ํ
๋ฆฌ์ด","๋ฏธ๋์ด์ฒ ํธ๋ค","๋ฏธ๋์ ํธ๋ค","์์ธ","๋๋น ๋ฅ์คํํธ","๋น๊ธ", "์ง์ ์
๋ ฅ"
+ ];
+
+ void showToast(){
+ Fluttertoast.showToast(
+ msg: 'ํ๋ฉด์ ํญํ๋ฉด ๋ค์์ผ๋ก ๋์ด๊ฐ์',
+ gravity: ToastGravity.BOTTOM,
+ textColor: Color(0xff4B5396),
+ backgroundColor: Colors.white.withOpacity(0.5),
+ toastLength: Toast.LENGTH_SHORT
+ );
+ }
+
+ FocusNode _focusNode = FocusNode();
+
+ @override
+ void initState() {
+ super.initState();
+ // SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive, overlays: []);
+ main.play = true;
+ main.player.setAsset(main.musics[0]);
+ main.player.play();
+ // ์์ ์ ์ฉ
+ for(int i= 0 ; i < voice.length; i++){
+ _player.setAudioSource(AudioSource.uri(
+ Uri.parse(voice[i]))
+ );
+ }
+
+ controller1 = FlutterGifController(vsync: this);
+ controller2 = FlutterGifController(vsync: this);
+ controller3 = FlutterGifController(vsync: this);
+
+ _focusNode.addListener(_onFocusChange);
+ showToast();
+ }
+
+ void _onFocusChange() {
+ if (_focusNode.hasFocus) {
+ // ํค๋ณด๋ ์ฌ๋ฆฌ๊ธฐ
+ FocusScope.of(context).requestFocus(_focusNode);
+ }
+ }
+
+ @override
+ void dispose() async {
+ super.dispose();
+ }
+
+ int nextPage = 0;
+
+ List introText =[];
+
+ int nextQuestion = 0;
+ int nextQuestionGrief = 0;
+ int nextQuestionMiss = 0;
+
+ // ์ธํธ๋ก ์ฌ์ฉ์ ์ ๋ณด ์ ์ฅํ๊ธฐ (POST)
+ void saveUserInfo(String aToken, String nickname, String puppyName, int puppyAge, String puppyType) async {
+
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "nickname": nickname,
+ "puppyName": puppyName,
+ "puppyAge" : puppyAge,
+ "puppyType" : puppyType,
+ "profile-image" : "null"
+ };
+
+ // ํค๋ ์ ๋ณด ์ค์
+ Map headers = {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ };
+
+ var url = Uri.parse('http://3.38.1.125:8080/conversation/intro/info'); // ์๋ํฌ์ธํธ URL ์ค์
+
+ try {
+ var response = await http.post(
+ url,
+ body: json.encode(data), // ์์ฒญ ๋ณธ๋ฌธ์ ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ์ธ์ฝ๋ฉํ์ฌ ์ ๋ฌ
+ headers: headers, // ํค๋ ์ถ๊ฐ
+ );
+
+ if (response.statusCode == 200) {
+ // ์๋ต ์ฑ๊ณต ์์ ์ฒ๋ฆฌ
+
+ var jsonResponse = utf8.decode(response.bodyBytes); // ์๋ต ๋ณธ๋ฌธ์ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ // JSON ๊ฐ์ ํ์ฉํ ์ํ๋ ๋์ ์ํ
+ //utf8.decode(jsonResponse);
+ print(jsonResponse);
+
+ List contentList = [];
+
+ List parsedResponse = json.decode(jsonResponse);
+
+ setState(() {
+ });
+
+
+ print('API ํธ์ถ ์ฑ๊ณต!!: ${response.statusCode}');
+ } else {
+ // ์์ฒญ ์คํจ ์์ ์ฒ๋ฆฌ
+ print('API ํธ์ถ ์คํจ!!: ${response.statusCode}');
+ }
+ } catch (e) {
+ // ์์ธ ๋ฐ์ ์์ ์ฒ๋ฆฌ
+ print('API ํธ์ถ ์ค ์์ธ ๋ฐ์: $e');
+ }
+ }
+
+ final _player = AudioPlayer();
+ int voiceCount = 0;
+
+ List voice =[
+ "assets/voice/intro/intro1.mp3", "assets/voice/intro/intro2.mp3", "assets/voice/intro/intro3.mp3",
+ "assets/voice/intro/intro4.mp3", "assets/voice/intro/intro5.mp3", "assets/voice/intro/intro6.mp3",
+ "assets/voice/intro/intro7.mp3", "assets/voice/intro/intro8.mp3", "assets/voice/intro/intro9.mp3",
+ "assets/voice/intro/intro10.mp3", "assets/voice/intro/intro11.mp3", "assets/voice/intro/intro12.mp3",
+ "assets/voice/intro/intro13.mp3", "assets/voice/intro/intro14.mp3", "assets/voice/intro/intro15.mp3",
+ "assets/voice/intro/intro16.mp3", "assets/voice/intro/intro17.mp3",
+ ];
+
+ List questions0 =[
+ "๋๋ฅผ ๊ฐ์ฅ ์ ์๋ ์น๊ตฌ์ด์,\n๋์ ํจ๊ป ์๋ ๊ฐ์กฑ๊ฐ์ ๋ฐ๋ ค๊ฒฌ.",
+ "๋ฐ๋ ค๊ฒฌ๊ณผ์ ์ด๋ณ์\n๊ทธ ๋ฌด์๋ณด๋ค ํฐ ์ฌํ์
๋๋ค.",
+ "๋ชจ๋ ๋ฐ๋ ค์ธ์๊ฒ๋ ์ถฉ๋ถํ๊ฒ \n์ ๋ํ๊ณ ์ฌํผํ ์๊ฐ์ด ํ์ํ๋ต๋๋ค.",
+ "๊ทธ๋ฌ๊ธฐ ์ํด์ ๋ฐ๋ ค๊ฒฌ์ ๋ํด\n๊ธฐ์ตํ๋ ๊ฒ์ ๋งค์ฐ ์ค์ํ ๊ณผ์ ์ด์์.",
+ // "์ด๋ณ ๋์ฐ๋ฏธ ๋ฌด์ง์ ํจ๊ป\n๋ฐ๋ ค๊ฒฌ์ ๊ธฐ์ตํด๋ณด์ธ์.",
+ ];
+
+ List question1_0= [
+ "์๋
ํ์ธ์.", //0
+ "์ ๋ ๋ฐ๋ ค๊ฒฌ๊ณผ์ ์ด๋ณ์ ๋์์ค\n์ด๋ณ ๋์ฐ๋ฏธ ๋ฌด์ง์์!", //1
+ "์์ผ๋ก ์ ์ ๋ํ๋ฅผ ๋ค๋๋ฉด์", //2
+ "๋ฐ๋ ค๊ฒฌ์ ๊ธฐ์ตํ๊ณ \n์ ๋ํ ์ ์๊ฒ ๋์๋๋ฆด๊ฒ์.", //3
+ "์ ๋ ๋น์ ์ ๋ญ๋ผ๊ณ ๋ถ๋ฅด๋ฉด ์ข์๊น์?", //4
+
+ // ํต์ผ๋ก ์ถ๊ฐ
+ // "์ข์์. ๋ณดํธ์๋.", // this is modifi //5
+ // "์ ๊ฐ ๋ณดํธ์๋๊ณผ์ ๋ํ๋ฅผ ์์ํ๊ธฐ ์ํด", //6
+ // "๋ณดํธ์๋์ ๋ํด์\n๋ ์์๊ฐ๋ ค๊ณ ํด์.", //7
+ // "๋ค์ ์ง๋ฌธ์ ๋ตํด์ฃผ์ธ์!", // 8
+ // "๋ฐ๋ ค๊ฒฌ์ ์ด๋ฆ์ ๋ฌด์์ด์์๊น์?", // this is modifi //9
+ //
+ // // ํต์ผ๋ก ์ถ๊ฐ
+ // "์์ด์ ๋ชจ์ต์ ์ด๋ ๋์? \n๋น์นธ์ ์ฑ์ ์๋ ค์ฃผ์ธ์.", // this is modifi //10
+ // "์์ด์ ๋ชจ์ต์ ์ด๋ ๋์? \n๋น์นธ์ ์ฑ์ ์๋ ค์ฃผ์ธ์.", // this is modifi //11
+ // "์ข์์, ๋ณดํธ์๋!", // 12
+ // "์ง๋ฌธ์ ๋ตํ๋ฉฐ,\n์ ๊น์ด๋๋ง", //13
+ // "์์ด์ ๋ํด์ ๋ ์ฌ๋ ค๋ดค๋ ๊ฒ ๊ฐ์์.", //14
+ // "์์ด์ ๋ํด์ ์๊ฐํ๋", //15
+ // "๋ณดํธ์๋์ ์ด๋ค ๋ง์์ด ๋ค์๋์?", //16
+ ];
+
+ // ๊ทธ๋ฆฌ์ ์์ ํต์ผ๋ก ์ถ๊ฐํ์ธ์
+ List questions1_2 =[
+ // ์ด์ ๋ ์์ด์\n๋ชจ์ต์ ๋ณด๊ฑฐ๋ ๋ง์ง ์ ์์ง๋ง,
+ // ์์ด๋ฅผ ์๊ฐํ๋ฉฐ\n๊ทธ๋ฆฌ์์ ์ฑ์๊ฐ ์ ์์ ๊ฒ ๊ฐ์์.
+ // ์์ด์์ ๊ธฐ์ต์\n์ฒ์๋ถํฐ ๋ ์ฌ๋ ค๋ณผ๊น์?
+ // ์์ด์์ ๊ธฐ์ต์ด ์์๋๋\n๊ทธ๋ ์ ์ฌ์ง๊ณผ ์ด์ผ๊ธฐ๋ฅผ ๊ธฐ๋กํด๋ด
์๋ค!
+ ];
+
+ // ์ฌํ ์์ ํต์ผ๋ก ์ถ๊ฐํ์ธ์
+ List questions1_3 =[
+ // "์์ด๊ฐ ๊ณ์ ์๋ ์ง๊ธโฆ",
+ // "๋ณดํธ์๋์\n์ฌํ ๋ง์์ด ์ ๊ฒ๋ ๋๊ปด์ ธ์.",
+ // "ใ
ใ
์์\n๊ธฐ์ต์ ํ๋์ฉ ๋๋์๋ณด๋ฉด",
+ // "์ฌํ ๋ง์์ ๋๊ธฐ์ ๋์์ด ๋ ๊ฑฐ์์.",
+ // "์์ด์์ ๊ธฐ์ต์ด ์์๋๋\n๊ทธ๋ ์ ์ฌ์ง๊ณผ ์ด์ผ๊ธฐ๋ฅผ ๊ธฐ๋กํด๋ด
์๋ค!",
+ ];
+
+ // ์์ ํต์ผ๋ก ์ถ๊ฐํ์ธ์
+ List questions1_4 =[
+ /// ๋ณดํธ์๋! \n๊ธฐ์ตํ ๊ฐ๊ฐ ์์ฑ๋์์ด์.
+ // ๊ธฐ์ตํ ๊ฐ๋ฅผ ํ์ธํด ๋ณด์ธ์!
+ // ๋ณดํธ์๋!
+ // ์ค๋์ ๋ณดํธ์๋๊ณผ์ ์ฒซ๋ง๋จ์ด์์ง๋ง,
+ // ์์ด๊ฐ ์ผ๋ง๋ ๋ง์\n์ฌ๋์ ๋ฐ์๋์ง ๋๋ ์ ์์์ด์.
+ // ์์ผ๋ก ์ ์ ํจ๊ป\n์์ด์์ ์๊ฐ๋ค์ ๊ธฐ์ตํ๋ฉฐ,
+ // ๋ณดํธ์๋์\n๋ง์ ์ ์์ ์ ์ฐพ์๊ฐ๊ธธ ๋ฐ๋ผ์.
+ // ์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์ ๋ง๋๊ฒ ๋ \n์๊ฐ์ ์๋ ค์ฃผ์ธ์.
+ // ๋ค, ๋ณดํธ์๋. \n๊ทธ๋ ๋ค์ ๋ง๋์!
+
+ "๋๋ค์๋!\n ๊ธฐ์ตํ ๊ฐ๊ฐ ์์ฑ๋์์ด์.",
+ "๊ธฐ์ตํ ๊ฐ๋ฅผ ํ์ธํด๋ณด์ธ์!",
+ "๋๋ค์๋!",
+ "์ค๋์ ๋๋ค์๋๊ณผ์ \n์ฒซ๋ง๋จ์ด์์ง๋ง",
+ "๋ฐ๋ ค๊ฒฌ์ด ์ผ๋ง๋ ๋ง์ ์ฌ๋์ \n๋ฐ์๋์ง ๋๋ ์ ์์์ด์.",
+ "์์ผ๋ก ์ ์ ํจ๊ป \n๋ฐ๋ ค๊ฒฌ๊ณผ์ ์๊ฐ๋ค์ ๊ธฐ์ตํ๋ฉฐ,",
+ "๋๋ค์๋์ ๋ง์ ์ ์์ ์ \n์ฐพ์๊ฐ๊ธธ ๋ฐ๋ผ์.",
+ "์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์ ๋ง๋๊ฒ ๋ \n์๊ฐ์ ์๋ ค์ฃผ์ธ์",
+ ];
+
+ bool _visible = true;
+ bool _visible2 = true;
+
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+ return
+ Container(
+ decoration: startIntro ?
+ BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.topRight,
+ end: Alignment.bottomLeft,
+ colors: [
+ Color(0xffDDE7FD),
+ Color(0xffDDE7FD),
+ ],
+ )
+ ) :
+ BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.topRight,
+ end: Alignment.bottomLeft,
+ colors: [
+ Color(0xffE4ECFF),
+ Color(0xffA2BEFF),
+ ],
+ )
+ ),
+ //color: startIntro? Color(0xffDDE7FD): Color(0xffC0D2FC),
+ child: GestureDetector(
+ onTap: (){
+ SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top]);
+ print("ํ์ธ์" + nextPage.toString());
+ // _player.setAsset(voice[voiceCount]);
+
+ toggleVisibility();
+ if(_visible){
+ _visible = false;
+ } else if(_visible == false && nextPage <3){
+ nextPage++;
+ _visible = true;
+ }
+ if(nextPage == 3){
+ nextPage++;
+ startIntro = true;
+ _player.setAsset(voice[voiceCount]);
+ voiceCount++;
+ _player.play();
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 20,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ controller3.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 2000)
+ );
+
+ Timer(Duration(milliseconds: 1500), () {
+ controller1.stop();
+ });
+ Timer(Duration(milliseconds: 1000), () {
+ controller3.stop();
+ });
+ // nextQuestion++;
+ //Navigator.push(context, MaterialPageRoute(builder: (context) => Con01Page()));
+ }
+ // else if(nextPage == 3 && startIntro == true){
+ // nextPage++;
+ // //Navigator.push(context, MaterialPageRoute(builder: (context) => Con01Page()));
+ // }
+
+ else if(nextPage >3 && nextQuestion <4){
+ nextQuestion++; // ์ธํธ๋ก ์์ ํ count
+ _player.setAsset(voice[voiceCount]);
+ voiceCount++;
+ _player.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ if(nextQuestion == 1){
+ Timer(Duration(seconds: 5), () {
+ controller1.stop();
+ });
+
+ } else if(nextQuestion == 2){
+ Timer(Duration(seconds: 2), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 3){
+ Timer(Duration(seconds: 4), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 4){
+ Timer(Duration(seconds: 3), () {
+ controller1.stop();
+ });
+ }
+
+ }
+ else if(nextQuestion == 4 && setUserName == true){
+ //nextQuestion++; ์ด๋ฆ ์ค์
+ // voiceCount++;
+ // _player.play();
+ }
+ else if(nextQuestion >4 && nextQuestion< 9){
+ nextQuestion++;
+ _player.setAsset(voice[voiceCount]);
+ voiceCount++;
+ _player.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ controller3.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 2000)
+ );
+
+ Timer(Duration(milliseconds: 1500), () {
+ controller1.stop();
+ });
+ if(nextQuestion == 6){
+ Timer(Duration(seconds: 3), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 7){
+ Timer(Duration(seconds: 3), () {
+ controller1.stop();
+ });
+ }
+ // ๋ค์ ์ง๋ฌธ์ ๋ตํด์ฃผ์ธ์
+ else if(nextQuestion == 8){
+ Timer(Duration(seconds: 2), () {
+ controller1.stop();
+ });
+ Timer(Duration(seconds: 1), () {
+ controller3.stop();
+ });
+ }
+ // ๋ฐ๋ ค๊ฒฌ์ ์ด๋ฆ์ ๋ฌด์์ด์์๊น์
+ else if(nextQuestion == 9){
+ Timer(Duration(seconds: 3), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(nextQuestion == 9 && setDogName == true){
+ //nextQuestion++; ๊ฐ์์ง ์ด๋ฆ ์ค์
+ // voiceCount++;
+ // _player.play();
+ }
+ // ๋น์นธ์ ์ฑ์์๋ ค์ฃผ์ธ์
+ else if(nextQuestion == 10){
+ nextQuestion++;
+ _player.setAsset(voice[voiceCount]);
+ voiceCount++;
+ }
+
+ // ๋น์นธ์ ์ฑ์ ์๋ ค์ฃผ์ธ์
+ else if(nextQuestion == 11){
+ chooseType = false;
+ // _player.setAsset(voice[voiceCount]);
+ // voiceCount++;
+ // _player.play();
+ setState(() {
+ });
+ }
+ else if(nextQuestion > 11 && nextQuestion < 16){
+ nextQuestion++;
+ _player.setAsset(voice[voiceCount]);
+ voiceCount++;
+ _player.play();
+ //_player.play();
+ // controller1.stop();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 13){
+ Timer(Duration(seconds: 2), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 14){
+ Timer(Duration(seconds: 3), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 15){
+ Timer(Duration(seconds: 2), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 16){
+ Timer(Duration(seconds: 3), () {
+ controller1.stop();
+ });
+ }
+ }
+ // ์ฌ๊ธฐ์ ๋ถํฐ๋ ๊ฐ์ ์ ํ
+ else if(miss && nextQuestionMiss<3){
+ nextQuestionMiss++;
+ _player.setAsset(voice[voiceCount]);
+ voiceCount++;
+ _player.play();
+ controller2.repeat(
+ min: 0,
+ max: 32,
+ period: const Duration(milliseconds: 3500)
+ );
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 800)
+ );
+ if(nextQuestionMiss == 1){
+ Timer(Duration(seconds: 4), () {
+ controller1.stop();
+ });
+ Timer(Duration(seconds: 3), () {
+ controller2.stop();
+ });
+ }
+ else if(nextQuestionMiss == 2){
+ Timer(Duration(seconds: 3), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestionMiss == 3){
+ Timer(Duration(seconds: 5), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(grief && nextQuestionGrief<4){
+ nextQuestionGrief++;
+ _player.setAsset(voice[voiceCount]);
+ voiceCount++;
+ _player.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ controller2.repeat(
+ min: 0,
+ max: 32,
+ period: const Duration(milliseconds: 3500)
+ );
+
+
+ if(nextQuestionGrief == 1){
+ Timer(Duration(milliseconds: 2000), () {
+ controller2.stop();
+ });
+ Timer(Duration(seconds: 4), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestionGrief == 2){
+ Timer(Duration(seconds: 3), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestionGrief == 3){
+ Timer(Duration(seconds: 4), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestionGrief == 4){
+ Timer(Duration(seconds: 6), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(nextQuestionGrief == 4 || nextQuestionMiss == 3 ){
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => IntroMemorialPage()));
+ }
+ setState(() {
+ });
+ },
+ child: Scaffold(
+ backgroundColor: Colors.transparent,
+ appBar: AppBar(
+ //title: Text("๊ธฐ์ตํ ๊ฐ", style: TextStyle(fontSize:16, color: Colors.white ),),
+ //centerTitle: true,
+ leading: IconButton(
+ icon: SvgPicture.asset(
+ 'assets/images/conversation/home_icon.svg',
+ ),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ backgroundColor: Colors.transparent,
+ elevation: 0.0,
+ ),
+ //extendBodyBehindAppBar: true,
+ body:
+ SingleChildScrollView(
+ child: Container(
+ child: Column(
+ children: [
+ SizedBox(height: 3,),
+ Container(
+ width: screenSize.width,
+ height: 25,
+ child: Padding(
+ padding: EdgeInsets.only( left:16, right: 16),
+ child: Center(
+ child: FAProgressBar(
+ currentValue: 15,
+ size: 5,
+ backgroundColor: Colors.white,
+ )
+ ),
+ ),
+ ),
+ if(startIntro == false)...[
+ Container(
+ width: screenSize.width,
+ height: screenSize.height,
+ child: Column(
+ //mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ SizedBox(height: 64,),
+ SvgPicture.asset('assets/images/conversation/intro/intro_star.svg',fit: BoxFit.fill,),
+ SizedBox(height: 64,),
+ Stack(
+ children: [
+ SvgPicture.asset('assets/images/conversation/intro/intro_bubble.svg',fit: BoxFit.fill,),
+ Padding(padding:nextPage ==1? EdgeInsets.only(left:86, top:48):EdgeInsets.only(left:62, top:48),
+ child: AnimatedOpacity(opacity: _visible? 1.0:0.0,
+ duration:Duration(milliseconds: 500),
+ child: Text(
+ questions0[nextPage],
+ textAlign: TextAlign.center,
+ style: textStyle.introbubbletext
+ ),
+ ),
+ ),
+ ],
+ ),
+ SizedBox(height: 96,),
+ Container(width: screenSize.width,
+ child: SvgPicture.asset('assets/images/conversation/intro/intro_cloud.svg',fit: BoxFit.fill,),
+ ),
+ ],
+ ),
+ ),
+ ]
+ // ๋ฌด์ง ๋ฑ์ฅ ํ ๋ํ
+ else...[
+ Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children:[
+ SizedBox(
+ height: 14,
+ ),
+ Stack(
+ children: [
+ Container(
+ height: 157,
+ width: screenSize.width,
+ child:
+ Stack(
+ children: [
+ Center(child: SvgPicture.asset('assets/images/conversation/bubble.svg',fit: BoxFit.fill,),),
+ Container(
+ padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 12, ),
+ child: Center(
+ child: Column(
+ children: [
+ // ๋ํ์ ์ ํ ๋ด์ฉ
+ if(grief == false && miss == false)...[
+ if(question1_0[nextQuestion].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ question1_0[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ question1_0[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+ ]
+ // ๊ทธ๋ฆฌ์ ์ ํ ์
+ else if (miss) ...[
+ if(questions1_2[nextQuestionMiss].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ questions1_2[nextQuestionMiss],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ questions1_2[nextQuestionMiss],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+ // ์ฌํ ์ ํ ์
+ ] else if (grief) ...[
+ if(questions1_3[nextQuestionGrief].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ questions1_3[nextQuestionGrief],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ questions1_3[nextQuestionGrief],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+ ]
+ ],
+ )
+ )
+ ),
+ ],
+ )
+ ),
+ // ๋ฌด์ง ์์น
+ if(nextQuestion < 11)...[
+ Stack(
+ children: [
+ // ์ ์ ์์น
+ Column(
+ children: [
+ SizedBox(height: 420,),
+ Container(
+ child: SvgPicture.asset(
+ 'assets/images/conversation/user7.svg',
+ height: 282,
+ width: screenSize.width,
+ ),
+ ),
+ ],
+ ),
+ Column(
+ children: [
+ SizedBox(height: 144,),
+ Container(
+ width: screenSize.width,
+ height: 375,
+ child:
+ Stack(
+ children: [
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_ear.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base.gif', fit: BoxFit.cover,),),
+
+ if(nextQuestion == 0 || nextQuestion == 12)...[
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: GifImage(
+ controller: controller3,
+ image: const AssetImage("assets/images/conversation/gif/smile_muji.gif"),
+ ),
+ ),
+ ] else if(nextQuestion == 2)...[
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: GifImage(
+ controller: controller2,
+ image: const AssetImage("assets/images/conversation/gif/sad_muji.gif"),
+ ),
+ ),
+ ]
+ else...[
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base_eye.gif',
+ fit: BoxFit.cover,),),
+ ],
+ // Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ // child: Image.asset('assets/images/conversation/gif/muji_base_eye.gif',
+ // fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child:GifImage(
+ controller: controller1,
+ image: const AssetImage("assets/images/conversation/gif/muji_mouth1.gif"),
+ ),
+ // Image.asset('assets/images/conversation/gif/muji_mouth1.gif', fit: BoxFit.cover,),
+ )
+ ],
+ )
+
+
+ // SvgPicture.asset(
+ // 'assets/images/conversation/con_muji.svg', fit: BoxFit.cover,
+ // ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ]
+ else if(nextQuestion == 11)...[
+ Padding(
+ padding:EdgeInsets.only(top:175, left:90),
+ child:
+ Container(
+ width: 250,
+ //height: 120,
+ child: Column(children: [
+ SizedBox(height: 28,),
+ Stack(children: [
+ Row(children: [
+ Text("${dogName}์ ๋์ด๋ ", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 20, fontWeight: FontWeight.w500, color: Colors.black),),
+ Container(width: 25,
+ padding: EdgeInsets.only(bottom:16),
+ child: TextField(
+ style:textStyle.inputfield,
+ onTap: (){
+ chooseType = false;
+ setState(() {
+
+ });
+ },
+ onChanged: (text){
+ decidedAge = true;
+ if(decidedType){
+ selectAT = true;
+ }
+ },
+ keyboardType: TextInputType.number,
+ inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]'))],
+ controller: dogAgeController,
+ decoration: InputDecoration(
+ focusedBorder: InputBorder.none,
+ hintText: '๋ช',
+ contentPadding: EdgeInsets.only(top: 16),
+ suffixStyle: TextStyle(color: Color(0xff83A8FF), fontSize: 20,),
+ hintStyle: textStyle.field,
+
+ ),
+ ),),
+ Text("์ด์ด๊ณ ,", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 20, fontWeight: FontWeight.w500, color: Colors.black),),
+ ],),
+ Column(
+ children: [
+ SizedBox(height: 48,),
+ Row(
+ children: [
+ Text(" ๊ฒฌ์ข
์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 20, fontWeight: FontWeight.w500, color: Colors.black),),
+
+ if(dogTypeinput)...[
+ Container(width: 56,
+ padding: EdgeInsets.only(bottom:16),
+ child: TextField(
+ style: textStyle.inputfield,
+ onChanged: (text){
+ chooseType = true;
+ decidedType = true;
+ setState(() {
+ });
+ },
+ onTap: (){
+ chooseType = true;
+ //decidedType = true;
+ setState(() {
+ });
+ },
+ // inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]'))],
+ controller: dogTypeController,
+ decoration: InputDecoration(
+ border: InputBorder.none,
+ focusedBorder: InputBorder.none,
+ hintText: '๋ฌด์จ',
+ contentPadding: EdgeInsets.only(top: 16),
+ suffixStyle: TextStyle(color: Color(0xff83A8FF), fontSize: 20,),
+ hintStyle: textStyle.field,
+ ),
+ ),
+ ),
+ ]else...[
+ TextButton(
+ child: Text(decidedType?"${userDogType}" :"๋ฌด์", style: decidedType?textStyle.inputfield : textStyle.field),
+ onPressed: (){
+ chooseType = true;
+ if(decidedAge){
+ selectAT = true;
+ }
+ setState(() {});
+ },
+ ),
+
+ ],
+ Text("์
๋๋ค.", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 20, fontWeight: FontWeight.w500, color: Colors.black),),
+ ],)
+ ],
+ ),
+
+ ],)
+
+ ],),
+ ),
+ ),
+
+
+ ] else if(nextQuestion > 11 && nextQuestion <16)...[
+ Stack(
+ children: [
+ // ์ ์ ์์น
+ Column(
+ children: [
+ SizedBox(height: 420,),
+ Container(
+ child: SvgPicture.asset(
+ 'assets/images/conversation/user7.svg',
+ height: 282,
+ width: screenSize.width,
+ ),
+ ),
+ ],
+ ),
+ Column(
+ children: [
+ SizedBox(height: 144,),
+ Container(
+ width: screenSize.width,
+ height: 375,
+ child:
+ Stack(
+ children: [
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_ear.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base.gif', fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base_eye.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child:GifImage(
+ controller: controller1,
+ image: const AssetImage("assets/images/conversation/gif/muji_mouth1.gif"),
+ ),
+ // Image.asset('assets/images/conversation/gif/muji_mouth1.gif', fit: BoxFit.cover,),
+ )
+ ],
+ )
+
+
+ // SvgPicture.asset(
+ // 'assets/images/conversation/con_muji.svg', fit: BoxFit.cover,
+ // ),
+ ),
+ ],
+ ),
+
+ ],
+ ),
+
+ ] else if(nextQuestion == 16)...[
+ Stack(
+ children: [
+
+ Column(
+ children: [
+ SizedBox(height: 418,),
+ Container(
+ height: 284,
+ width: screenSize.width,
+ color: Color(0xffFFFFF7),
+ )
+ ],
+ ),
+ Column(
+ children: [
+ SizedBox(height: 418,),
+ SvgPicture.asset(
+ 'assets/images/conversation/shadow.svg', fit: BoxFit.cover,
+ ),
+ ],
+ ),
+
+ Column(
+ children: [
+ SizedBox(height: 144,),
+ Container(
+ width: screenSize.width,
+ height: 375,
+ child:
+ Stack(
+ children: [
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_ear.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base.gif', fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base_eye.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child:GifImage(
+ controller: controller1,
+ image: const AssetImage("assets/images/conversation/gif/muji_mouth1.gif"),
+ ),
+ // Image.asset('assets/images/conversation/gif/muji_mouth1.gif', fit: BoxFit.cover,),
+ )
+ ],
+ )
+
+ // SvgPicture.asset(
+ // 'assets/images/conversation/con_muji.svg', fit: BoxFit.cover,
+ // ),
+ ),
+ ],
+ ),
+ // Container(
+ // width: screenSize.width,
+ // height: 258,
+ // child: SvgPicture.asset(
+ // 'assets/images/conversation/con_muji.svg', fit: BoxFit.cover,
+ // ),
+ // ),
+
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ SizedBox(height: 444,),
+ Row(
+ children: [
+ SizedBox(width: 16,),
+ Container(
+ width: 168,
+ height: 168,
+ child: ElevatedButton(
+ style: ui_miss? buttonChart().bluebtn2_1 : buttonChart().whitebtn_1,
+ onPressed: () {
+ //miss = true;
+ ui_grief = false;
+ if(ui_miss == false){
+ ui_miss = true;
+ } else{
+ ui_miss = false;
+ }
+ // nextQuestion++;
+ setState(() {});
+ },
+ child: Container(
+ padding: EdgeInsets.only(top:8.0,left: 8.0, bottom: 8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 16,),
+ Text("๊ทธ๋ฆฌ์", style: TextStyle(fontFamily: 'Pretendard',fontSize: 16, color: ui_miss? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 16,),
+ Text("์ฐ๋ฆฌ ${dogName}๊ฐ\n๊ทธ๋ฆฌ์ด ๋ง์์ด ๋ค์ด์.", style: TextStyle(fontFamily: 'Pretendard',fontSize: 12, color: ui_miss? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 16,),
+ Row(
+ children: [
+ SizedBox(width: 76,),
+ SvgPicture.asset('assets/images/conversation/intro/miss.svg')
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ ),
+ SizedBox(width: 16,),
+ Container(
+ width: 168,
+ height: 168,
+ child: ElevatedButton(
+ style: ui_grief? buttonChart().bluebtn2_1 : buttonChart().whitebtn_1,
+ onPressed: () {
+ // grief = true;
+ ui_miss = false;
+ if(ui_grief == false){
+ ui_grief = true;
+ } else{
+ ui_grief = false;
+ }
+ // nextQuestion++;
+ setState(() {});
+ },
+ child: Container(
+ padding: EdgeInsets.only(top:8.0,left: 8.0, bottom: 8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 16,),
+ Text("์ฌํ", style: TextStyle(fontFamily: 'Pretendard',fontSize: 16, color: ui_grief? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 16,),
+ Text("${dogName}๊ฐ ์์ด์\n์ฌํ ๋ง์์ด ๋ค์ด์.", style: TextStyle(fontFamily: 'Pretendard',fontSize: 12, color: ui_grief? Color(0xff333333) : Color(0xff4B5396)),),
+ SizedBox(height: 16,),
+ Row(
+ children: [
+ SizedBox(width: 76,),
+ SvgPicture.asset('assets/images/conversation/intro/grief.svg')
+ ],
+ )
+ ],
+ ),
+ )
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ],
+ ),
+
+ ]
+ else if(nextQuestion > 16)...[
+ Stack(
+ children: [
+ // ์ ์ ์์น
+ Column(
+ children: [
+ SizedBox(height: 420,),
+ Container(
+ child: SvgPicture.asset(
+ 'assets/images/conversation/user7.svg',
+ height: 282,
+ width: screenSize.width,
+ ),
+ ),
+ ],
+ ),
+ Column(
+ children: [
+ SizedBox(height: 144,),
+ Container(
+ width: screenSize.width,
+ height: 375,
+ child:
+ Stack(
+ children: [
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_ear.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base.gif', fit: BoxFit.cover,),),
+
+ if( (miss && nextQuestionMiss == 0) || (grief && nextQuestionGrief == 0) || (grief && nextQuestionGrief == 1))...[
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: GifImage(
+ controller: controller2,
+ image: const AssetImage("assets/images/conversation/gif/sad_muji.gif"),
+ ),
+ ),
+ ] else...[
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base_eye.gif',
+ fit: BoxFit.cover,),),
+ ],
+
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child:GifImage(
+ controller: controller1,
+ image: const AssetImage("assets/images/conversation/gif/muji_mouth1.gif"),
+ ),
+ // Image.asset('assets/images/conversation/gif/muji_mouth1.gif', fit: BoxFit.cover,),
+ )
+ ],
+ )
+
+ // SvgPicture.asset(
+ // 'assets/images/conversation/con_muji.svg', fit: BoxFit.cover,
+ // ),
+ ),
+ ],
+ ),
+
+ ],
+ ),
+ ]
+ ],
+ )
+
+ ],
+ ),
+ ],
+ ],
+ ),
+ ),
+ ),
+ // ์
๋ ฅ ๋ฐ ๋ฆฌ์คํธ ์ถ๊ฐ ์์
- ๋งค์ฐ ์ค์
+ // // nextQuestion ์ด 3๊ณผ 7์ผ๋ ๋ฑ์ฅ
+ bottomSheet: Padding(
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).viewInsets.bottom * 0.001),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ if(nextQuestion == 4)...[
+ Container(
+ color: Colors.white,
+ height: 48,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 8.0, top: 8.0, left: 16,right: 16),
+ child: Stack(
+ children: [
+ Container(
+ width: screenSize.width,
+ height: 48,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(color: setUserName? Color(colorChart.blue):Color(0xffC0D2FC)),
+ borderRadius: BorderRadius.circular(30),
+ ),
+ ),
+ Positioned(
+ left: 15,
+ right: 30,
+ bottom:-4,
+ child: TextField(
+ textAlignVertical: TextAlignVertical.center,
+ maxLines: 1,
+ controller: userNameController,
+ style: textStyle.bk14normal,
+ decoration: InputDecoration(
+ hintStyle: textStyle.grey14normal,
+ border: InputBorder.none,
+ hintText: '์ด๋ ๊ฒ ๋ถ๋ฌ์ฃผ์ธ์.'),
+ onChanged: (s) {
+ setUserName = true;
+ setState(() {
+
+ });
+ //text = s;
+ },
+ onTap: () {},
+ ),
+ ),
+ Positioned(
+ left: screenSize.width - 80,
+ //right: 30,
+ bottom: 3,
+ top: 3,
+ child: ElevatedButton(
+ onPressed: () {
+
+ if(setUserName){
+ nextQuestion++;
+ _player.setAsset(voice[voiceCount]);
+ voiceCount++;
+ _player.play();
+ controller1.repeat(
+ min: 0,
+ max: 53,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ Timer(Duration(milliseconds: 1500), () {
+ controller1.stop();
+ });
+
+ controller3.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 2000)
+ );
+
+ Timer(Duration(milliseconds: 1000), () {
+ controller3.stop();
+ });
+
+ // setUserName = true;
+ userName = userNameController.text;
+ userName_ = userName;
+ // ๋๋ค์ ์ถ๊ฐ
+ // ํต์ผ๋ก ์ถ๊ฐ
+ //"์ข์์. ๋ณดํธ์๋.", // this is modifi
+ //"์ ๊ฐ ๋ณดํธ์๋๊ณผ์ ๋ํ๋ฅผ ์์ํ๊ธฐ ์ํด",
+ //"๋ณดํธ์๋์ ๋ํด์\n๋ ์์๊ฐ๋ ค๊ณ ํด์.",
+ //"๋ค์ ์ง๋ฌธ์ ๋ตํด์ฃผ์ธ์!",
+ question1_0.insertAll(5, [
+ "์ข์์. ${userName}๋.",
+ "์ ๊ฐ ${userName}๋๊ณผ์\n๋ํ๋ฅผ ์์ํ๊ธฐ ์ํด",
+ "${userName}๋์ ๋ํด์\n๋ ์์๊ฐ๋ ค๊ณ ํด์.",
+ "๋ค์ ์ง๋ฌธ์ ๋ตํด์ฃผ์ธ์!",
+ "๋ฐ๋ ค๊ฒฌ์ ์ด๋ฆ์ ๋ฌด์์ด์์๊น์?",
+ ]);
+ setState(() {
+
+ });
+ }
+
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: setUserName? Color(colorChart.blue):Color(0xffDDE7FD),
+ fixedSize: const Size(3, 3),
+ shape: const CircleBorder(),
+ ),
+ child: Icon(
+ Icons.arrow_upward,
+ color: Colors.white,
+ size: 16,
+ )),
+ ),
+ ],
+ ),
+ ),
+ ),
+
+ ]else if(nextQuestion == 9)...[
+ Container(
+ color:Colors.white,
+ height: 48,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 8.0, top: 8.0, left: 16,right: 16),
+ child: Stack(
+ children: [
+ Container(
+ width: screenSize.width,
+ height: 48,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border:
+ Border.all(color: setDogName? Color(colorChart.blue):Color(0xffC0D2FC)),
+ borderRadius: BorderRadius.circular(30),
+ ),
+ ),
+ Positioned(
+ left: 15,
+ right: 30,
+ bottom:-4,
+ child: TextField(
+ textAlignVertical: TextAlignVertical.center,
+ maxLines: 1,
+ // maxLength: 8,
+ controller: dogNameController,
+ style: textStyle.bk14normal,
+ decoration: InputDecoration(
+ hintStyle: textStyle.grey14normal,
+ border: InputBorder.none,
+ hintText: '๋ฐ๋ ค๊ฒฌ์ ์ด๋ฆ์...'),
+ onChanged: (s) {
+ //text = s;
+ setDogName = true;
+ setState(() {
+
+ });
+ },
+ onTap: () {},
+ ),
+ ),
+ Positioned(
+ left: screenSize.width - 81,
+ //right: 30,
+ bottom: 3,
+ top: 3,
+ child: ElevatedButton(
+ onPressed: () {
+ // setDogName = true;
+ if(setDogName){
+ nextQuestion++;
+ _player.setAsset(voice[voiceCount]);
+ voiceCount++;
+ _player.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 20,
+ period: const Duration(
+ milliseconds: 1000));
+
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+ dogName = dogNameController.text;
+ dogName_ = dogName;
+
+ question1_0.insertAll(10, [
+ "${dogName}์ ๋ชจ์ต์ ์ด๋ ๋์? \n๋น์นธ์ ์ฑ์ ์๋ ค์ฃผ์ธ์.",
+ "${dogName}์ ๋ชจ์ต์ ์ด๋ ๋์? \n๋น์นธ์ ์ฑ์ ์๋ ค์ฃผ์ธ์.",
+ // this is modifi
+ "์ข์์, ${userName}๋!",
+ "์ง๋ฌธ์ ๋ตํ๋ฉฐ,\n์ ๊น์ด๋๋ง",
+ "${dogName}์ ๋ํด์ ๋ ์ฌ๋ ค๋ดค๋ ๊ฒ ๊ฐ์์.",
+ "${dogName}์ ๋ํด์ ์๊ฐํ๋",
+ "${userName}๋์\n์ด๋ค ๋ง์์ด ๋ค์๋์?",
+ ]);
+
+ setState(() {});
+ }
+
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: setDogName? Color(colorChart.blue):Color(0xffDDE7FD),
+ fixedSize: const Size(23, 23),
+ shape: const CircleBorder(),
+ ),
+ child: Icon(
+ Icons.arrow_upward,
+ color: Colors.white,
+ size: 16,
+ )),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ]
+ else if(chooseType && dogTypeinput == false)...[
+ Container(
+ color: Colors.white,
+ child: Padding(
+ padding: const EdgeInsets.all(16.0),
+ child: Container(
+ width: screenSize.width,
+ height: 280,
+ child:
+ GridView.builder(
+ itemCount:49,
+ gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+ crossAxisCount: 2, //1 ๊ฐ์ ํ์ ๋ณด์ฌ์ค item ๊ฐ์
+ childAspectRatio: 3 / 0.7, //item ์ ๊ฐ๋ก 1, ์ธ๋ก 2 ์ ๋น์จ
+ mainAxisSpacing: 8, //์ํ Padding
+ crossAxisSpacing: 8, //์์ง Padding
+ ),
+ itemBuilder: (BuildContext context, int index){
+ return
+ ElevatedButton(
+ style: buttonChart().whitebtn,
+ onPressed: () {
+ if(index == 48){
+ dogTypeinput = true;
+ setState(() {});
+ } else{
+ decidedType= true;
+ chooseType = false;
+ dogType = dogType_[index];
+ userDogType = dogType_[index];
+ setState(() {});
+ }
+ },
+ child: Text("${dogType_[index]}", style: textStyle.bk14normal,)
+ );
+ }),
+ )
+ ),
+ ),
+ ]
+ else if(nextQuestion == 11 && selectAT)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0.0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ _player.setAsset(voice[voiceCount]);
+ voiceCount++;
+ _player.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 45,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ Timer(Duration(seconds: 1), () {
+ controller1.stop();
+ });
+ controller3.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 2000)
+ );
+
+ Timer(Duration(milliseconds: 1000), () {
+ controller3.stop();
+ });
+
+ decidedType = false;
+ dogAge = int.parse(dogAgeController.text);
+ if(dogTypeinput){
+ dogType = dogTypeController.text;
+ }
+ nextQuestion++;
+ setState(() {});
+ saveUserInfo(sign_in.userAccessToken, userName, dogName, dogAge, dogType);
+ },
+ child: Text("๋ค์"),
+ ),
+ ),),
+ ),
+ ]
+ else if(nextQuestion == 16 && (ui_miss || ui_grief) )...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0.0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ nextQuestion++;
+ if(ui_miss){
+ voice.insertAll(17, [
+ "assets/voice/intro/intro_miss1.mp3",
+ "assets/voice/intro/intro_miss2.mp3",
+ "assets/voice/intro/intro_miss3.mp3",
+ "assets/voice/intro/intro_miss4.mp3",
+ "assets/voice/intro/intro_miss4.mp3",
+ ]);
+ questions1_2.insertAll(0,[
+ "์ด์ ๋ ${dogName}์\n๋ชจ์ต์ ๋ณด๊ฑฐ๋ ๋ง์ง ์ ์์ง๋ง,",
+ "${dogName}๋ฅผ ์๊ฐํ๋ฉฐ\n๊ทธ๋ฆฌ์์ ์ฑ์๊ฐ ์ ์์ ๊ฒ ๊ฐ์์.",
+ "${dogName}์์ ๊ธฐ์ต์\n์ฒ์๋ถํฐ ๋ ์ฌ๋ ค๋ณผ๊น์?",
+ "${dogName}์์ ๊ธฐ์ต์ด ์์๋๋\n๊ทธ๋ ์ ์ฌ์ง๊ณผ ์ด์ผ๊ธฐ๋ฅผ ๊ธฐ๋กํด๋ณด์์.",
+ ]);
+ miss = true;
+ _player.setAsset(voice[voiceCount]);
+ voiceCount++;
+ controller1.repeat(
+ min: 0,
+ max: 45,
+ period: const Duration(milliseconds: 1000)
+ );
+ controller2.repeat(
+ min: 0,
+ max: 32,
+ period: const Duration(milliseconds: 3500)
+ );
+ Timer(Duration(seconds: 3), () {
+ controller2.stop();
+ });
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ }else if (ui_grief){
+ voice.insertAll(17, [
+ "assets/voice/intro/intro_grief1.mp3",
+ "assets/voice/intro/intro_grief2.mp3",
+ "assets/voice/intro/intro_grief3.mp3",
+ "assets/voice/intro/intro_grief4.mp3",
+ "assets/voice/intro/intro_grief5.mp3",
+ "assets/voice/intro/intro_grief5.mp3",
+ ]);
+ questions1_3.insertAll(0,[
+ "${dogName}๊ฐ ๊ณ์ ์๋ ์ง๊ธโฆ",
+ "${userName}๋์\n์ฌํ ๋ง์์ด ์ ๊ฒ๋ ๋๊ปด์ ธ์.",
+ "${dogName}์์\n๊ธฐ์ต์ ํ๋์ฉ ๋๋์๋ณด๋ฉด",
+ "์ฌํ ๋ง์์ ๋๊ธฐ์ ๋์์ด ๋ ๊ฑฐ์์.",
+ "${dogName}์์ ๊ธฐ์ต์ด ์์๋๋\n๊ทธ๋ ์ ์ฌ์ง๊ณผ ์ด์ผ๊ธฐ๋ฅผ ๊ธฐ๋กํด๋ณด์์.",
+ ]);
+ grief = true;
+ _player.setAsset(voice[voiceCount]);
+ voiceCount++;
+ controller1.repeat(
+ min: 0,
+ max: 45,
+ period: const Duration(milliseconds: 1000)
+ );
+ controller2.repeat(
+ min: 0,
+ max: 32,
+ period: const Duration(milliseconds: 3500)
+ );
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ Timer(Duration(seconds: 3), () {
+ controller2.stop();
+ });
+ }
+
+ setState(() {});
+ },
+ child: Text("๋ค์"),
+ ),
+ ),),
+ ),
+ ]
+ ],
+ ),
+ )),
+ )
+ );
+
+ }
+}
diff --git a/client/lib/conversation/intro/intro2.dart b/client/lib/conversation/intro/intro2.dart
new file mode 100644
index 0000000..0623a6c
--- /dev/null
+++ b/client/lib/conversation/intro/intro2.dart
@@ -0,0 +1,563 @@
+import 'dart:async';
+import 'dart:convert';
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:client/conversation/intro/intro_coach_mark.dart';
+import 'package:client/screen.dart';
+import 'package:http/http.dart' as http;
+import 'package:client/progressbar/animation_progressbar.dart';
+import 'package:client/sign/sign_in.dart';
+import 'package:client/style.dart';
+import 'package:intl/intl.dart';
+import 'intro.dart' as intro;
+import 'package:client/sign/sign_in.dart' as sign_in;
+import 'package:just_audio/just_audio.dart';
+import 'package:flutter_gif/flutter_gif.dart';
+import 'package:client/main.dart'as main;
+
+/// ์ธํธ๋ก_๋ง๋ฌด๋ฆฌ
+
+AudioPlayer player2 = AudioPlayer();
+
+late FlutterGifController controller1, controller2, controller3;
+
+List voice =[
+ "assets/voice/intro/intro2_1.mp3", "assets/voice/intro/intro2_2.mp3", "assets/voice/intro/intro2_3.mp3",
+ "assets/voice/intro/intro2_4.mp3", "assets/voice/intro/intro2_5.mp3", "assets/voice/intro/intro2_6.mp3",
+ "assets/voice/intro/intro2_7.mp3", "assets/voice/intro/intro2_8.mp3", "assets/voice/intro/intro2_9.mp3",
+];
+
+class Intro2Page extends StatefulWidget {
+
+ static Future navigatorPush(BuildContext context) async {
+ return Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (_) => Intro2Page(),
+ ),
+ );
+ }
+
+ @override
+ _Intro2PageState createState() => _Intro2PageState();
+}
+
+class _Intro2PageState extends State with TickerProviderStateMixin {
+
+ bool finish = false; // ๋ฉ๋ชจ๋ฆฌ์ผ ๋ฐ ๋ง๋ฌด๋ฆฌ
+ bool selectedNextTime = false;
+ bool chooseTime = false;
+ int whatTime = 0;
+
+ String sentDate = "";
+
+ // ํ
์คํธ ์๋ํ
์ปจํธ๋กค๋ฌ๋ฅผ ์์ฑํ์ฌ ํ๋์ ํ ๋น
+ final nextTimeController = TextEditingController(); // nextQuestion = 7์ผ๋
+
+
+ FocusNode _focusNode = FocusNode();
+
+ @override
+ void initState() {
+ super.initState();
+ // ์์ ์ ์ฉ
+ for(int i= 0 ; i < voice.length; i++){
+ player2.setAudioSource(AudioSource.uri(
+ Uri.parse(voice[i]))
+ );
+ }
+
+ controller1 = FlutterGifController(vsync: this);
+
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 3800), () {
+ controller1.stop();
+ });
+
+ _focusNode.addListener(_onFocusChange);
+ }
+
+ void _onFocusChange() {
+ if (_focusNode.hasFocus) {
+ // ํค๋ณด๋ ์ฌ๋ฆฌ๊ธฐ
+ FocusScope.of(context).requestFocus(_focusNode);
+ }
+ }
+
+ @override
+ void dispose() async {
+ super.dispose();
+ }
+
+ // int nextPage = 0;
+
+ List introText =[];
+
+ int nextQuestion = 0;
+
+
+ int voiceCount = 0;
+
+
+
+ List questions1_4 =[
+ "${intro.userName_}๋!\n ๊ธฐ์ตํ ๊ฐ๊ฐ ์์ฑ๋์์ด์.", // 0
+ "๊ธฐ์ตํ ๊ฐ๋ฅผ ํ์ธํด๋ณด์ธ์!", //1
+ "${intro.userName_}๋!", //2
+ "์ค๋์ ${intro.userName_}๋๊ณผ์ \n์ฒซ๋ง๋จ์ด์์ง๋ง", //3
+ "${intro.dogName_}๊ฐ ์ผ๋ง๋ ๋ง์ ์ฌ๋์ \n๋ฐ์๋์ง ๋๋ ์ ์์์ด์.", //4
+ "์์ผ๋ก ์ ์ ํจ๊ป \n${intro.dogName_}์์ ์๊ฐ๋ค์ ๊ธฐ์ตํ๋ฉฐ,", //5
+ "${intro.userName_}๋์ ๋ง์ ์ ์์ ์ \n์ฐพ์๊ฐ๊ธธ ๋ฐ๋ผ์.", //6
+ "์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์ ๋ง๋๊ฒ ๋ \n์๊ฐ์ ์๋ ค์ฃผ์ธ์.", //7
+ "๋ค, ${intro.userName_}๋. ๊ทธ๋ ๋ค์ ๋ง๋์!" //8
+ ];
+
+ // ๋ํ ๋จ๊ณ ์ ์ฅ
+ void saveCon(String aToken, String con, String nextcon) async {
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/user/conversation-status';
+
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "conversationStatus": con,
+ "nextConversationAt": nextcon,
+ };
+
+ // ํค๋ ์ ๋ณด ์ค์
+ Map headers = {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ };
+
+ // HTTP GET ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.put(
+ Uri.parse(apiUrl),
+ body: json.encode(data),
+ headers: headers, // ํค๋ ์ถ๊ฐ
+ );
+
+ ///var jsonResponse = utf8.decode(response.bodyBytes);
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ print("๋ํ ๋จ๊ณ ๋ฃ๊ธฐ ์ฑ๊ณต");
+ setState(() {
+ });
+
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ..?: ${response.statusCode}');
+ }
+ }
+
+
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+ return
+ Container(
+ color: Color(0xffDDE7FD),
+ child: GestureDetector(
+ onTap: (){
+ SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top]);
+ print("ํ์ธ: " + nextQuestion.toString());
+
+ if(nextQuestion == 0){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 2500), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 1){
+ //nextQuestion++;
+ }
+ else if(nextQuestion == 2){
+ nextQuestion++; // ์ธํธ๋ก ์์ ํ count
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 2500), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion > 2 && nextQuestion <= 6){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 2){
+ Timer(Duration(seconds: 4), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 3){
+ Timer(Duration(milliseconds: 4000), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 4){
+ Timer(Duration(seconds: 5), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 5){
+ Timer(Duration(seconds: 4), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 6){
+ Timer(Duration(seconds: 4), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(nextQuestion == 7){
+
+ }
+
+ setState(() {
+ });
+ },
+ child: Scaffold(
+ backgroundColor: Colors.transparent,
+ appBar: AppBar(
+ //title: Text("๊ธฐ์ตํ ๊ฐ", style: TextStyle(fontSize:16, color: Colors.white ),),
+ //centerTitle: true,
+ leading: IconButton(
+ icon: SvgPicture.asset(
+ 'assets/images/conversation/home_icon.svg',
+ ),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ backgroundColor: Colors.transparent,
+ elevation: 0.0,
+ ),
+ //extendBodyBehindAppBar: true,
+ body:
+ SingleChildScrollView(
+ child:Container(
+ child: Column(
+ children: [
+ SizedBox(height: 3,),
+ Container(
+ width: screenSize.width,
+ height: 25,
+ child: Padding(
+ padding: EdgeInsets.only( left:16, right: 16),
+ child: Center(
+ child: FAProgressBar(
+ currentValue: 15,
+ size: 5,
+ backgroundColor: Colors.white,
+ )
+ ),
+ ),
+ ),
+ Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children:[
+ SizedBox(
+ height: 14,
+ ),
+ Stack(
+ children: [
+ Container(
+ height: 157,
+ width: screenSize.width,
+ child:
+ Stack(
+ children: [
+ Center(child: SvgPicture.asset('assets/images/conversation/bubble.svg',fit: BoxFit.fill,),),
+ Container(
+ padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 12, ),
+ child: Center(
+ child: Column(
+ children: [
+ if(questions1_4[nextQuestion].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ questions1_4[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ questions1_4[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+ ],
+ )
+ )
+ ),
+ ],
+ )
+ ),
+ // ๋ฌด์ง ์์น
+ if(nextQuestion < 7 || nextQuestion == 8)...[
+ Stack(
+ children: [
+ // ์ ์ ์์น
+ Column(
+ children: [
+ SizedBox(height: 420,),
+ Container(
+ child: SvgPicture.asset(
+ 'assets/images/conversation/user7.svg',
+ height: 282,
+ width: screenSize.width,
+ ),
+ ),
+ ],
+ ),
+ Column(
+ children: [
+ SizedBox(height: 144,),
+ Container(
+ width: screenSize.width,
+ height: 375,
+ child:
+ Stack(
+ children: [
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_ear.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base.gif', fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base_eye.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child:GifImage(
+ controller: controller1,
+ image: const AssetImage("assets/images/conversation/gif/muji_mouth1.gif"),
+ ),
+ // Image.asset('assets/images/conversation/gif/muji_mouth1.gif', fit: BoxFit.cover,),
+ )
+ ],
+ )
+
+
+ // SvgPicture.asset(
+ // 'assets/images/conversation/con_muji.svg', fit: BoxFit.cover,
+ // ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ]
+ else if(nextQuestion == 7)...[
+ Padding(
+ padding: EdgeInsets.only(top:175, left:45),
+ child: Container(
+ width: 275,
+ height: 120,
+ child: Column(
+ children: [
+ Row(
+ children: [
+ SizedBox(width: 75,),
+ Container(width: 25,
+ padding: EdgeInsets.only(bottom:16),
+ child: TextField(
+ style: textStyle.inputfield,
+ onTap: (){
+ chooseTime = true;
+ selectedNextTime = true;
+ whatTime = int.parse(nextTimeController.text);
+ setState(() {
+ });
+ },
+ keyboardType: TextInputType.number,
+ inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]'))],
+ controller: nextTimeController,
+ decoration: InputDecoration(
+ hintText: '๋ช',
+ contentPadding: EdgeInsets.only(top: 16),
+ suffixStyle: TextStyle(color: Color(0xff83A8FF), fontSize: 20,),
+ hintStyle: textStyle.field
+ //labelText: '๋ช',
+ ),
+ ),),
+ Text("์๊ฐ ํ์ ๋ง๋์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 20, fontWeight: FontWeight.w500, color: Colors.black),),
+ ],),
+ SizedBox(height: 8,),
+ // DateFormat('MM/dd HH:mm').format(DateTime.parse(parsedResponseHR[index]['createdAt']))
+ // DateFormat('MM/dd HH:mm').format(DateTime.now().add(Duration(hours: whatTime)))
+ Text(chooseTime?"${DateFormat('MM์ dd์ผ HH์ mm๋ถ').format(DateTime.now().add(Duration(hours: whatTime)))}":"์ต์ 1์๊ฐ์์ 24์๊ฐ ์ฌ์ด๋ก ์ ํด์ฃผ์ธ์.", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffAAAAAA)),),
+
+ ],),
+ ),
+ ),
+
+ ]
+ ],
+ ),
+
+
+ ///
+
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+
+ // // nextQuestion ์ด 3๊ณผ 7์ผ๋ ๋ฑ์ฅ
+ bottomSheet: Padding(
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).viewInsets.bottom * 0.001),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ if(nextQuestion == 1)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0.0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => IntroMarkCoachPage()));
+ nextQuestion++;
+ // player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ // _player.play();
+ setState(() {
+
+ });
+ },
+ child: Text("๊ธฐ์ตํ ๊ฐ ํ์ธํ๊ธฐ", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ else if(nextQuestion == 7 && selectedNextTime)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0.0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ //decidedType = false;
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 3800), () {
+ controller1.stop();
+ });
+ setState(() {});
+ },
+ child: Text("๋ค์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ else if(nextQuestion == 8)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0.0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ //decidedType = false;
+ //checkSignUp = false;
+ //checkSignIn = true;
+ checkSignUp = false;
+ var now = DateTime.now().add(Duration(hours: whatTime));
+ sentDate = DateFormat('yyyy-MM-dd hh:mm:ss').format(now.toLocal());
+
+ saveCon(sign_in.userAccessToken, "0", sentDate);
+ setState(() {});
+ main.player.stop();
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => MyScreenPage(title: '์คํฌ๋ฆฐ ํ์ด์ง',)));
+ },
+ child: Text("์๋ฃ", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ ],
+ ),
+ )),
+ )
+
+ );
+
+ }
+}
diff --git a/client/lib/conversation/intro/intro_coach_mark.dart b/client/lib/conversation/intro/intro_coach_mark.dart
new file mode 100644
index 0000000..85c008b
--- /dev/null
+++ b/client/lib/conversation/intro/intro_coach_mark.dart
@@ -0,0 +1,287 @@
+
+import 'dart:async';
+import 'dart:convert';
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/services.dart';
+import 'package:http/http.dart' as http;
+import 'package:client/style.dart';
+import 'package:client/conversation/intro/intro2.dart' as intro2;
+
+/// ์ธํธ๋ก_์ฝ์น๋งํฌ
+class IntroMarkCoachPage extends StatefulWidget {
+
+ static Future navigatorPush(BuildContext context) async {
+ return Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (_) => IntroMarkCoachPage(),
+ ),
+ );
+ }
+
+ @override
+ _IntroMarkCoachPageState createState() => _IntroMarkCoachPageState();
+}
+
+class _IntroMarkCoachPageState extends State {
+
+ bool finish = false; // ๋ฉ๋ชจ๋ฆฌ์ผ ๋ฐ ๋ง๋ฌด๋ฆฌ
+
+ // ํ
์คํธ ์๋ํ
์ปจํธ๋กค๋ฌ๋ฅผ ์์ฑํ์ฌ ํ๋์ ํ ๋น
+ final userNameController = TextEditingController(); // nextQuestion = 3์ผ๋
+ final dogNameController = TextEditingController(); // nextQuestion = 7์ผ๋
+ final dogAgeController = TextEditingController(); // nextQuestion = 10์ผ๋
+ final dogTypeController = TextEditingController(); // nextQuestion = 10์ผ๋
+
+
+ FocusNode _focusNode = FocusNode();
+
+ @override
+ void initState() {
+ super.initState();
+ _callAPI();
+ _focusNode.addListener(_onFocusChange);
+ }
+
+ void _onFocusChange() {
+ if (_focusNode.hasFocus) {
+ // ํค๋ณด๋ ์ฌ๋ฆฌ๊ธฐ
+ FocusScope.of(context).requestFocus(_focusNode);
+ }
+ }
+
+ @override
+ void dispose() async {
+ super.dispose();
+ }
+
+ int nextPage = 0;
+
+ List introText =[];
+
+ int nextQuestion = 0;
+
+
+ void _callAPI() async {
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "stage" : "0",
+ "set" : "0",
+ "lineId" : "0"
+ };
+
+ var url = Uri.parse('http://3.38.1.125:8080/conversation/line'); // ์๋ํฌ์ธํธ URL ์ค์
+
+ try {
+ var response = await http.post(
+ url,
+ body: json.encode(data), // ์์ฒญ ๋ณธ๋ฌธ์ ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ์ธ์ฝ๋ฉํ์ฌ ์ ๋ฌ
+ headers: {'Content-Type': 'application/json',}, // ์์ฒญ ํค๋์ Content-Type ์ค์
+ );
+
+ if (response.statusCode == 200) {
+ // ์๋ต ์ฑ๊ณต ์์ ์ฒ๋ฆฌ
+
+ var jsonResponse = utf8.decode(response.bodyBytes); // ์๋ต ๋ณธ๋ฌธ์ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ // JSON ๊ฐ์ ํ์ฉํ ์ํ๋ ๋์ ์ํ
+ //utf8.decode(jsonResponse);
+ print(jsonResponse);
+
+ List contentList = [];
+
+ List parsedResponse = json.decode(jsonResponse);
+
+ setState(() {
+ for (var item in parsedResponse) {
+ if (item['content'] != null) {
+ introText.add(item['content']);
+ }
+ }
+ });
+
+
+ print(introText);
+
+ print('API ํธ์ถ ์ฑ๊ณต: ${response.statusCode}');
+ } else {
+ // ์์ฒญ ์คํจ ์์ ์ฒ๋ฆฌ
+ print('API ํธ์ถ ์คํจ: ${response.statusCode}');
+ }
+ } catch (e) {
+ // ์์ธ ๋ฐ์ ์์ ์ฒ๋ฆฌ
+ print('API ํธ์ถ ์ค ์์ธ ๋ฐ์: $e');
+ }
+ }
+
+
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+ return
+ Container(
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.topRight,
+ end: Alignment.bottomLeft,
+ colors: [
+ Color(0xffE4ECFF),
+ Color(0xffA2BEFF),
+ ],
+ )
+ ),
+ child: GestureDetector(
+ onTap: (){
+ print(nextQuestion);
+ if(nextPage == 3){
+
+ } else if(nextPage < 3){
+ nextPage++;
+ }
+
+ setState(() {
+ });
+ },
+ child: Scaffold(
+ backgroundColor: Colors.transparent,
+ appBar: AppBar(
+ //title: Text("๊ธฐ์ตํ ๊ฐ", style: TextStyle(fontSize:16, color: Colors.white ),),
+ //centerTitle: true,
+ backgroundColor: Colors.transparent,
+ elevation: 0.0,
+ automaticallyImplyLeading: false,
+ ),extendBodyBehindAppBar: true,
+ body:
+ Container(
+ width: screenSize.width,
+ child: Column(
+ children: [
+
+ Stack(
+ children: [
+ // Padding(padding: EdgeInsets.only(left: 12, top: 125),
+ // child: SvgPicture.asset('assets/images/conversation/intro/coach01.svg',
+ // height: 624,
+ // width: 380, fit: BoxFit.fill,),
+ // ),
+
+ if(nextPage == 0)...[
+ Padding(padding: EdgeInsets.only(left: 6, top: 145),
+ child: Container(
+ width: 260,
+ height: 575,
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(24.0),
+ child: Image.asset('assets/images/conversation/intro/iscreen1.png',
+ fit: BoxFit.fill,)
+ ),
+ ),
+ ),
+ ] else if(nextPage == 1)...[
+ Padding(padding: EdgeInsets.only(left: 6, top: 145),
+ child: Container(
+ width: 260,
+ height: 575,
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(24.0),
+ child: Image.asset('assets/images/conversation/intro/iscreen2.png',
+ fit: BoxFit.fill,)
+ ),
+ ),
+ ),
+ ] else if(nextPage == 2)...[
+ Padding(padding: EdgeInsets.only(left: 6, top: 145),
+ child: Container(
+ width: 260,
+ height: 575,
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(24.0),
+ child: Image.asset('assets/images/conversation/intro/iscreen3.png',
+ fit: BoxFit.fill,)
+ ),
+ ),
+ ),
+ ] else if(nextPage == 3)...[
+ Padding(padding: EdgeInsets.only(left: 6, top: 145),
+ child: Container(
+ width: 260,
+ height: 575,
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(24.0),
+ child: Image.asset('assets/images/conversation/intro/iscreen4.png',
+ fit: BoxFit.fill,)
+ ),
+ ),
+ ),
+ ],
+
+ Padding(padding: EdgeInsets.only(left: 120, top: 706),
+ child: Container(
+ width: 40,
+ height: 2,
+ child: Container(
+ width: 40, height: 2,
+ color: Colors.white,
+ )
+ ),
+ ),
+ ],
+ )
+ ],
+ ),
+ ),
+ bottomSheet: Padding(
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).viewInsets.bottom * 0.001),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ if(nextPage == 3)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0.0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ Navigator.pop(context); // intro2๋ก ๋์๊ฐ๊ธฐ
+ intro2.player2.setAsset(intro2.voice[2]);
+ intro2.player2.play();
+ // 2.5์ด ์ ์
+ intro2.controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 1000), () {
+ intro2.controller1.stop();
+ });
+ // _player.play();
+ setState(() {
+
+ });
+ },
+ child: Text("ํ์ธ", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ ],
+ ),
+ )
+
+ ),
+ )
+
+ );
+
+ }
+}
diff --git a/client/lib/conversation/intro/intro_memorial.dart b/client/lib/conversation/intro/intro_memorial.dart
new file mode 100644
index 0000000..57e7e6a
--- /dev/null
+++ b/client/lib/conversation/intro/intro_memorial.dart
@@ -0,0 +1,885 @@
+import 'dart:async';
+import 'dart:io';
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:image_picker/image_picker.dart';
+import 'package:client/style.dart';
+import 'dart:convert';
+import 'package:flutter/services.dart';
+import 'package:http_parser/http_parser.dart';
+import 'package:dio/dio.dart';
+import 'package:client/sign/sign_in.dart' as sign_in;
+import 'intro2.dart';
+
+/// ์ธํธ๋ก์์ ์ถ์ต ์์ฑํ๊ธฐ
+class IntroMemorialPage extends StatefulWidget {
+ static Future navigatorPush(BuildContext context) async {
+ return Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (_) => IntroMemorialPage(),
+ ),
+ );
+ }
+
+ @override
+ _IntroMemorialPageState createState() => _IntroMemorialPageState();
+}
+
+class _IntroMemorialPageState extends State {
+
+ String _imageDate = "์ฌ์ง์ ์ถ๊ฐํด์ฃผ์ธ์.";
+
+ // ํ
์คํธ์๋ํ
์ปจํธ๋กค๋ฌ๋ฅผ ์์ฑํ์ฌ ํ๋์ ํ ๋น
+ final titleController = TextEditingController();
+ final dateController = TextEditingController();
+ final locationController = TextEditingController();
+ final contentController = TextEditingController();
+ final hashtagController = TextEditingController();
+
+ bool title = false;
+ bool date = false;
+ bool location = false;
+ bool content = false;
+ bool hashtag = false;
+
+ // ๋ ์ง๋ฅผ ์ง์ ์กฐ์ ์ธ์ง ํ์ธ
+ bool modiDate = false;
+
+ // ๊ณต๊ฐ ๋น๊ณต๊ฐ: ์ฒ์์๋ ๊ณต๊ฐ๋ก ์ค์ ๋์ด ์์
+ String isPrivate = "False";
+ bool private = false;
+
+ bool isPicSelected = false; // ์ฌ์ง์ด ๋ค์ด๊ฐ๋์ง ํ์ธํ๋ ์ฝ๋ -> UI ๋ฐ๋
+ final ImagePicker _picker = ImagePicker();
+ final List _pickedImages = [];
+
+ // ์ด๋ฏธ์ง ์ฌ๋ฌ๊ฐ ๋ถ๋ฌ์ค๊ธฐ
+ void getMultiImage() async {
+ final List? images = await _picker.pickMultiImage();
+
+ if (images != null) {
+ setState(() async {
+ print("check it");
+ //_picker.pickMultiImage().printInfo();
+ _pickedImages.addAll(images);
+ print("??: "+ images[0].path);
+
+ // /(?20(?:0|1|2)\d{1})(?:-|\.|_)?(?\d{2})(?:-|\.|_)?(?\d{2})(?:-|_|\.|\s)?(?\d{2})(?:-|\.|_)?(?\d{2})(?:-|\.|_)?(?\d{2})/
+ final dateMatch = RegExp(r'(\d{4})(\d{2})(\d{2})').firstMatch(images[0].path);
+
+ if (dateMatch != null) {
+ final year = dateMatch.group(1);
+ final month = dateMatch.group(2);
+ final day = dateMatch.group(3);
+
+ setState(() {
+ _imageDate = '$year-$month-$day';
+
+ print("ํ์ธ ๋ถํ" + _imageDate.toString());
+ });
+ }
+
+ isPicSelected = true;
+ setState(() {
+
+ });
+
+ });
+ }
+ }
+
+ Future uploadImagesAndData2(String aToken, List images, String title, String date, String place, String content, String hashtag, String isPrivate) async {
+ print('test');
+ try {
+ var dio = Dio(); // Dio ์ธ์คํด์ค ์์ฑ
+
+ // JSON ๋ฐ์ดํฐ ์ถ๊ฐ
+ final jsonData = {
+ "title": title,
+ "date":date,
+ "place": place,
+ "content": content,
+ "hashtag": hashtag,
+ "isPrivate": isPrivate
+ };
+
+ // JSON ๋ฐ์ดํฐ๋ฅผ ๋ฌธ์์ด๋ก ์ธ์ฝ๋ฉ
+ final jsonString = jsonEncode(jsonData);
+
+ final List _files2 = images
+ .map((img) => MultipartFile.fromFileSync(img.path,
+ contentType: MediaType("image", "jpeg")))
+ .toList();
+
+ //final List _files = images.map((img) => MultipartFile.fromFileSync(img!.path, contentType: new MediaType("image", "jpg"))).toList();
+
+ //print('Content-Type: ${_files.contentType}');
+
+
+ final data = FormData.fromMap({
+ "image": _files2,
+ "json": await MultipartFile.fromString(
+ jsonString,
+ contentType: MediaType.parse('application/json'),
+ ),
+ },
+ );
+
+
+ //dio.options.contentType = 'multipart/form-data';
+
+ // http://3.38.1.125:8080/memorial
+ // POST ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await dio.post(
+ 'http://3.38.1.125:8080/memorial', // ์๋ฒ ์๋ํฌ์ธํธ ๊ฒฝ๋ก ์ค์
+ data: data,
+ options: Options(
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'multipart/form-data', // Content-Type ์ค์
+ 'Authorization': 'Bearer $aToken',
+ },
+ //responseType: ResponseType.plain
+ ),
+ );
+
+ // ์๋ต ์ฒ๋ฆฌ
+ if (response.statusCode == 200) {
+ print('์ด๋ฏธ์ง ์
๋ก๋ ์ฑ๊ณต');
+ // ์๋ต ๋ฐ์ดํฐ ์ฝ๊ธฐ
+ final responseJson = json.decode(response.data);
+ print('์๋ฒ ์๋ต ๋ฐ์ดํฐ: $responseJson');
+ } else {
+ print('์ด๋ฏธ์ง ์
๋ก๋ ์คํจ. HTTP ์๋ฌ ์ฝ๋: ${response.statusCode}');
+ }
+ } catch (e) {
+ if (e is DioError) {
+ if (e.response != null) {
+ print('์๋ฒ ์๋ต ์๋ฌ ๋ฐ์ดํฐ: ${e.response?.data}');
+ } else {
+ print('Dio ์๋ฌ: ${e.message}');
+ }
+ } else {
+ print('์๋ฌ ๋ฐ์: $e');
+ }
+ }
+ }
+
+
+ @override
+ void initState() {
+ super.initState();
+
+ }
+
+ @override
+ void dispose() async {
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+ return
+ Container(
+ child: Scaffold(
+ backgroundColor: Color(0xffF2F4F6),
+ appBar: AppBar(
+ actions: [
+ Padding(padding: EdgeInsets.only(right: 15),
+ child: Row(
+ children: [
+ SizedBox(width: 8,),
+ InkWell(
+ onTap: (){
+ // ์ฌ๊ธฐ์ db๋ก image path๋ ๋ณด๋ด๊ธฐ
+ //uploadImages(_pickedImages);
+ print("test: " + _pickedImages.toString());
+ //List images, String title, String place, String content, String hashtag, String isPrivate
+ uploadImagesAndData2(
+ sign_in.userAccessToken,
+ _pickedImages,
+ titleController.text.toString(),
+ _imageDate,
+ locationController.text.toString(),
+ contentController.text.toString(),
+ hashtagController.text.toString(),
+ isPrivate);
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => Intro2Page()));
+ },
+ child: SvgPicture.asset(
+ 'assets/images/memorial/upload_button.svg',
+ ),
+ ),
+
+ ],
+ ),)
+ ],
+ // actions: [
+ // new IconButton(
+ // icon: Container(
+ // child: SvgPicture.asset(
+ // 'assets/images/memorial/upload_button.svg',
+ // ),),
+ // onPressed: (){
+ // // ์ฌ๊ธฐ์ db๋ก image path๋ ๋ณด๋ด๊ธฐ
+ // print("test: "+_pickedImages.toString());
+ // //List images, String title, String place, String content, String hashtag, String isPrivate
+ // uploadImagesAndData2(sign_in.userAccessToken, _pickedImages,titleController.text.toString(),_imageDate,locationController.text.toString(),
+ // contentController.text.toString(), hashtagController.text.toString(), isPrivate);
+ // Navigator.push(
+ // context,
+ // MaterialPageRoute(
+ // builder: (context) => Intro2Page()));
+ // },
+ // ),
+ // ],
+ title: Text("๊ธฐ์ต ๋จ๊ธฐ๊ธฐ", style: textStyle.bk20normal),
+ backgroundColor: Colors.transparent,
+ elevation: 0.0,
+ iconTheme: IconThemeData(color: Colors.black),
+ centerTitle: true,
+ leading: IconButton(
+ icon: Icon(Icons.arrow_back_ios_rounded, color: Colors.black),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+
+ ),
+ body: Container(
+ // width: screenSize.width,
+ // height: screenSize.height,
+ child: SingleChildScrollView(
+ padding: EdgeInsets.fromLTRB(16, 16, 16, 16),
+ //scrollDirection: Axis.vertical,
+ child:
+ Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Container(
+ padding: EdgeInsets.all(16),
+ width: screenSize.width,
+ height: screenSize.width - 28,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(16),
+ ),
+ child: GridView.builder(
+ itemCount:9,
+ gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+ crossAxisCount: 3, //1 ๊ฐ์ ํ์ ๋ณด์ฌ์ค item ๊ฐ์
+ childAspectRatio: 1 / 1, //item ์ ๊ฐ๋ก 1, ์ธ๋ก 1 ์ ๋น์จ
+ mainAxisSpacing: 16, //์ํ Padding
+ crossAxisSpacing: 16, //์์ง Padding
+ ),
+ itemBuilder: (BuildContext context, int index){
+ return
+ Stack(
+ children: [
+ SvgPicture.asset(
+ 'assets/images/memorial/memorial_img.svg',
+ width: 128,
+ height: 128,
+ ),
+ if(isPicSelected && index == 0 && _pickedImages.length >= 1)...[
+ Container(
+ width: 128,
+ height: 128,
+ child:
+ ClipRRect(
+ borderRadius: BorderRadius.circular(16.0),
+ child: Image.file(File(_pickedImages![index]!.path), fit: BoxFit.cover,),
+ ),
+ ),
+ Row(
+ children: [
+ SizedBox(width: 72,),
+ Container(
+ width: 24,
+ height: 24,
+ child:InkWell(
+ child: SvgPicture.asset(
+ 'assets/images/memorial/delete_bt.svg',
+ ),
+ onTap: (){
+ _pickedImages.removeAt(index);
+ setState(() {});
+ print("remove");
+ },
+ )
+ ),
+ ],
+ ),
+
+ ],
+ if(isPicSelected && index == 1 && _pickedImages.length >= 2)...[
+ Container(
+ width: 128,
+ height: 128,
+ child:
+ ClipRRect(
+ borderRadius: BorderRadius.circular(16.0),
+ child: Image.file(File(_pickedImages![index]!.path), fit: BoxFit.cover,),
+ ),
+ ),
+ Row(
+ children: [
+ SizedBox(width: 72,),
+ Container(
+ width: 24,
+ height: 24,
+ child:InkWell(
+ child: SvgPicture.asset(
+ 'assets/images/memorial/delete_bt.svg',
+ ),
+ onTap: (){
+ _pickedImages.removeAt(index);
+ setState(() {});
+ print("remove");
+ },
+ )
+ ),
+ ],
+ ),
+ ],
+ if(isPicSelected && index == 2 && _pickedImages.length >= 3)...[
+ Container(
+ width: 128,
+ height: 128,
+ child:
+ ClipRRect(
+ borderRadius: BorderRadius.circular(16.0),
+ child: Image.file(File(_pickedImages![index]!.path), fit: BoxFit.cover,),
+ ),
+ ),
+ Row(
+ children: [
+ SizedBox(width: 72,),
+ Container(
+ width: 24,
+ height: 24,
+ child:InkWell(
+ child: SvgPicture.asset(
+ 'assets/images/memorial/delete_bt.svg',
+ ),
+ onTap: (){
+ _pickedImages.removeAt(index);
+ setState(() {});
+ print("remove");
+ },
+ )
+ ),
+ ],
+ ),
+ ],
+ if(isPicSelected && index == 3 && _pickedImages.length >= 4)...[
+ Container(
+ width: 128,
+ height: 128,
+ child:
+ ClipRRect(
+ borderRadius: BorderRadius.circular(16.0),
+ child: Image.file(File(_pickedImages![index]!.path), fit: BoxFit.cover,),
+ ),
+ ),
+ Row(
+ children: [
+ SizedBox(width: 72,),
+ Container(
+ width: 24,
+ height: 24,
+ child:InkWell(
+ child: SvgPicture.asset(
+ 'assets/images/memorial/delete_bt.svg',
+ ),
+ onTap: (){
+ _pickedImages.removeAt(index);
+ setState(() {});
+ print("remove");
+ },
+ )
+ ),
+ ],
+ ),
+ ],
+ if(isPicSelected && index == 4 && _pickedImages.length >= 5)...[
+ Container(
+ width: 128,
+ height: 128,
+ child:
+ ClipRRect(
+ borderRadius: BorderRadius.circular(16.0),
+ child: Image.file(File(_pickedImages![index]!.path), fit: BoxFit.cover,),
+ ),
+ ),
+ Row(
+ children: [
+ SizedBox(width: 72,),
+ Container(
+ width: 24,
+ height: 24,
+ child:InkWell(
+ child: SvgPicture.asset(
+ 'assets/images/memorial/delete_bt.svg',
+ ),
+ onTap: (){
+ _pickedImages.removeAt(index);
+ setState(() {});
+ print("remove");
+ },
+ )
+ ),
+ ],
+ ),
+ ],
+ if(isPicSelected && index == 5 && _pickedImages.length >= 6)...[
+ Container(
+ width: 128,
+ height: 128,
+ child:
+ ClipRRect(
+ borderRadius: BorderRadius.circular(16.0),
+ child: Image.file(File(_pickedImages![index]!.path), fit: BoxFit.cover,),
+ ),
+ ),
+ Row(
+ children: [
+ SizedBox(width: 72,),
+ Container(
+ width: 24,
+ height: 24,
+ child:InkWell(
+ child: SvgPicture.asset(
+ 'assets/images/memorial/delete_bt.svg',
+ ),
+ onTap: (){
+ _pickedImages.removeAt(index);
+ setState(() {});
+ print("remove");
+ },
+ )
+ ),
+ ],
+ ),
+ ],
+ if(isPicSelected && index == 6 && _pickedImages.length >= 7)...[
+ Container(
+ width: 128,
+ height: 128,
+ child:
+ ClipRRect(
+ borderRadius: BorderRadius.circular(16.0),
+ child: Image.file(File(_pickedImages![index]!.path), fit: BoxFit.cover,),
+ ),
+ ),
+ Row(
+ children: [
+ SizedBox(width: 72,),
+ Container(
+ width: 24,
+ height: 24,
+ child:InkWell(
+ child: SvgPicture.asset(
+ 'assets/images/memorial/delete_bt.svg',
+ ),
+ onTap: (){
+ _pickedImages.removeAt(index);
+ setState(() {});
+ print("remove");
+ },
+ )
+ ),
+ ],
+ ),
+ ],
+ if(isPicSelected && index == 7 && _pickedImages.length >= 8)...[
+ Container(
+ width: 128,
+ height: 128,
+ child:
+ ClipRRect(
+ borderRadius: BorderRadius.circular(16.0),
+ child: Image.file(File(_pickedImages![index]!.path), fit: BoxFit.cover,),
+ ),
+ ),
+ Row(
+ children: [
+ SizedBox(width: 72,),
+ Container(
+ width: 24,
+ height: 24,
+ child:InkWell(
+ child: SvgPicture.asset(
+ 'assets/images/memorial/delete_bt.svg',
+ ),
+ onTap: (){
+ _pickedImages.removeAt(index);
+ setState(() {});
+ print("remove");
+ },
+ )
+ ),
+ ],
+ ),
+ ],
+ if(isPicSelected && index == 8 && _pickedImages.length >= 9)...[
+ Container(
+ width: 128,
+ height: 128,
+ child:
+ ClipRRect(
+ borderRadius: BorderRadius.circular(16.0),
+ child: Image.file(File(_pickedImages![index]!.path), fit: BoxFit.cover,),
+ ),
+ ),
+ Row(
+ children: [
+ SizedBox(width: 72,),
+ Container(
+ width: 24,
+ height: 24,
+ child:InkWell(
+ child: SvgPicture.asset(
+ 'assets/images/memorial/delete_bt.svg',
+ ),
+ onTap: (){
+ _pickedImages.removeAt(index);
+ setState(() {});
+ print("remove");
+ },
+ )
+ ),
+ ],
+ ),
+ ],
+ // Row(
+ // children: [
+ // SizedBox(width: 70,),
+ // Container(
+ // width: 20,
+ // height: 20,
+ // child: IconButton(
+ // onPressed: (){
+ // _pickedImages.removeAt(index);
+ // setState(() {});
+ // print("remove");
+ // }, icon: Icon(Icons.cancel, color: Colors.black,)),
+ // ),
+ // ],),
+ if(index == 0 && _pickedImages.length >= 1)...[
+ Padding(padding: EdgeInsets.only(top: 70, left: 5),
+ child: SvgPicture.asset(
+ 'assets/images/memorial/image_rep.svg',
+ ),
+ ),
+ ],
+
+ if(index == 8 && _pickedImages.length < 9)...[
+ Center(
+ child: IconButton(
+ onPressed: (){
+ getMultiImage();
+ },
+ icon: Image.asset('assets/images/memorial/memorial_upload.png'),
+ ))
+ ],
+
+ ],
+ );
+
+ }),
+ ),
+
+ SizedBox(
+ height: 8,
+ ),
+ Container(
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(16),
+ ),
+ child: Column(
+ children: [
+ Container(
+ alignment: Alignment.topLeft,
+ child: Padding(padding: EdgeInsets.only(top:16, left: 16, right:16),
+ child: Text("์ ๋ชฉ",style: textStyle.bk14midium,),
+ ),
+ ),
+ Padding(padding: EdgeInsets.only(top:0,left: 20, right:20),
+ child: TextField(
+ controller: titleController,
+ decoration: InputDecoration(
+ contentPadding: EdgeInsets.only(top:3, left: 0),
+ hintStyle: textStyle.grey16normal,
+ border: InputBorder.none,
+ focusedBorder: InputBorder.none,
+ hintText: '์ ๋ชฉ์ ์
๋ ฅํ์ธ์.'),),
+ ),
+ ],
+ ),
+ ),
+ SizedBox(
+ height: 8,
+ ),
+
+ Container(
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(16),
+ ),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Container(
+ alignment: Alignment.topLeft,
+ child: Padding(padding: EdgeInsets.only(top:16,left: 16, right:16),
+ child: Text("๋ ์ง", style: textStyle.bk14midium,),
+ ),
+ ),
+ SizedBox(height: 8,),
+ Padding(padding: EdgeInsets.only(top:0, left: 16, right:16, bottom: 8),
+ child:
+ Row(children: [
+ Container(
+ width: 225,
+ child: modiDate?
+ Container(
+ height: 20,
+ child: TextField(
+ controller: dateController,
+ decoration: InputDecoration(
+ contentPadding: EdgeInsets.only(bottom:13),
+ hintStyle: textStyle.grey16normal,
+ border: InputBorder.none,
+ focusedBorder: InputBorder.none,
+ hintText: '2000-00-00'),
+ onTap: (){
+
+ },
+ ),)
+
+ : Text( "${_imageDate}", style: textStyle.bk16normal,),
+ ),
+ if(modiDate == false)...[
+ SizedBox(width: 30,),
+ Container(
+ height: 24,
+ width: 62,
+ child: ElevatedButton(
+ onPressed: (){
+ modiDate = true;
+ setState(() {
+ });
+ },
+ style: buttonChart().pinkbtn2,
+ child: Text("์์ ", style: textStyle.white16midium,)
+ ),)
+ ]else...[
+ SizedBox(width: 30,),
+ Container(
+ height: 24,
+ width: 62,
+ child: ElevatedButton(
+ onPressed: (){
+ modiDate = false;
+ _imageDate = dateController.text;
+ setState(() {
+ });
+ },
+ style: buttonChart().bluebtn,
+ child: Text("์๋ฃ", style: textStyle.white16midium,)
+ ),)
+ ]
+ ],),
+ ),
+ SizedBox(height: 6,),
+ ],
+ ),
+ ),
+ SizedBox(
+ height: 8,
+ ),
+
+ Container(
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(16),
+ ),
+ child: Column(
+ children: [
+ Container(
+ alignment: Alignment.topLeft,
+ child: Padding(padding: EdgeInsets.only(top:16,left: 16, right:16),
+ child: Text("์์น",style: textStyle.bk14midium,),
+ ),
+ ),
+ Padding(padding: EdgeInsets.only(top:0,left: 16, right:16),
+ child:
+ Row(children: [
+ Container(width: 255,
+ child: TextField(
+ controller: locationController,
+ decoration: InputDecoration(
+ contentPadding: EdgeInsets.only(top:3, left: 0),
+ hintStyle: textStyle.grey16normal,
+ border: InputBorder.none,
+ focusedBorder: InputBorder.none,
+ hintText: '์์น๋ฅผ ์ ๊ฑฐ๋ ์
๋ ฅํด์ฃผ์ธ์.'),),
+ ),
+ // Container(
+ // height: 25,
+ // width: 57,
+ // child: ElevatedButton(
+ // onPressed: (){
+ // },
+ // style: buttonChart().pinkbtn2,
+ // child: Text("๊ฒ์", style: textStyle.white16midium,)
+ // ),)
+ ],),
+
+ ),
+ ],
+ ),
+ ),
+ SizedBox(
+ height: 8,
+ ),
+
+ Container(
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(16),
+ ),
+ child: Column(
+ children: [
+ Container(
+ alignment: Alignment.topLeft,
+ child: Padding(padding: EdgeInsets.only(top:16,left: 16, right:16),
+ child: Text("๋ด์ฉ", style: textStyle.bk14midium,),
+ ),
+ ),
+ Padding(
+ padding:
+ EdgeInsets.only(top: 0, left: 16, right: 16, bottom: 16),
+ child: TextField(
+ controller: contentController,
+ decoration: InputDecoration(
+ contentPadding: EdgeInsets.only(top:3, left:0),
+ hintStyle: textStyle.grey16normal,
+ border: InputBorder.none,
+ focusedBorder: InputBorder.none,
+ hintText: '๊ทธ๋ ์ ์ด์ผ๊ธฐ๋ฅผ ์ ์ด์ฃผ์ธ์.'),
+ maxLines: null,
+ ),
+ ),
+ ],
+ ),
+ ),
+
+ SizedBox(
+ height: 8,
+ ),
+
+ Container(
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(16),
+ ),
+ child: Column(
+ children: [
+ Container(
+ alignment: Alignment.topLeft,
+ child: Padding(padding: EdgeInsets.only(top:16,left: 16, right:16),
+ child: Text("ํด์ํ๊ทธ", style: textStyle.bk14midium,),
+ ),
+ ),
+ Padding(
+ padding: EdgeInsets.only(top:0,left: 16, right:16),
+ child: TextField(
+ controller: hashtagController,
+ decoration: InputDecoration(
+ contentPadding: EdgeInsets.only(top:3, left: 0),
+ hintStyle: textStyle.grey16normal,
+ border: InputBorder.none,
+ focusedBorder: InputBorder.none,
+ hintText: '#ํด์ํ๊ทธ๋ฅผ ์ฌ์ฉํด๋ณด์ธ์.'),),
+ ),
+ ],
+ ),
+ ),
+ SizedBox(height: 8,),
+
+ Container(
+ padding: EdgeInsets.all(16),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(16),
+ ),
+ child: Column(
+ children: [
+ Container(
+ alignment: Alignment.topLeft,
+ child: Padding(padding: EdgeInsets.only(top:0),
+ child: Text("๊ณต๊ฐ ์ค์ ",style: textStyle.bk14midium),
+ ),
+ ),
+ SizedBox(height: 8,),
+ Container(
+ alignment: Alignment.topLeft,
+ child: Padding(padding: EdgeInsets.only(top:8),
+ child: Text("์ด ๋ฉ๋ชจ๋ฆฌ์ผ์ ๊ณต๊ฐํ๋ฉด ๋ค๋ฅธ ๋ฐ๋ ค์ธ๋ค์ '๊ตฌ๊ฒฝํ๊ธฐ'ํ์ด์ง์ ๊ณต์ ๋ฉ๋๋ค.",style: TextStyle(fontSize: 11, color: Color(0xff555555)),),
+ ),
+ ),
+ SizedBox(height: 16,),
+ Row(
+ children: [
+ //SizedBox(width: 20,),
+ Container(
+ height: 26,
+ width: 100,
+ child: ElevatedButton(onPressed: (){
+ isPrivate = "False";
+ private = false;
+ setState(() {
+ });
+ },
+ style: private? buttonChart().bluebtn4 : buttonChart().bluebtn2,
+ child: Text("๊ณต๊ฐ", style: private? textStyle.bk14light :textStyle.bk14midium,)
+ ),
+ ),
+ SizedBox(width: 8,),
+ Container(
+ height: 26,
+ width: 100,
+ child: ElevatedButton(onPressed: (){
+ isPrivate = "True";
+ private = true;
+ setState(() {
+ });
+ },
+ style: private? buttonChart().bluebtn2 : buttonChart().bluebtn4,
+ child: Text("๋น๊ณต๊ฐ", style: private? textStyle.bk14midium :textStyle.bk14light,)
+ ),
+ ),
+ ],
+ )
+ ],
+ )
+ ),
+
+ ],
+ ),
+ ),
+ )
+
+ )
+ );
+
+ }
+}
diff --git a/client/lib/conversation/intro/intro_story.dart b/client/lib/conversation/intro/intro_story.dart
new file mode 100644
index 0000000..2a86292
--- /dev/null
+++ b/client/lib/conversation/intro/intro_story.dart
@@ -0,0 +1,501 @@
+import 'dart:async';
+import 'dart:convert';
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:http/http.dart' as http;
+import 'package:client/conversation/intro/start_intro.dart';
+import 'package:client/style.dart';
+import 'package:just_audio/just_audio.dart';
+
+/// ์ธํธ๋ก_์คํ ๋ฆฌ๋ณด๋
+class IntroStoryPage extends StatefulWidget {
+
+ static Future navigatorPush(BuildContext context) async {
+ return Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (_) => IntroStoryPage(),
+ ),
+ );
+ }
+
+ @override
+ _IntroStoryPageState createState() => _IntroStoryPageState();
+}
+
+class _IntroStoryPageState extends State {
+
+ List voice =[
+ "",
+ "assets/voice/story/pup1.mp3",
+ "assets/voice/story/muji1.mp3",
+ "assets/voice/story/pup2.mp3",
+ "assets/voice/story/muji2.mp3",
+ "assets/voice/story/pup3.mp3",
+ "assets/voice/story/pup4.mp3",
+ "assets/voice/story/pup5.mp3",
+ "assets/voice/story/pup6.mp3",
+ "",
+ "", "","",
+ ];
+
+ List img =[
+ "assets/images/story/story1.svg",
+ "assets/images/story/story2.svg",
+ "assets/images/story/story3.svg",
+ "assets/images/story/story4.svg",
+ "assets/images/story/story5.svg",
+ "assets/images/story/story6.svg",
+ "assets/images/story/story7.svg",
+ "assets/images/story/story8.svg",
+ "assets/images/story/story9.svg",
+ "assets/images/story/story10.svg",
+ "assets/images/story/story11.svg",
+ ];
+
+ bool finish = false; // ๋ง๋ฌด๋ฆฌ
+ AudioPlayer player2 = AudioPlayer();
+
+ FocusNode _focusNode = FocusNode();
+
+ @override
+ void initState() {
+ super.initState();
+
+ _focusNode.addListener(_onFocusChange);
+ }
+
+ void _onFocusChange() {
+ if (_focusNode.hasFocus) {
+ // ํค๋ณด๋ ์ฌ๋ฆฌ๊ธฐ
+ FocusScope.of(context).requestFocus(_focusNode);
+ }
+ }
+
+ @override
+ void dispose() async {
+ super.dispose();
+ }
+
+ int nextPage = 0;
+ List introText =[];
+ int voiceCount = 0;
+ int nextQuestion = 0;
+
+
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+ return
+ Container(
+ decoration: BoxDecoration(
+ image: DecorationImage(
+ fit: BoxFit.cover,
+ image: AssetImage('assets/images/story/background2.png'), // ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง
+ ),
+ ),
+ //color: Color(0xffDDE7FD),
+ child: GestureDetector(
+ onTap: (){
+ print(nextQuestion);
+ if(nextPage <11){
+ nextPage++;
+ voiceCount++;
+ player2.setAsset(voice[voiceCount]);
+ player2.play();
+ if(nextPage == 11){
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => StartIntroPage()));
+ }
+ }else if(nextPage == 11){
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => StartIntroPage()));
+ }
+
+ setState(() {
+ });
+ },
+ child: Scaffold(
+ backgroundColor: Colors.transparent,
+ appBar: AppBar(
+ //title: Text("๊ธฐ์ตํ ๊ฐ", style: TextStyle(fontSize:16, color: Colors.white ),),
+ //centerTitle: true,
+ backgroundColor: Colors.transparent,
+ elevation: 0.0,
+ automaticallyImplyLeading: false,
+ ),extendBodyBehindAppBar: true,
+
+ body:
+ Container(
+ child: Column(
+ children: [
+ if(nextPage == 0)...[
+ SizedBox(height: 300,),
+ Center(
+ child: Image.asset(
+ 'assets/images/story/bbk1.png',
+ ),
+ ),
+ SizedBox(height: 16,),
+ Stack(
+ children: [
+ Text(
+ '"..."',
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontFamily: 'Nanum-BaReunHiPi',
+ //color: Color(0xff4B5396),
+ fontSize: 16,height: 1.4,
+ foreground: Paint()
+ ..style = PaintingStyle.stroke
+ ..strokeWidth = 2
+ ..color = Colors.white,
+ ),
+ ),
+ Text('"..."',style: textStyle.bubbletext2,textAlign: TextAlign.center,),
+ ],
+ )
+
+ ]else if(nextPage == 1)...[
+ SizedBox(height: 300,),
+ Center(
+ child: Stack(
+ children: [
+ Image.asset(
+ 'assets/images/story/bbk2.png',
+ ),
+ Padding(padding: EdgeInsets.only(left: 80, top: 50),
+ child: SvgPicture.asset(
+ 'assets/images/story/st1.svg',
+ ),
+ ),
+ ],
+ )
+ ),
+ SizedBox(height: 16,),
+ Stack(
+ children: [
+ Text(
+ '"๊ทธ๋ ๊ฒ ๋๋ ์ฌ๊ธฐ๋ก ์ค๊ฒ ๋์ด.\n๋ฌด์ง๋ ํญ์ ์ด๊ณณ์์ ๊ฐ์์ง๋ค์ ๋ฐฐ์
ํด ์ฃผ๋๊ฑฐ์ผ?"',
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontFamily: 'Nanum-BaReunHiPi',
+ //color: Color(0xff4B5396),
+ fontSize: 16,height: 1.4,
+ foreground: Paint()
+ ..style = PaintingStyle.stroke
+ ..strokeWidth = 2
+ ..color = Colors.white,
+ ),
+ ),
+
+ Text('"๊ทธ๋ ๊ฒ ๋๋ ์ฌ๊ธฐ๋ก ์ค๊ฒ ๋์ด.\n๋ฌด์ง๋ ํญ์ ์ด๊ณณ์์ ๊ฐ์์ง๋ค์ ๋ฐฐ์
ํด ์ฃผ๋๊ฑฐ์ผ?"',
+ style: textStyle.bubbletext2,textAlign: TextAlign.center,),
+ ],
+ )
+
+ ]else if(nextPage == 2)...[
+ SizedBox(height: 236,),
+ Stack(
+ children: [
+ Text(
+ '"๋ง์. ๊ฐ์์ง๋ณ๋ก ํฅํ๋\n์ด ๋ฌด์ง๊ฐ ๋ค๋ฆฌ์์ ๋ง๋๋ฌด๊ฐ ๋์ด์ฃผ๊ณค ํ์ง."',
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontFamily: 'Nanum-BaReunHiPi',
+ //color: Color(0xff4B5396),
+ fontSize: 16,height: 1.4,
+ foreground: Paint()
+ ..style = PaintingStyle.stroke
+ ..strokeWidth = 2
+ ..color = Color(0xffFCCBCD),
+ ),
+ ),
+ Text('"๋ง์. ๊ฐ์์ง๋ณ๋ก ํฅํ๋\n์ด ๋ฌด์ง๊ฐ ๋ค๋ฆฌ์์ ๋ง๋๋ฌด๊ฐ ๋์ด์ฃผ๊ณค ํ์ง."',
+ style: textStyle.bubbletext2,textAlign: TextAlign.center,),
+ ],
+ ),
+ SizedBox(height: 20,),
+ Center(
+ child: Stack(
+ children: [
+ Image.asset(
+ 'assets/images/story/bbk2.png',
+ ),
+ Padding(padding: EdgeInsets.only(left: 100, top: 52),
+ child: SvgPicture.asset(
+ 'assets/images/story/st2.svg',
+ ),
+ ),
+ ],
+ )
+ ),
+
+ ]else if(nextPage == 3)...[
+ SizedBox(height: 300,),
+ Center(
+ child: Stack(
+ children: [
+ Image.asset(
+ 'assets/images/story/bbk2.png',
+ ),
+ Padding(padding: EdgeInsets.only(left: 80, top: 50),
+ child: SvgPicture.asset(
+ 'assets/images/story/st3.svg',
+ ),
+ ),
+ ],
+ )
+ ),
+ SizedBox(height: 16,),
+ Stack(
+ children: [
+ Text(
+ '"๊ทธ๋ ๊ตฌ๋. ๋๋ถ์ ์ฌ์ฌํ์ง ์์.\nํ์ง๋งโฆ"',
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontFamily: 'Nanum-BaReunHiPi',
+ //color: Color(0xff4B5396),
+ fontSize: 16,height: 1.4,
+ foreground: Paint()
+ ..style = PaintingStyle.stroke
+ ..strokeWidth = 2
+ ..color = Colors.white,
+ ),
+ ),
+ Text('"๊ทธ๋ ๊ตฌ๋. ๋๋ถ์ ์ฌ์ฌํ์ง ์์.\nํ์ง๋งโฆ"', style: textStyle.bubbletext2,textAlign: TextAlign.center,),
+ ],
+ )
+
+ ]else if(nextPage == 4)...[
+ SizedBox(height: 252,),
+ Stack(
+ children: [
+ Text(
+ '"๋ฌด์จ ์ผ์ด์ผ?"',
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontFamily: 'Nanum-BaReunHiPi',
+ //color: Color(0xff4B5396),
+ fontSize: 16,height: 1.4,
+ foreground: Paint()
+ ..style = PaintingStyle.stroke
+ ..strokeWidth = 2
+ ..color = Color(0xffFCCBCD),
+ ),
+ ),
+ Text('"๋ฌด์จ ์ผ์ด์ผ?"', style: textStyle.bubbletext2,),
+ ],
+ ),
+ SizedBox(height: 26,),
+ Center(
+ child: Stack(
+ children: [
+ Image.asset(
+ 'assets/images/story/bbk2.png',
+ ),
+ Padding(padding: EdgeInsets.only(left: 100, top: 51),
+ child: SvgPicture.asset(
+ 'assets/images/story/st4.svg',
+ ),
+ ),
+ ],
+ )
+ ),
+
+ ]else if(nextPage == 5)...[
+ SizedBox(height: 300,),
+ Center(
+ child: Stack(
+ children: [
+ Image.asset(
+ 'assets/images/story/bbk2.png',
+ ),
+ Padding(padding: EdgeInsets.only(left: 112, top: 50),
+ child: SvgPicture.asset(
+ 'assets/images/story/st5.svg',
+ ),
+ ),
+ ],
+ )
+ ),
+ SizedBox(height: 16,),
+ Stack(
+ children: [
+ Text(
+ '"์ฐ๋ฆฌ ์ฃผ์ธ์ด ๊ฑฑ์ ๋ผ์.\n์ด์ ๋ด๊ฐ ์ฃผ์ธ ๊ณ์ ์์ผ๋,\n์ฃผ์ธ์ด ์ฌํผํ ๋ ์๋กํด์ค ์ ์์ด."',
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontFamily: 'Nanum-BaReunHiPi',
+ //color: Color(0xff4B5396),
+ fontSize: 16,height: 1.4,
+ foreground: Paint()
+ ..style = PaintingStyle.stroke
+ ..strokeWidth = 2
+ ..color = Colors.white,
+ ),
+ ),
+ Text('"์ฐ๋ฆฌ ์ฃผ์ธ์ด ๊ฑฑ์ ๋ผ์.\n์ด์ ๋ด๊ฐ ์ฃผ์ธ ๊ณ์ ์์ผ๋,\n์ฃผ์ธ์ด ์ฌํผํ ๋ ์๋กํด์ค ์ ์์ด."',
+ style: textStyle.bubbletext2,textAlign: TextAlign.center,),
+ ],
+ )
+
+ ]else if(nextPage == 6)...[
+ SizedBox(height: 300,),
+ Center(
+ child: Stack(
+ children: [
+ Image.asset(
+ 'assets/images/story/bbk2.png',
+ ),
+ Padding(padding: EdgeInsets.only(left: 100, top: 50),
+ child: SvgPicture.asset(
+ 'assets/images/story/st6.svg',
+ ),
+ ),
+ ],
+ )
+ ),
+ SizedBox(height: 16,),
+ Stack(
+ children: [
+ Text(
+ '"๋ฒ์จ ๋ค ์๋ค."',
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontFamily: 'Nanum-BaReunHiPi',
+ //color: Color(0xff4B5396),
+ fontSize: 16,height: 1.4,
+ foreground: Paint()
+ ..style = PaintingStyle.stroke
+ ..strokeWidth = 2
+ ..color = Colors.white,
+ ),
+ ),
+ Text('"๋ฒ์จ ๋ค ์๋ค."', style: textStyle.bubbletext2,),
+ ],
+ )
+
+ ]else if(nextPage == 7)...[
+ SizedBox(height: 300,),
+ Center(
+ child: Stack(
+ children: [
+ Image.asset(
+ 'assets/images/story/bbk2.png',
+ ),
+ Padding(padding: EdgeInsets.only(left: 112, top: 50),
+ child: SvgPicture.asset(
+ 'assets/images/story/st7.svg',
+ ),
+ ),
+ ],
+ )
+ ),
+ SizedBox(height: 16,),
+ Stack(
+ children: [
+ Text(
+ '"๋ฌด์ง, ํน์ ๋ด๊ฐ ๋ถํ ํ๋๋ง ํด๋ ๋ ๊น?"',
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontFamily: 'Nanum-BaReunHiPi',
+ //color: Color(0xff4B5396),
+ fontSize: 16,height: 1.4,
+ foreground: Paint()
+ ..style = PaintingStyle.stroke
+ ..strokeWidth = 2
+ ..color = Colors.white,
+ ),
+ ),
+ Text('"๋ฌด์ง, ํน์ ๋ด๊ฐ ๋ถํ ํ๋๋ง ํด๋ ๋ ๊น?"', style: textStyle.bubbletext2,textAlign: TextAlign.center,),
+ ],
+ )
+
+ ]else if(nextPage == 8)...[
+ SizedBox(height: 300,),
+ Center(
+ child: Stack(
+ children: [
+ Image.asset(
+ 'assets/images/story/bbk2.png',
+ ),
+ Padding(padding: EdgeInsets.only(left: 100, top: 52),
+ child: SvgPicture.asset(
+ 'assets/images/story/st8.svg',
+ ),
+ ),
+ ],
+ )
+ ),
+ SizedBox(height: 16,),
+ Stack(
+ children: [
+ Text(
+ '"์ฐ๋ฆฌ ์ฃผ์ธ์ด ๋ ์์ด๋ ์์จํ ์ผ์์ ๋ณด๋ผ ์ ์๋๋ก ๋์์ค."',
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontFamily: 'Nanum-BaReunHiPi',
+ //color: Color(0xff4B5396),
+ fontSize: 16,height: 1.4,
+ foreground: Paint()
+ ..style = PaintingStyle.stroke
+ ..strokeWidth = 2
+ ..color = Colors.white,
+ ),
+ ),
+ Text('"์ฐ๋ฆฌ ์ฃผ์ธ์ด ๋ ์์ด๋ ์์จํ ์ผ์์ ๋ณด๋ผ ์ ์๋๋ก ๋์์ค."',
+ style: textStyle.bubbletext2,textAlign: TextAlign.center,),
+ ],
+ )
+ ]else if(nextPage == 9)...[
+ SizedBox(height: 300,),
+ Center(
+ child: Stack(
+ children: [
+ Image.asset(
+ 'assets/images/story/bbk1.png',
+ ),
+ ],
+ )
+ ),
+
+ ]else if(nextPage == 10)...[
+ SizedBox(height: 300,),
+ Center(
+ child: Stack(
+ children: [
+ Image.asset(
+ 'assets/images/story/bbk2.png',
+ ),
+ Padding(padding: EdgeInsets.only(left: 100, top: 74),
+ child: SvgPicture.asset(
+ 'assets/images/story/st9.svg',
+ ),
+ ),
+ ],
+ )
+ ),
+
+ ]else if(nextPage == 11)...[
+
+
+ ]
+ ],
+ ),
+ ),
+
+ ),
+ )
+
+ );
+
+ }
+}
diff --git a/client/lib/conversation/intro/start_intro.dart b/client/lib/conversation/intro/start_intro.dart
new file mode 100644
index 0000000..f016235
--- /dev/null
+++ b/client/lib/conversation/intro/start_intro.dart
@@ -0,0 +1,225 @@
+import 'dart:async';
+import 'dart:convert';
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:client/conversation/intro/intro.dart';
+import 'package:client/style.dart';
+import 'package:just_audio/just_audio.dart';
+import 'package:flutter_gif/flutter_gif.dart';
+
+/// ์ธํธ๋ก ์์
+
+AudioPlayer player2 = AudioPlayer();
+
+late FlutterGifController controller1, controller2, controller3;
+
+class StartIntroPage extends StatefulWidget {
+
+ static Future navigatorPush(BuildContext context) async {
+ return Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (_) => StartIntroPage(),
+ ),
+ );
+ }
+
+ @override
+ _StartIntroPageState createState() => _StartIntroPageState();
+}
+
+class _StartIntroPageState extends State with TickerProviderStateMixin {
+
+
+ FocusNode _focusNode = FocusNode();
+
+
+ @override
+ void initState() {
+ super.initState();
+ // ์์ ์ ์ฉ
+
+ controller1 = FlutterGifController(vsync: this);
+
+ _focusNode.addListener(_onFocusChange);
+ }
+
+ void _onFocusChange() {
+ if (_focusNode.hasFocus) {
+ // ํค๋ณด๋ ์ฌ๋ฆฌ๊ธฐ
+ FocusScope.of(context).requestFocus(_focusNode);
+ }
+ }
+
+ @override
+ void dispose() async {
+ super.dispose();
+ }
+
+ List introText =[];
+ int nextQuestion = 0;
+ int voiceCount = 0;
+
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+ return
+ Container(
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.topRight,
+ end: Alignment.bottomLeft,
+ colors: [
+ Color(0xffE4ECFF),
+ Color(0xffA2BEFF),
+ ],
+ )
+ ),
+
+ child: GestureDetector(
+ onTap: (){
+ print("ํ์ธ: " + nextQuestion.toString());
+ setState(() {
+ });
+ },
+ child: Scaffold(
+ backgroundColor: Colors.transparent,
+ appBar: AppBar(
+ title:
+ Container(
+ width: screenSize.width,
+ height: 46,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 18,),
+ SvgPicture.asset(
+ 'assets/images/logo/pup_logo.svg',
+ height: 25.41,
+ width: 110.19,
+ fit: BoxFit.cover,
+ ),
+ ],
+ ),
+ ),
+
+ backgroundColor: Colors.transparent,
+ elevation: 0.0,
+ automaticallyImplyLeading: false,
+ ),
+ //extendBodyBehindAppBar: true,
+ body:
+ SingleChildScrollView(
+ child: Container(
+ child: Column(
+ children: [
+ SizedBox(height: 60,),
+ Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children:[
+ SizedBox(
+ height: 10,
+ ),
+ Stack(
+ children: [
+ Container(
+ height: 157,
+ width: screenSize.width,
+ child:
+ Stack(
+ children: [
+ Center(child: SvgPicture.asset('assets/images/conversation/intro/intro_bubble.svg',fit: BoxFit.fill,),),
+ Container(
+ padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 12, ),
+ child: Center(
+ child: Column(
+ children: [
+ SizedBox(height: 39,),
+ Text(
+ "๋น์ ์ ๋ง์์ ์์ ์ด ์ฐพ์์ค๋ ๊ทธ๋ ๊น์ง.\n๊ธฐ์ตํ ๊ฐ์ ํจ๊ป.",
+ textAlign: TextAlign.center,
+ style: textStyle.introbubbletext,
+ ),
+ ],
+ )
+ )
+ ),
+ ],
+ )
+ ),
+ // ๋ฌด์ง ์์น
+ Column(
+ children: [
+ SizedBox(height: 188,),
+ Image.asset(
+ 'assets/images/story/bbkcloud.png',
+ width: screenSize.width,
+ fit: BoxFit.fill,
+ ),
+ ],
+ ),
+
+ Padding(
+ padding: EdgeInsets.only(left: 95, top: 245),
+ child: SvgPicture.asset(
+ 'assets/images/story/muji3.svg',
+ height: 215,
+ width: 204,
+ fit: BoxFit.fill,
+ ),
+ ),
+ ],
+ ),
+
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ // // nextQuestion ์ด 3๊ณผ 7์ผ๋ ๋ฑ์ฅ
+ bottomSheet: Padding(
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).viewInsets.bottom * 0.001),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0.0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => IntroPage()));
+ },
+ child: Text("๊ธฐ์ตํ ๊ฐ ์์ํ๊ธฐ", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ],
+ ),
+ )),
+ )
+
+ );
+
+ }
+}
+
diff --git a/client/lib/conversation/late_period/late.dart b/client/lib/conversation/late_period/late.dart
new file mode 100644
index 0000000..dee0ec9
--- /dev/null
+++ b/client/lib/conversation/late_period/late.dart
@@ -0,0 +1,1477 @@
+import 'dart:async';
+import 'dart:convert';
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:client/conversation/late_period/late_watch_others.dart';
+import 'package:client/screen.dart';
+import 'package:http/http.dart' as http;
+import 'package:client/progressbar/animation_progressbar.dart';
+import 'package:client/sign/sign_in.dart';
+import 'package:client/style.dart';
+import 'package:intl/intl.dart';
+import 'package:just_audio/just_audio.dart';
+import 'package:flutter_gif/flutter_gif.dart';
+import 'package:client/home.dart' as home;
+import 'package:client/sign/sign_in.dart' as sign_in;
+import 'package:client/main.dart'as main;
+import 'package:intl/intl.dart';
+
+/// ํ๊ธฐ ๋ํ-๊ธฐ์ต
+
+AudioPlayer player2 = AudioPlayer();
+
+late FlutterGifController controller1, controller2, controller3;
+int voiceCount = 0;
+List voice =[
+ "assets/voice/late/late1.mp3",
+ "assets/voice/late/late2.mp3",
+ "assets/voice/late/late3.mp3",
+ "assets/voice/late/late4.mp3",
+ "assets/voice/late/late5.mp3",
+ "assets/voice/late/late6.mp3",
+ "assets/voice/late/late7.mp3",
+ "assets/voice/late/late8.mp3",
+ "assets/voice/late/late9.mp3",
+ "assets/voice/late/late10.mp3",
+ "assets/voice/late/late11.mp3",
+ "assets/voice/late/late12.mp3",
+ "assets/voice/late/late13.mp3",
+ "assets/voice/late/late14.mp3",
+ "assets/voice/late/late15.mp3",
+ "assets/voice/late/late16.mp3",
+ "assets/voice/late/late17.mp3",
+ "assets/voice/late/late18.mp3",
+ "assets/voice/late/late19.mp3",
+ "assets/voice/late/late20.mp3",
+ "assets/voice/late/late21.mp3",
+ "assets/voice/late/late22.mp3",
+ "assets/voice/late/late23.mp3",
+ "assets/voice/late/late24.mp3",
+ "assets/voice/late/late25.mp3",
+ "assets/voice/late/late26.mp3",
+ "assets/voice/late/late27.mp3",
+ "assets/voice/late/late28.mp3",
+ "assets/voice/late/late29.mp3",
+ "assets/voice/late/late30.mp3",
+ "assets/voice/late/late31.mp3",
+ "assets/voice/late/late32.mp3",
+ "assets/voice/late/late33.mp3",
+ "assets/voice/late/late34.mp3",
+];
+
+List endVoice =[
+ "assets/voice/intro/intro2_8.mp3",
+ "",
+ "assets/voice/intro/intro2_9.mp3",
+];
+
+List lateConversation =[
+ "๋ค, ์ค๋์ ", //0
+ "${home.puppy}์ ๋น์๋ฆฌ์ ๋ํด ์๊ธฐํด ๋ณด์์.", //1
+ "${home.puppy}๊ฐ ๊ณ์ ๋ ๋ ์๊ฐ,", //2
+ "๊ฐ์ ์ ์ธ ๊ณต๋ฐฑ์ \n์ด๋๊ฐ์ ๊น์ด ๋จ์์์ ๊ฑฐ์์.", //3
+ "ํ์ง๋ง ๊ทธ ๊ฐ์ ์ ๋ค๋ฅด๊ฒ ๋ฐ์๋ค์ด๊ณ ,", //4
+ "${home.puppy}์ ํจ๊ปํ\n์๊ฐ๋ค์ ์๊ฐํด๋ณธ๋ค๋ฉด", //5
+ "๊ฐ์ ์ ์ธ ๊ณต๋ฐฑ์ด ์ฑ์์ง ๊ฑฐ์์.", //6
+ "${home.puppy}๊ฐ ์๋ ์ถ์์", //7
+ "${home.user}๋์\n์ด๋ค ๊ฒฝํ์ ํ๋์? ", //8
+ "๋ค, ๊ทธ๋ ๊ตฐ์. ", //9
+ "์์ ๊ฒฝํ๋ค์ ํตํด์\n${home.user}๋์๊ฒ", // 10
+ "์ด๋ค ๋ณํ๊ฐ ์๊ฒผ์๊น์?", //11
+ "${home.user}๋์๊ฒ\n๊ทธ๋ฐ ๋ณํ๊ฐ ์์๊ตฐ์.", //12
+ "๊ทธ๋ ๋ค๋ฉด ๊ทธ๋ฐ ๋ณํ๋ค์ ๋ง์ฃผํ๊ณ ", //13
+ "์ฆ๊ฑฐ์ ๋ ์๊ฐ๋ค์ด ์๋์?", //14
+ "์ผ์ ์์์ ${home.user}๋์ ๊ดด๋กญํ๋", //15
+ "๋ณต์กํ ์๊ฐ๋ค์ ์ ๋ฆฌํ๊ธฐ ์ํด์\n์ด๋ค ํ๋์ ํ๋์ง", //16
+ "๊ณต๊ฐ, ์๊ฐ, ํ๋, ๊ด๊ณ๋ก ๋๋์ด\n์๊ฐํด๋ณด์์.", //17
+ "์ด๋ ๊ณณ์์ ์๊ฐ์ ์ ๋ฆฌํ๋์?", //18
+ "์ฃผ๋ก ์ธ์ ์๊ฐ์ ์ ๋ฆฌํ๋์?", //19
+ "๋ฌด์์ ํ๋ฉฐ ์๊ฐ์ ์ ๋ฆฌํ๋์?", //20
+ "๋๊ตฌ์ ์๊ฐ์ ์ ๋ฆฌํ๋์?", //21
+ "๊ทธ๋ ๊ตฐ์.", //22
+ "ํ๋ ์ํฉ์์ ์ฌ๋๋ค๊ณผ ์ํตํ๊ณ \n๊ต๋ฅํ๋ ๊ฑด ์ค์ํด์.", //23
+ "์ธ์ ๋ ${home.user}๋ ๊ณ์\n์น๊ตฌ์ ๊ฐ์กฑ์ด ์๊ณ ,", //24
+ "๊ทธ๋ถ๋ค์ ${home.user}๋์\n์ง์งํ๊ณ ๊ธฐ๋ค๋ฆฌ๊ณ ์์ด์.", //25
+ "โํจ๊ปํ ๊ฒโ์์\n์๋ก์ ๋ง์ ์ฃผ๊ณ ๋ฐ์ผ๋ฉฐ", //26
+ "ํจ๊ป ๊ฐ์ ์ ๋๋ ๋ณด์์.", // 27
+ "${home.user}๋,\n${home.puppy}์ ํจ๊ปํ ์๊ฐ๋ค์", //28
+ "๋ ์์ด ํน๋ณํ๊ณ ๊ฐ์ง ๊ฒฝํ์ด์ง๋ง,", //29
+ "${home.puppy}๊ฐ\n์๋ ์ถ์์๋", //30
+ "์๋ก์ด ๊ฒฝํ์ ์ฐพ์๋๊ฐ๋ฉฐ\nํ๋ณต์ ๋ง๋ค์ด๊ฐ ์ ์์ด์.", //31
+ "๊ทธ๋ฆฌ๊ณ ์ด ๊ณผ์ ์์\n๋์ฑ ๋ ๋ ์์ ์ ์ดํดํ๊ณ ", //32
+ "๋ฐ์ ์ํฌ ์ ์๋ค๋ ๊ฒ๋\n์๊ฒ ๋์์ผ๋ฉด ์ข๊ฒ ์ด์.", //33
+];
+
+List questionsEnd =[
+ "์, ์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+ "์, ์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+];
+
+class LatePage extends StatefulWidget {
+
+ static Future navigatorPush(BuildContext context) async {
+ return Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (_) => LatePage(),
+ ),
+ );
+ }
+
+ @override
+ _LatePageState createState() => _LatePageState();
+}
+
+class _LatePageState extends State with TickerProviderStateMixin {
+
+ bool end = false; // ๋ํ ๋ง๋ฌด๋ฆฌ ๋จ๊ณ ์ง์
+
+ int nextQuestion = 0;
+ int nextEnd = 0;
+
+ int voiceEndCount = 0;
+
+ bool selectedNextTime = false;
+ bool chooseTime = false;
+ int whatTime = 0;
+
+ bool exp = false;
+ bool change = false;
+ bool joy = false;
+ bool where = false;
+ bool when = false;
+ bool what = false;
+ bool who = false;
+
+ // ํ
์คํธ ์๋ํ
์ปจํธ๋กค๋ฌ๋ฅผ ์์ฑํ์ฌ ํ๋์ ํ ๋น
+ final expController = TextEditingController(); // nextQuestion = 15์ผ๋
+ final changeController = TextEditingController(); // nextQuestion = 19์ผ๋
+ final joyController = TextEditingController(); // nextQuestion = 20์ผ๋
+ final whereController = TextEditingController(); // nextQuestion = 21์ผ๋
+ final whenController = TextEditingController(); // nextQuestion = 12์ผ๋
+ final whatController = TextEditingController(); // nextQuestion = 12์ผ๋
+ final whoController = TextEditingController(); // nextQuestion = 12์ผ๋
+
+ final nextTimeController = TextEditingController(); // nextQuestion = 12์ผ๋
+
+
+ FocusNode _focusNode = FocusNode();
+
+ double containerWidth1 = 35.0;
+ void updateContainerWidth1() {
+ // TextField ๋ด์ฉ์ ๊ธธ์ด์ ๋ฐ๋ผ Container ๊ธธ์ด ์
๋ฐ์ดํธ
+ setState(() {
+ containerWidth1 = 35.0 + (nextTimeController.text.length.toDouble() * 5.0);
+ });
+ }
+ double containerWidth2 = 35.0;
+ void updateContainerWidth2() {
+ // TextField ๋ด์ฉ์ ๊ธธ์ด์ ๋ฐ๋ผ Container ๊ธธ์ด ์
๋ฐ์ดํธ
+ setState(() {
+ containerWidth2 = 35.0 + (nextTimeController.text.length.toDouble() * 5.0);
+ });
+ }
+
+ String sentDate = "";
+ // ๋ํ ๋จ๊ณ ์ ์ฅ
+ void saveCon(String aToken, String con, String nextcon) async {
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/user/conversation-status';
+
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "conversationStatus": con,
+ "nextConversationAt": nextcon,
+ };
+
+ // ํค๋ ์ ๋ณด ์ค์
+ Map headers = {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ };
+
+ // HTTP GET ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.put(
+ Uri.parse(apiUrl),
+ body: json.encode(data),
+ headers: headers, // ํค๋ ์ถ๊ฐ
+ );
+
+ ///var jsonResponse = utf8.decode(response.bodyBytes);
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ print("๋ํ ๋จ๊ณ ๋ฃ๊ธฐ ์ฑ๊ณต");
+ setState(() {
+ });
+
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ..?: ${response.statusCode}');
+ }
+ }
+
+ @override
+ void initState() {
+ super.initState();
+
+ main.play = true;
+ main.player.setAsset(main.musics[3]);
+ main.player.play();
+
+ voiceCount = 0;
+
+ // ์์ ์ ์ฉ
+ for(int i= 0 ; i < voice.length; i++){
+ player2.setAudioSource(AudioSource.uri(
+ Uri.parse(voice[i]))
+ );
+ }
+
+ controller1 = FlutterGifController(vsync: this);
+
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 1500), () {
+ controller1.stop();
+ });
+
+ _callAPI();
+ _focusNode.addListener(_onFocusChange);
+ }
+
+ void _onFocusChange() {
+ if (_focusNode.hasFocus) {
+ // ํค๋ณด๋ ์ฌ๋ฆฌ๊ธฐ
+ FocusScope.of(context).requestFocus(_focusNode);
+ }
+ }
+
+ @override
+ void dispose() async {
+ super.dispose();
+ }
+
+ void _callAPI() async {
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "stage" : "0",
+ "set" : "0",
+ "lineId" : "0"
+ };
+
+ var url = Uri.parse('http://3.38.1.125:8080/conversation/line'); // ์๋ํฌ์ธํธ URL ์ค์
+
+ try {
+ var response = await http.post(
+ url,
+ body: json.encode(data), // ์์ฒญ ๋ณธ๋ฌธ์ ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ์ธ์ฝ๋ฉํ์ฌ ์ ๋ฌ
+ headers: {'Content-Type': 'application/json',}, // ์์ฒญ ํค๋์ Content-Type ์ค์
+ );
+
+ if (response.statusCode == 200) {
+ // ์๋ต ์ฑ๊ณต ์์ ์ฒ๋ฆฌ
+
+ var jsonResponse = utf8.decode(response.bodyBytes); // ์๋ต ๋ณธ๋ฌธ์ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ // JSON ๊ฐ์ ํ์ฉํ ์ํ๋ ๋์ ์ํ
+ //utf8.decode(jsonResponse);
+ print(jsonResponse);
+
+ List contentList = [];
+
+ List parsedResponse = json.decode(jsonResponse);
+
+ print('API ํธ์ถ ์ฑ๊ณต: ${response.statusCode}');
+ } else {
+ // ์์ฒญ ์คํจ ์์ ์ฒ๋ฆฌ
+ print('API ํธ์ถ ์คํจ: ${response.statusCode}');
+ }
+ } catch (e) {
+ // ์์ธ ๋ฐ์ ์์ ์ฒ๋ฆฌ
+ print('API ํธ์ถ ์ค ์์ธ ๋ฐ์: $e');
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+ return
+ Container(
+ color: Color(0xffCEEEE9),
+ child: GestureDetector(
+ onTap: (){
+ print("์ด๊ฑฐ๋ง ์ข ํ์ธ ๋ถํ: " + nextQuestion.toString());
+
+ if(nextQuestion < 8){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 1){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 2){
+ Timer(Duration(milliseconds: 2500), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 3){
+ Timer(Duration(milliseconds: 4500), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 4){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 5){
+ Timer(Duration(milliseconds: 3500), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 6){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 7){
+ Timer(Duration(milliseconds: 2000), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 8){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(nextQuestion == 8){
+ // ${home.user}๋์ ์ด๋ค ๊ฒฝํ์ ํ๋์?
+ }
+ else if(nextQuestion > 8 && nextQuestion<11){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 10){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 11){
+ Timer(Duration(milliseconds: 2500), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(nextQuestion == 11){
+ // ์ด๋ค ๋ณํ๊ฐ ์๊ฒผ๋์
+ }
+ else if(nextQuestion > 11 && nextQuestion<14){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 13){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 14){
+ Timer(Duration(milliseconds: 2500), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(nextQuestion == 14){
+ // ์ด๋ค ๋ณํ๊ฐ ์๊ฒผ๋์
+ }
+ else if(nextQuestion > 14 && nextQuestion<18){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 16){
+ Timer(Duration(milliseconds: 5000), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 17){
+ Timer(Duration(milliseconds: 5000), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 18){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(nextQuestion == 18){
+ // ์ด๋ ๊ณณ์์ ์๊ฐ
+ }
+ else if(nextQuestion == 19){
+ // ์ฃผ๋ก ์ธ์ ์๊ฐ
+ }
+ else if(nextQuestion == 20){
+ // ๋ฌด์์ ํ๋ฉฐ ์๊ฐ
+ }
+ else if(nextQuestion == 21){
+ // ๋๊ตฌ์ ์๊ฐ
+ }
+ else if(nextQuestion > 21 && nextQuestion<27){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 23){
+ Timer(Duration(milliseconds: 5000), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 24){
+ Timer(Duration(milliseconds: 4500), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 25){
+ Timer(Duration(milliseconds: 4500), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 26){
+ Timer(Duration(milliseconds: 3500), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 27){
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(nextQuestion == 27){
+ // ํจ๊ป ๊ฐ์ ์ ๋๋ ๋ณด์์
+ }
+ else if(nextQuestion > 27 && nextQuestion < 33){
+ nextQuestion++;
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ if(nextQuestion == 29){
+ Timer(Duration(milliseconds: 3500), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 30){
+ Timer(Duration(milliseconds: 2500), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 31){
+ Timer(Duration(milliseconds: 4500), () {
+ controller1.stop();
+ });
+ } else if(nextQuestion == 32){
+ Timer(Duration(milliseconds: 4500), () {
+ controller1.stop();
+ });
+ }
+ else if(nextQuestion == 33){
+ Timer(Duration(milliseconds: 4500), () {
+ controller1.stop();
+ });
+ }
+ }
+ else if(nextQuestion == 33 && end == false){
+ // ํจ๊ป ๊ฐ์ ์ ๋๋ ๋ณด์์
+ end = true;
+ // nextEnd++;
+ player2.setAsset(endVoice[voiceEndCount]);
+ voiceEndCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 3500), () {
+ controller1.stop();
+ });
+ }
+ else if(end && nextEnd <1){
+ nextEnd++;
+ voiceEndCount++;
+ print("test");
+ }
+
+ else if(end && nextEnd == 1){
+ // ์๊ฐ ๊ณ ๋ฅด๊ธฐ
+ print("์ค๋ง ์ฌ๊ธฐ>>?");
+ }
+ else if(end && nextEnd == 2){
+ nextEnd++;
+ player2.setAsset(endVoice[voiceEndCount]);
+ voiceEndCount++;
+ player2.play();
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ }
+ else if(end && nextEnd == 3){
+ // ํ๋จ ๋ฒํผ
+ }
+
+
+ setState(() {
+ });
+ },
+ child: Scaffold(
+ backgroundColor: Colors.transparent,
+ appBar: AppBar(
+ //title: Text("๊ธฐ์ตํ ๊ฐ", style: TextStyle(fontSize:16, color: Colors.white ),),
+ //centerTitle: true,
+ leading: IconButton(
+ icon: SvgPicture.asset(
+ 'assets/images/conversation/home_icon.svg',
+ ),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ backgroundColor: Colors.transparent,
+ elevation: 0.0,
+ ),
+ //extendBodyBehindAppBar: true,
+ body:
+ SingleChildScrollView(
+ child: Container(
+ child: Column(
+ children: [
+ SizedBox(height: 3,),
+ Container(
+ width: screenSize.width,
+ height: 25,
+ child: Padding(
+ padding: EdgeInsets.only( left:16, right: 16),
+ child: Center(
+ child: FAProgressBar(
+ currentValue: 80,
+ size: 5,
+ backgroundColor: Colors.white,
+ )
+ ),
+ ),
+ ),
+ Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children:[
+ SizedBox(
+ height: 10,
+ ),
+ Stack(
+ children: [
+ Container(
+ height: 157,
+ width: screenSize.width,
+ child:
+ Stack(
+ children: [
+ Center(child: SvgPicture.asset('assets/images/conversation/bubble.svg',fit: BoxFit.fill,),),
+ Container(
+ padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 12, ),
+ child: Center(
+ child: Column(
+ children: [
+ if(end == false)...[
+ if(lateConversation[nextQuestion].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ lateConversation[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ lateConversation[nextQuestion],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+ ]
+ else if(end)...[
+ if(questionsEnd[nextEnd].toString().contains("\n"))...[
+ SizedBox(height: 28,),
+ Text(
+ questionsEnd[nextEnd],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ]else...[
+ SizedBox(height: 42,),
+ Text(
+ questionsEnd[nextEnd],
+ textAlign: TextAlign.center,
+ style: textStyle.bubbletext,
+ ),
+ ],
+ ]
+ ],
+ )
+ )
+ ),
+ ],
+ )
+ ),
+ // ๋ฌด์ง ์์น
+ if( (nextQuestion<34 && end == false) || (end && nextEnd == 0)||(end && nextEnd > 1))...[
+ Stack(
+ children: [
+ // ์ ์ ์์น
+ Column(
+ children: [
+ SizedBox(height: 420,),
+ Container(
+ child: SvgPicture.asset(
+ 'assets/images/conversation/user7.svg',
+ height: 282,
+ width: screenSize.width,
+ ),
+ ),
+ ],
+ ),
+ Column(
+ children: [
+ SizedBox(height: 144,),
+ Container(
+ width: screenSize.width,
+ height: 375,
+ child:
+ Stack(
+ children: [
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_ear.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base.gif', fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child: Image.asset('assets/images/conversation/gif/muji_base_eye.gif',
+ fit: BoxFit.cover,),),
+ Padding(padding: EdgeInsets.only(bottom: 0, left: 0),
+ child:GifImage(
+ controller: controller1,
+ image: const AssetImage("assets/images/conversation/gif/muji_mouth1.gif"),
+ ),
+ // Image.asset('assets/images/conversation/gif/muji_mouth1.gif', fit: BoxFit.cover,),
+ )
+ ],
+ )
+
+ // SvgPicture.asset(
+ // 'assets/images/conversation/con_muji.svg', fit: BoxFit.cover,
+ // ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ]
+ else if(end && nextEnd == 1)...[
+ Padding(
+ padding: EdgeInsets.only(top:175, left:45),
+ child: Container(
+ width: 275,
+ height: 120,
+ child: Column(
+ children: [
+ Row(
+ children: [
+ SizedBox(width: 75,),
+ Container(width: 25,
+ child: TextField(
+ style: textStyle.inputfield,
+ onTap: (){
+ chooseTime = true;
+ whatTime = int.parse(nextTimeController.text);
+ setState(() {
+ });
+ },
+ onChanged: (text){
+ selectedNextTime = true;
+ whatTime = int.parse(nextTimeController.text);
+ },
+ keyboardType: TextInputType.number,
+ inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]'))],
+ controller: nextTimeController,
+ decoration: InputDecoration(
+ hintText: '๋ช',
+ suffixStyle: TextStyle(color: Color(0xff83A8FF), fontSize: 20,),
+ hintStyle: textStyle.field,
+ //labelText: '๋ช',
+ ),
+ ),),
+ Text("์๊ฐ ํ์ ๋ง๋์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 20, fontWeight: FontWeight.w500, color: Colors.black),),
+ ],),
+ SizedBox(height: 15,),
+ // DateFormat('MM/dd HH:mm').format(DateTime.parse(parsedResponseHR[index]['createdAt']))
+ // DateFormat('MM/dd HH:mm').format(DateTime.now().add(Duration(hours: whatTime)))
+ Text(chooseTime?"${DateFormat('MM์ dd์ผ HH์ mm๋ถ').format(DateTime.now().add(Duration(hours: whatTime)))}":"์ต์ 1์๊ฐ์์ 24์๊ฐ ์ฌ์ด๋ก ์ ํด์ฃผ์ธ์.", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffAAAAAA)),),
+
+ ],),
+ ),
+ ),
+ ]
+
+ ],
+ ),
+
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ // // nextQuestion ์ด 3๊ณผ 7์ผ๋ ๋ฑ์ฅ
+ bottomSheet: Padding(
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).viewInsets.bottom * 0.001),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ if(nextQuestion == 27)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0.0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ nextQuestion++;
+ voiceCount++;
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => LateWatchOthersPage()));
+ setState(() {});
+ },
+ child: Text("ํจ๊ปํ ๊ฐ ํ์ธํ๊ธฐ", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ else if (nextQuestion == 8)...[
+ Container(
+ color: Colors.white,
+ height: 48,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 8.0, top: 8.0, left: 16,right: 16),
+ child: Stack(
+ children: [
+ Container(
+ width: screenSize.width,
+ height: 48,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(color:exp? Color(colorChart.blue):Color(0xffC0D2FC)),
+ borderRadius: BorderRadius.circular(30),
+ ),
+ ),
+ Positioned(
+ left: 15,
+ right: 30,
+ bottom: -4,
+ child: TextField(
+ textAlignVertical: TextAlignVertical.center,
+ maxLines: 1,
+ controller: expController,
+ style: textStyle.bk14normal,
+ decoration: InputDecoration(
+ hintStyle: textStyle.grey14normal,
+ border: InputBorder.none,
+ hintText: '์ด๋ณ ํ ์ด๋ค ๊ฒฝํ์ ํ๋๋ฉด...'),
+ onChanged: (s) {
+ //text = s;
+ exp = true;
+ setState(() {
+
+ });
+ },
+ onTap: () {},
+ ),
+ ),
+ Positioned(
+ left: screenSize.width - 80,
+ //right: 30,
+ bottom: 3,
+ top: 3,
+ child: ElevatedButton(
+ onPressed: () {
+ if(exp){
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 20,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ Timer(Duration(milliseconds: 1500), () {
+ controller1.stop();
+ });
+ nextQuestion++;
+ setState(() {
+ });
+ }
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: exp? Color(colorChart.blue):Color(0xffDDE7FD),
+ fixedSize: const Size(23, 23),
+ shape: const CircleBorder(),
+ ),
+ child: Icon(
+ Icons.arrow_upward,
+ color: Colors.white,
+ size: 16,
+ )),
+ ),
+ ],
+ ),
+ ),
+ )
+
+ ]
+ else if (nextQuestion == 11)...[
+ Container(
+ color: Colors.white,
+ height: 48,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 8.0, top: 8.0, left: 16,right: 16),
+ child: Stack(
+ children: [
+ Container(
+ width: screenSize.width,
+ height: 48,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(color:change? Color(colorChart.blue):Color(0xffC0D2FC)),
+ borderRadius: BorderRadius.circular(30),
+ ),
+ ),
+ Positioned(
+ left: 15,
+ right: 30,
+ bottom:-4,
+ child: TextField(
+ textAlignVertical: TextAlignVertical.center,
+ maxLines: 1,
+ controller: changeController,
+ style: textStyle.bk14normal,
+ decoration: InputDecoration(
+ hintStyle: textStyle.grey14normal,
+ border: InputBorder.none,
+ hintText: '์ด ๊ฒฝํ์ ํตํด ์ด๋ค ๋ณํ๊ฐ ์๊ฒผ๋๋ฉด...'),
+ onChanged: (s) {
+ //text = s;
+ change = true;
+ setState(() {
+
+ });
+ },
+ onTap: () {},
+ ),
+ ),
+ Positioned(
+ left: screenSize.width - 81,
+ //right: 30,
+ bottom: 3,
+ top: 3,
+ child: ElevatedButton(
+ onPressed: () {
+ if(change){
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 20,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ nextQuestion++;
+ setState(() {
+ });
+ }
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: change?Color(colorChart.blue):Color(0xffDDE7FD),
+ fixedSize: const Size(23, 23),
+ shape: const CircleBorder(),
+ ),
+ child: Icon(
+ Icons.arrow_upward,
+ color: Colors.white,
+ size: 16,
+ )),
+ ),
+ ],
+ ),
+ ),
+ )
+
+ ]
+ else if (nextQuestion == 14)...[
+ Container(
+ color: Colors.white,
+ height: 48,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 8.0, top: 8.0, left: 16,right: 16),
+ child: Stack(
+ children: [
+ Container(
+ width: screenSize.width,
+ height: 48,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(color: joy? Color(colorChart.blue):Color(0xffC0D2FC)),
+ borderRadius: BorderRadius.circular(30),
+ ),
+ ),
+ Positioned(
+ left: 15,
+ right: 30,
+ bottom: -4,
+ child: TextField(
+ textAlignVertical: TextAlignVertical.center,
+ maxLines: 1,
+ controller: joyController,
+ style: textStyle.bk14normal,
+ decoration: InputDecoration(
+ hintStyle: textStyle.grey14normal,
+ border: InputBorder.none,
+ hintText: '๋ณํ๋ฅผ ๋ง์ฃผํ๊ณ ์ฆ๊ฑฐ์ด ์๊ฐ์ด๋ผ๋ฉด...'),
+ onChanged: (s) {
+ //text = s;
+ joy = true;
+ setState(() {
+
+ });
+ },
+ onTap: () {},
+ ),
+ ),
+ Positioned(
+ left: screenSize.width - 81,
+ //right: 30,
+ bottom: 3,
+ top: 3,
+ child: ElevatedButton(
+ onPressed: () {
+ if(joy){
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 20,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ nextQuestion++;
+ setState(() {
+ });
+ }
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: joy?Color(colorChart.blue):Color(0xffDDE7FD),
+ fixedSize: const Size(23, 23),
+ shape: const CircleBorder(),
+ ),
+ child: Icon(
+ Icons.arrow_upward,
+ color: Colors.white,
+ size: 16,
+ )),
+ ),
+ ],
+ ),
+ ),
+ )
+
+ ]
+ else if (nextQuestion == 18)...[
+ Container(
+ color: Colors.white,
+ height: 48,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 8.0, top: 8.0, left: 16,right: 16),
+ child: Stack(
+ children: [
+ Container(
+ width: screenSize.width,
+ height: 48,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(color: where? Color(colorChart.blue):Color(0xffC0D2FC)),
+ borderRadius: BorderRadius.circular(30),
+ ),
+ ),
+ Positioned(
+ left: 14,
+ right: 30,
+ bottom: -4,
+ child: TextField(
+ textAlignVertical: TextAlignVertical.center,
+ maxLines: 1,
+ controller: whereController,
+ style: textStyle.bk14normal,
+ decoration: InputDecoration(
+ hintStyle: textStyle.grey14normal,
+ border: InputBorder.none,
+ hintText: '์ด๋์์ ์๊ฐ์ ์ ๋ฆฌํ๋๋ฉด...'),
+ onChanged: (s) {
+ //text = s;
+ where = true;
+ setState(() {
+
+ });
+ },
+ onTap: () {},
+ ),
+ ),
+ Positioned(
+ left: screenSize.width - 81,
+ //right: 30,
+ bottom: 3,
+ top: 3,
+ child: ElevatedButton(
+ onPressed: () {
+ if(where){
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 20,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ nextQuestion++;
+ setState(() {
+ });
+ }
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: where?Color(colorChart.blue):Color(0xffDDE7FD),
+ fixedSize: const Size(23, 23),
+ shape: const CircleBorder(),
+ ),
+ child: Icon(
+ Icons.arrow_upward,
+ color: Colors.white,
+ size: 16,
+ )),
+ ),
+ ],
+ ),
+ ),
+ )
+
+ ]
+ else if (nextQuestion == 19)...[
+ Container(
+ color: Colors.white,
+ height: 48,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 8.0, top: 8.0, left: 16,right: 16),
+ child: Stack(
+ children: [
+ Container(
+ width: screenSize.width,
+ height: 48,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(color: when? Color(colorChart.blue):Color(0xffC0D2FC)),
+ borderRadius: BorderRadius.circular(30),
+ ),
+ ),
+ Positioned(
+ left: 15,
+ right: 30,
+ bottom: -4,
+ child: TextField(
+ textAlignVertical: TextAlignVertical.center,
+ maxLines: 1,
+ controller: whenController,
+ style: textStyle.bk14normal,
+ decoration: InputDecoration(
+ hintStyle: textStyle.grey14normal,
+ border: InputBorder.none,
+ hintText: '์ธ์ ์๊ฐ์ ์ ๋ฆฌํ๋๋ฉด...'),
+ onChanged: (s) {
+ //text = s;
+ when = true;
+ setState(() {
+
+ });
+ },
+ onTap: () {},
+ ),
+ ),
+ Positioned(
+ left: screenSize.width - 81,
+ //right: 30,
+ bottom: 3,
+ top: 3,
+ child: ElevatedButton(
+ onPressed: () {
+ if(when){
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 20,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ nextQuestion++;
+ setState(() {
+ });
+ }
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: when? Color(colorChart.blue):Color(0xffDDE7FD),
+ fixedSize: const Size(23, 23),
+ shape: const CircleBorder(),
+ ),
+ child: Icon(
+ Icons.arrow_upward,
+ color: Colors.white,
+ size: 16,
+ )),
+ ),
+ ],
+ ),
+ ),
+ )
+
+ ]
+ else if (nextQuestion == 20)...[
+ Container(
+ color: Colors.white,
+ height: 48,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 8.0, top: 8.0, left: 16,right: 16),
+ child: Stack(
+ children: [
+ Container(
+ width: screenSize.width,
+ height: 48,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(color: what? Color(colorChart.blue):Color(0xffC0D2FC)),
+ borderRadius: BorderRadius.circular(30),
+ ),
+ ),
+ Positioned(
+ left: 15,
+ right: 30,
+ bottom: -4,
+ child: TextField(
+ textAlignVertical: TextAlignVertical.center,
+ maxLines: 1,
+ controller: whatController,
+ style: textStyle.bk14normal,
+ decoration: InputDecoration(
+ hintStyle: textStyle.grey14normal,
+ border: InputBorder.none,
+ hintText: '๋ญ ํ๋ฉด์ ์๊ฐ์ ์ ๋ฆฌํ๋๋ฉด...'),
+ onChanged: (s) {
+ //text = s;
+ what = true;
+ setState(() {
+
+ });
+ },
+ onTap: () {},
+ ),
+ ),
+ Positioned(
+ left: screenSize.width - 81,
+ //right: 30,
+ bottom: 3,
+ top: 3,
+ child: ElevatedButton(
+ onPressed: () {
+ if(what){
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 20,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ Timer(Duration(milliseconds: 3000), () {
+ controller1.stop();
+ });
+ nextQuestion++;
+ setState(() {
+ });
+ }
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: what?Color(colorChart.blue):Color(0xffC0D2FC),
+ fixedSize: const Size(23, 23),
+ shape: const CircleBorder(),
+ ),
+ child: Icon(
+ Icons.arrow_upward,
+ color: Colors.white,
+ size: 16,
+ )),
+ ),
+ ],
+ ),
+ ),
+ )
+
+ ]
+ else if (nextQuestion == 21)...[
+ Container(
+ color: Colors.white,
+ height: 48,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 8.0, top: 8.0, left: 16,right: 16),
+ child: Stack(
+ children: [
+ Container(
+ width: screenSize.width,
+ height: 48,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(color: Color(colorChart.blue)),
+ borderRadius: BorderRadius.circular(30),
+ ),
+ ),
+ Positioned(
+ left: 15,
+ right: 30,
+ bottom:-4,
+ child: TextField(
+ textAlignVertical: TextAlignVertical.center,
+ maxLines: 1,
+ controller: whoController,
+ style: textStyle.bk14normal,
+ decoration: InputDecoration(
+ hintStyle: textStyle.grey14normal,
+ border: InputBorder.none,
+ hintText: '๋๊ตฌ์ ์๊ฐ์ ์ ๋ฆฌํ๋๋ฉด...'),
+ onChanged: (s) {
+ //text = s;
+ who = true;
+ setState(() {
+
+ });
+ },
+ onTap: () {},
+ ),
+ ),
+ Positioned(
+ left: screenSize.width - 81,
+ //right: 30,
+ bottom: 3,
+ top: 3,
+ child: ElevatedButton(
+ onPressed: () {
+ if(who){
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ controller1.repeat(
+ min: 0,
+ max: 20,
+ period: const Duration(milliseconds: 1000)
+ );
+
+ Timer(Duration(milliseconds: 1500), () {
+ controller1.stop();
+ });
+ nextQuestion++;
+ setState(() {
+ });
+ }
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: who?Color(colorChart.blue):Color(0xffDDE7FD),
+ fixedSize: const Size(23, 23),
+ shape: const CircleBorder(),
+ ),
+ child: Icon(
+ Icons.arrow_upward,
+ color: Colors.white,
+ size: 16,
+ )),
+ ),
+ ],
+ ),
+ ),
+ )
+
+ ]
+
+ else if(nextEnd == 1 && selectedNextTime)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0.0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ questionsEnd.insertAll(2, [
+ "๋ค, ${home.user}๋.\n${whatTime}์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+ "๋ค, ${home.user}๋.\n${whatTime}์๊ฐ ํ์ ๋ค์ ๋ง๋์!",
+ ]);
+ //decidedType = false;
+ nextEnd++;
+ player2.setAsset(endVoice[voiceEndCount]);
+ voiceEndCount++;
+ player2.play();
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 3500), () {
+ controller1.stop();
+ });
+ setState(() {});
+ },
+ child: Text("๋ค์", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ else if(nextEnd == 3)...[
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0.0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ //decidedType = false;
+ //checkSignUp = false;
+ //checkSignIn = true;
+ //checkSignUp = false;
+ var now = DateTime.now();
+ sentDate = DateFormat('yyyy-MM-dd hh:mm:ss').format(now.toLocal());
+ saveCon(sign_in.userAccessToken, "3", sentDate);
+ setState(() {});
+ main.player.stop();
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => MyScreenPage(title: '์คํฌ๋ฆฐ ํ์ด์ง',)));
+ },
+ child: Text("์๋ฃ", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ]
+ ],
+ ),
+ )
+ ),
+ )
+
+ );
+
+ }
+}
\ No newline at end of file
diff --git a/client/lib/conversation/late_period/late_memorial_search.dart b/client/lib/conversation/late_period/late_memorial_search.dart
new file mode 100644
index 0000000..ca7137c
--- /dev/null
+++ b/client/lib/conversation/late_period/late_memorial_search.dart
@@ -0,0 +1,312 @@
+import 'dart:convert';
+import 'package:flutter_svg/svg.dart';
+import 'package:get/get.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:client/style.dart';
+import 'package:http/http.dart' as http;
+import 'package:client/sign/sign_in.dart' as sign_in;
+import 'late_memorial_search_result.dart';
+
+String searchKeyword = "";
+
+class LateMemorialSearchPage extends StatefulWidget {
+ @override
+ State createState() => _LateMemorialSearchPageState();
+}
+
+class _LateMemorialSearchPageState extends State {
+
+ // ํ
์คํธ์๋ํ
์ปจํธ๋กค๋ฌ๋ฅผ ์์ฑํ์ฌ ํ๋์ ํ ๋น
+ final myController = TextEditingController();
+
+ // ์ต๊ทผ ๊ฒ์์ด ์กฐํ(GET)
+ late List parsedResponseRS; // ์ต๊ทผ ๊ฒ์์ด
+ bool recentKeyword = false;
+
+ void fetchDataRecentSearch(String aToken) async {
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/search/history';
+
+ // ํค๋ ์ ๋ณด ์ค์
+ Map headers = {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ };
+
+ // HTTP GET ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.get(
+ Uri.parse(apiUrl),
+ headers: headers, // ํค๋ ์ถ๊ฐ
+ );
+
+ ///var jsonResponse = utf8.decode(response.bodyBytes);
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ var data = json.decode(response.body);
+ var jsonResponse = utf8.decode(response.bodyBytes);
+
+ parsedResponseRS = json.decode(jsonResponse);
+
+ // ๋ฐ์ดํฐ ์ฒ๋ฆฌ
+ print('์๋ฒ๋ก๋ถํฐ ๋ฐ์ ๋ฐ์ดํฐS: $jsonResponse');
+
+ recentKeyword = true;
+ setState(() {
+ });
+
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ: ${response.statusCode}');
+ }
+ }
+
+ // ์ถ์ฒ ๊ฒ์์ด ์กฐํ(GET)
+ late List parsedResponseSR; // ์ต๊ทผ ๊ฒ์์ด
+ bool rankKeyword = false;
+ void fetchDataSearchRank() async {
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/search/rank';
+
+ // HTTP GET ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.get(
+ Uri.parse(apiUrl),
+ );
+
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ var data = json.decode(response.body);
+ var jsonResponse = utf8.decode(response.bodyBytes);
+
+ parsedResponseSR = json.decode(jsonResponse);
+
+ // ๋ฐ์ดํฐ ์ฒ๋ฆฌ
+ print('์๋ฒ๋ก๋ถํฐ ๋ฐ์ ๋ฐ์ดํฐ: $jsonResponse');
+
+ rankKeyword = true;
+ setState(() {
+ });
+
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ: ${response.statusCode}');
+ }
+ }
+
+ // ์ต๊ทผ ๊ฒ์์ด ์ญ์
+ void deleteDataSearch(String aToken, String search) async {
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/search/history?keyword=${search}';
+
+ // ํค๋ ์ ๋ณด ์ค์
+ Map headers = {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ };
+
+ // HTTP GET ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.delete(
+ Uri.parse(apiUrl),
+ headers: headers, // ํค๋ ์ถ๊ฐ
+ );
+
+ ///var jsonResponse = utf8.decode(response.bodyBytes);
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ print("์ญ์ ์ฑ๊ณต");
+ setState(() {
+ });
+
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ: ${response.statusCode}');
+ }
+ }
+
+
+
+ @override
+ void initState() {
+ super.initState();
+ SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top]);
+ fetchDataRecentSearch(sign_in.userAccessToken);
+ fetchDataSearchRank();
+ }
+
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ leading: IconButton(
+ icon: Icon(Icons.arrow_back_ios_rounded, color: Colors.black),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ title: Center(
+ child: Padding(padding: EdgeInsets.only(right: 60),
+ child: Text('ํจ๊ปํ ๊ฐ', style: textStyle.bk20normal,),
+ )
+ ),
+ backgroundColor: Color(0xffF3F3F3),
+ elevation: 0.0,
+ iconTheme: IconThemeData(color: Colors.black),
+ ),
+ body: Container(
+ color: Color(0xffF3F3F3),
+ padding: EdgeInsets.only(left: 15, right: 15 ),
+ width: Get.width,
+ height: Get.height,
+ child: SingleChildScrollView(
+ padding: EdgeInsets.fromLTRB(0, 0, 0, 0),
+ scrollDirection: Axis.vertical,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 8,),
+ Padding(
+ padding: const EdgeInsets.all(0.0),
+ child: Stack(
+ children: [
+ Container(
+ width: Get.width- 25,
+ height: 32,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(color: Color(0xff99A8CB),),
+ borderRadius: BorderRadius.circular(8),
+ ),
+ ),
+ Positioned(
+ left: 34,
+ right: 80,
+ bottom: 0,
+ top: 15,
+ child: TextField(
+ controller: myController,
+ decoration: InputDecoration(
+ border: InputBorder.none,
+ hintText: '๊ฒ์',
+ hintStyle: textStyle.grey16normal),
+ onChanged: (s) {
+ //text = s;
+ },
+ onTap: (){
+
+ },
+ ),
+ ),
+ Positioned(
+ right: Get.width - 75,
+ //right: 30,
+ bottom: 7,
+ top: -3,
+ child: IconButton(
+ onPressed: (){
+ searchKeyword = myController.text;
+ setState(() {
+ });
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => MemorialSearchResultPage()));
+ },
+ icon: Icon(Icons.search, color: Color(0xff99A8CB),),
+ )
+ ),
+ ],
+ ),
+ ),
+ SizedBox(height: 8,),
+ Row(
+ children: [
+ Text('์ต๊ทผ ๊ฒ์์ด', style: TextStyle(color: Color(0xff4B5396), fontSize: 14, fontFamily: 'Pretendard',fontWeight: FontWeight.w500,),),
+ SizedBox(width: 226, ),
+ TextButton(
+ onPressed: (){},
+ child: Text('์ ์ฒด ์ญ์ ', style: TextStyle(color: Color(0xff4B5396), fontSize: 12, fontFamily: 'Pretendard',fontWeight: FontWeight.w500,),),
+ )
+ ],
+ ),
+ Container(
+ width: Get.width,
+ height: 350,
+ child:Column(
+ children: [
+ if(recentKeyword)...[
+ for(int i=0; i MemorialSearchResultPage()));
+ },
+ child: Text('${parsedResponseSR[index]['keyword']}', style: TextStyle(color: Color(0xff333333),fontSize: 14, fontFamily: 'Pretendard',
+ fontWeight: FontWeight.w300,),),
+ );
+
+ })
+ ),
+ ],
+
+
+ ],
+ ),
+
+ ),
+ ),
+
+ );
+ }
+}
\ No newline at end of file
diff --git a/client/lib/conversation/late_period/late_memorial_search_result.dart b/client/lib/conversation/late_period/late_memorial_search_result.dart
new file mode 100644
index 0000000..df44169
--- /dev/null
+++ b/client/lib/conversation/late_period/late_memorial_search_result.dart
@@ -0,0 +1,315 @@
+import 'dart:convert';
+import 'package:get/get.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'late_watch_others_detail.dart';
+import 'package:client/style.dart';
+import 'package:http/http.dart' as http;
+import 'late_memorial_search.dart'as search;
+import 'package:flutter_svg/flutter_svg.dart';
+import 'late_memorial_search.dart';
+import 'package:client/sign/sign_in.dart' as sign_in;
+
+String selectedOthersImage = "";
+
+class MemorialSearchResultPage extends StatefulWidget {
+ @override
+ State createState() => _MemorialSearchResultPageState();
+}
+
+class _MemorialSearchResultPageState extends State {
+
+ // ํ
์คํธ์๋ํ
์ปจํธ๋กค๋ฌ๋ฅผ ์์ฑํ์ฌ ํ๋์ ํ ๋น
+ final myController = TextEditingController();
+
+ // ๊ฒ์์ด ์กฐํ(GET)
+ late List parsedResponseSR; // ๊ฒ์ ๊ฒฐ๊ณผ
+ bool result = false;
+
+ void fetchDataSearchResult(String aToken) async {
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/search?keyword=${search.searchKeyword}';
+
+ // ํค๋ ์ ๋ณด ์ค์
+ Map headers = {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ };
+
+ // HTTP GET ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.get(
+ Uri.parse(apiUrl),
+ headers: headers, // ํค๋ ์ถ๊ฐ
+ );
+
+ ///var jsonResponse = utf8.decode(response.bodyBytes);
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ var data = json.decode(response.body);
+ var jsonResponse = utf8.decode(response.bodyBytes);
+
+ parsedResponseSR = json.decode(jsonResponse);
+
+ // ๋ฐ์ดํฐ ์ฒ๋ฆฌ
+ print('์๋ฒ๋ก๋ถํฐ ๋ฐ์ ๋ฐ์ดํฐS: $jsonResponse');
+
+ result = true;
+ setState(() {
+ });
+
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ: ${response.statusCode}');
+ }
+ }
+
+
+ @override
+ void initState() {
+ super.initState();
+ SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top]);
+ fetchDataSearchResult(sign_in.userAccessToken);
+ }
+
+
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+ return Scaffold(
+ appBar: PreferredSize(
+ preferredSize: Size.fromHeight(72),
+ child: AppBar(
+ actions: [
+ Padding(
+ padding: EdgeInsets.only(top: 15),
+ child: IconButton(
+ icon: Icon(Icons.search),
+ onPressed: () {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) =>
+ LateMemorialSearchPage())); // ๊ฒ์ํ์ด์ง๋ก ์ด๋
+ },
+ ),
+ ),
+ ],
+ leading:
+ Padding(
+ padding: EdgeInsets.only(top: 20),
+ child: IconButton(
+ icon: Icon(Icons.arrow_back_ios_rounded, color: Colors.black),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ ),
+ title: Container(
+ height: 50,
+ width: screenSize.width,
+ child: Column(
+ children: [
+ SizedBox(height: 24,),
+ Center(
+ child: Padding(
+ padding: EdgeInsets.only(right: 0),
+ child: Text(
+ 'ํจ๊ปํ ๊ฐ',
+ style: textStyle.bk20bold,
+ ),
+ )),
+ ],
+ )),
+ backgroundColor: Colors.transparent,
+ elevation: 0.0,
+ iconTheme: IconThemeData(color: Colors.black),
+ ),
+ ),
+ body: Container(
+ color: Color(0xffDDE7FD),
+ //padding: EdgeInsets.only(left: 16, right: 16 ),
+ width: Get.width,
+ height: Get.height,
+ child: SingleChildScrollView(
+ padding: EdgeInsets.fromLTRB(0, 0, 0, 0),
+ scrollDirection: Axis.vertical,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+
+ ClipRRect(
+ borderRadius: BorderRadius.only(topLeft: Radius.circular(16.0), topRight: Radius.circular(16.0)),
+ child: Container(
+ padding: EdgeInsets.all(16),
+ width: Get.width,
+ color: Color(0xffF1F5FE),
+ child: Column(children: [
+ SizedBox(height: 8,),
+ Row(children: [
+ Text('"${search.searchKeyword}" ', style: textStyle.bk16semibold),
+ Text('${parsedResponseSR.length}๊ฑด์ ๊ฒฐ๊ณผ ', style: textStyle.bk16normal),
+ ],),
+ SizedBox(height: 20,),
+
+ if(parsedResponseSR.length == 0)...[
+ Column(
+ children: [
+ SizedBox(height: 200,),
+ SvgPicture.asset(
+ 'assets/images/no_result.svg',
+ height: 124,
+ ),
+ SizedBox(height: 16,),
+ Text("์ผ์นํ๋ ๋ด์ฉ์ด ์์ต๋๋ค.", style: textStyle.bk16normal,)
+ ],
+ ),
+ ],
+
+
+ if(result && parsedResponseSR != "[]")...[
+ Container(
+ width: Get.width,
+ height: 760,
+ color: Color(0xffF1F5FE),
+ child: GridView.builder(
+ itemCount:parsedResponseSR.length,
+ gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+ crossAxisCount: 2, //1 ๊ฐ์ ํ์ ๋ณด์ฌ์ค item ๊ฐ์
+ childAspectRatio: 1.56 / 2.04, //item ์ ๊ฐ๋ก 1, ์ธ๋ก 2 ์ ๋น์จ
+ mainAxisSpacing: 16, //์ํ Padding
+ crossAxisSpacing: 16, //์์ง Padding
+ ),
+ itemBuilder: (BuildContext context, int index){
+ return
+ InkWell(
+ onTap: (){
+ selectedOthersImage = parsedResponseSR[index]['image'];
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => LateWatchOthersMemorialDetailPage()));
+ },
+ child: Container(
+ // width: 200,
+ // height: 200,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(16),
+ ),
+ child:Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ // SizedBox(height: 5,),
+ // SizedBox(height: 2,),
+ Container(
+ height: 166,
+ width: 204,
+ child:
+ Stack(
+ children: [
+ Container(
+ height: 204,
+ width: 204,
+ child:
+ ClipRRect(
+ borderRadius: BorderRadius.only(topLeft: Radius.circular(16.0), topRight: Radius.circular(16.0)),
+ child: Image.network(parsedResponseSR[index]['image'], fit: BoxFit.cover,),
+ )
+
+
+ ),
+ InkWell(
+ onTap: (){
+
+ },
+ child: Padding(
+ padding: EdgeInsets.only(left: 10, top: 10),
+ child: Container(
+ decoration: BoxDecoration(
+ color: Colors.black.withOpacity(0.2),
+ borderRadius: BorderRadius.circular(32),
+ ),
+ // color: Colors.white.withOpacity(0.7),
+ width: 81,
+ height: 32,
+ child: Row(
+ children: [
+ SizedBox(width: 10,),
+ CircleAvatar(
+ backgroundColor: Colors.white,
+ radius: 10,
+ child: CircleAvatar(
+ radius: 9,
+ backgroundImage: NetworkImage(parsedResponseSR[index]['profileImage']),
+ ),
+ ),
+
+ // CircleAvatar(
+ // minRadius: 10,
+ // maxRadius: 15,
+ // backgroundImage:
+ // NetworkImage(parsedResponseSR[index]['profileImage'],
+ // ),
+ // ),
+ SizedBox(width: 5,),
+ Text(parsedResponseSR[index]['nickname'], style: TextStyle(color: Colors.white, fontSize: 14, fontFamily: 'Pretendard',fontWeight: FontWeight.w600,),),
+ Container(
+ width: 20,
+ child:
+ Icon(Icons.arrow_forward_ios_rounded, color: Colors.white,size: 12,)
+ //Image.asset('assets/images/memorial/look_others_arrow.png'),
+ )
+ ],
+ ),
+ ),
+ ),
+ )
+ ],),
+
+ ),
+ SizedBox(height: 8,),
+ Container(
+ height: 16,
+ width: 155,
+ child: Row(
+ children: [
+ SizedBox(width: 10,),
+ Container(
+ width: 145,
+ height: 65,
+ child: Text(parsedResponseSR[index]['title'],style: TextStyle(color: Color(0xff333333), fontSize: 13.5, fontFamily: 'Pretendard',fontWeight: FontWeight.w400,), ),
+ ),
+ //Text(parsedResponseSR[index]['title'],style: TextStyle(color: Color(0xff333333), fontSize: 14.5, fontFamily: 'Pretendard',fontWeight: FontWeight.w400,),)
+ ],
+ ),
+ ),
+ // Column(
+ // crossAxisAlignment: CrossAxisAlignment.start,
+ // children: [
+ //
+ // ],
+ // )
+
+ ],
+ )
+
+ ),
+ );
+
+ })
+ ),
+ ]
+ ],
+ ),),),
+
+
+
+ ],
+ ),
+
+ ),
+ ),
+
+ );
+ }
+}
\ No newline at end of file
diff --git a/client/lib/conversation/late_period/late_watch_others.dart b/client/lib/conversation/late_period/late_watch_others.dart
new file mode 100644
index 0000000..86736a6
--- /dev/null
+++ b/client/lib/conversation/late_period/late_watch_others.dart
@@ -0,0 +1,697 @@
+import 'dart:async';
+import 'dart:convert';
+import 'package:flutter_svg/svg.dart';
+import 'package:get/get.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'late_memorial_search.dart';
+import 'late_watch_others_detail.dart';
+import 'package:client/style.dart';
+import 'package:http/http.dart' as http;
+import '../../memorial/others_memorial_main.dart';
+import 'package:client/sign/sign_in.dart' as sign_in;
+import 'late.dart' as late_;
+
+String selectedOthersImage = "";
+String selectedOthersProfileImage = "";
+String selectedOthersNickaname = "";
+String selectedUser = "";
+int selectedPostId = 0;
+
+class LateWatchOthersPage extends StatefulWidget {
+ @override
+ State createState() => _LateWatchOthersPageState();
+}
+
+class _LateWatchOthersPageState extends State {
+
+ late List parsedResponseCM; // ์ค์๊ฐ ํผ๋
+ late List parsedResponseFC; // ์ค์๊ฐ ํผ๋_ํํฐ์ ์ฉ
+
+ bool checkUser = false;
+ bool isLastest = false;
+
+ String dogType = ""; // ๊ฐ์์ง ํ์
+ String dogAge = ""; // ๊ฐ์์ง ๋์ด
+
+ // ํํฐ๋ง ์ ํ ๋์ด or ๊ฒฌ์ข
+ bool selectType = false;
+ bool selectAge = false;
+
+ List parsedResponseIMGS = []; // ์ด๋ฏธ์ง ๊ฐ์
+
+ // ๋ด์ฉ ์ต์ ํผ๋ ๋ถ๋ฌ์ค๊ธฐ(GET)
+ void fetchWithHeaders(String aToken) async {
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/memorial/feed?filter=false'; // ์ค์ API ์๋ํฌ์ธํธ๋ก ๋ณ๊ฒฝํ์ธ์
+
+ // ํค๋ ์ ๋ณด ์ค์
+ Map headers = {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ };
+
+ // HTTP GET ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.get(
+ Uri.parse(apiUrl),
+ headers: headers, // ํค๋ ์ถ๊ฐ
+ );
+
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ ์ฒ๋ฆฌ
+ print('์๋ฒ๋ก๋ถํฐ ๋ฐ์ ๋ด์ฉ ๋ฐ์ดํฐ: ${response.body}');
+ var jsonResponse = utf8.decode(response.bodyBytes);
+
+ parsedResponseCM = json.decode(jsonResponse);
+
+
+ isLastest = true;
+ setState(() {});
+
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ: ${response.statusCode}');
+ }
+ }
+
+ void sendPostRequest(String aToken) async {
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/memorial/feed?filter=false'; // ์ค์ API ์๋ํฌ์ธํธ๋ก ๋ณ๊ฒฝํ์ธ์
+
+ // POST ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.post(
+ Uri.parse(apiUrl),
+ headers: {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ //'Content-Type': 'application/json',
+ }, // ์์ฒญ ํค๋์ Content-Type ์ค์
+ );
+
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ ์ฒ๋ฆฌ
+ print('์๋ฒ๋ก๋ถํฐ ๋ฐ์ ๋ด์ฉ ๋ฐ์ดํฐ: ${response.body}');
+ var jsonResponse = utf8.decode(response.bodyBytes);
+
+ parsedResponseCM = json.decode(jsonResponse);
+
+ print("๊ฐฏ์:" + parsedResponseCM.length.toString());
+
+ isLastest = true;
+ setState(() {});
+ // print('์๋ฒ๋ก๋ถํฐ ๋ฐ์ ๋ฐ์ดํฐ: ${response.body}');
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ: ${response.statusCode}');
+ }
+ }
+
+ late Map parsedResponseUser; // ์ฌ์ฉ์ ์ ๋ณด
+
+ // ํํฐ๋ง ์ ์ฉ์ ์ํ ์ฌ์ฉ์ ์ ๋ณด ๊ฐ์ ธ์ค๊ธฐ
+ void fetchUserInfo(String aToken) async {
+ // API ์๋ํฌ์ธํธ URL
+ print("๋ฐํ :" + aToken);
+ String apiUrl = 'http://3.38.1.125:8080/user/info'; // ์ค์ API ์๋ํฌ์ธํธ๋ก ๋ณ๊ฒฝํ์ธ์
+
+ // ํค๋ ์ ๋ณด ์ค์
+ Map headers = {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ };
+
+ // HTTP GET ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.get(
+ Uri.parse(apiUrl),
+ headers: headers, // ํค๋ ์ถ๊ฐ
+ );
+
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ ์ฒ๋ฆฌ
+ print('์๋ฒ๋ก๋ถํฐ ๋ฐ์ ๋ด์ฉ ๋ฐ์ดํฐ(์ฌ์ฉ์ ์ ๋ณด): ${response.body}');
+ var jsonResponse = utf8.decode(response.bodyBytes);
+
+ parsedResponseUser = json.decode(jsonResponse);
+
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ: ${response.statusCode}');
+ }
+ }
+
+ void sendPostRequestFilter(String aToken, String type) async {
+
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "type" : type,
+ };
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/memorial/feed?filter=true';
+
+ // POST ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.post(
+ Uri.parse(apiUrl),
+ body: json.encode(data), // ์์ฒญ ๋ณธ๋ฌธ์ ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ์ธ์ฝ๋ฉํ์ฌ ์ ๋ฌ
+ headers: {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ //'Content-Type': 'application/json',
+ }, // ์์ฒญ ํค๋์ Content-Type ์ค์
+ );
+
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ ์ฒ๋ฆฌ
+ print('์๋ฒ๋ก๋ถํฐ ๋ฐ์ ๋ด์ฉ ๋ฐ์ดํฐ: ${response.body}');
+ var jsonResponse = utf8.decode(response.bodyBytes);
+
+ parsedResponseCM = json.decode(jsonResponse);
+
+ // isLastest = true;
+ setState(() {});
+ // print('์๋ฒ๋ก๋ถํฐ ๋ฐ์ ๋ฐ์ดํฐ: ${response.body}');
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ: ${response.statusCode}');
+ }
+ }
+
+ void sendPostRequestFilter2(String aToken ,String age) async {
+
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "age" : age,
+ };
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/memorial/feed?filter=true';
+
+ // POST ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.post(
+ Uri.parse(apiUrl),
+ body: json.encode(data), // ์์ฒญ ๋ณธ๋ฌธ์ ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ์ธ์ฝ๋ฉํ์ฌ ์ ๋ฌ
+ headers: {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ //'Content-Type': 'application/json',
+ }, // ์์ฒญ ํค๋์ Content-Type ์ค์
+ );
+
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ ์ฒ๋ฆฌ
+ print('์๋ฒ๋ก๋ถํฐ ๋ฐ์ ๋ด์ฉ ๋ฐ์ดํฐ: ${response.body}');
+ var jsonResponse = utf8.decode(response.bodyBytes);
+
+ parsedResponseCM = json.decode(jsonResponse);
+
+ selectAge = true;
+ // isLastest = true;
+ setState(() {});
+ // print('์๋ฒ๋ก๋ถํฐ ๋ฐ์ ๋ฐ์ดํฐ: ${response.body}');
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ: ${response.statusCode}');
+ }
+ }
+
+ // ๋๊ฐ ๋ค ์ ํ
+ void sendPostRequestFilter3(String aToken, String age, String type) async {
+
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "age" : age,
+ "type" : type,
+ };
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/memorial/feed?filter=true';
+
+ // POST ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.post(
+ Uri.parse(apiUrl),
+ body: json.encode(data), // ์์ฒญ ๋ณธ๋ฌธ์ ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ์ธ์ฝ๋ฉํ์ฌ ์ ๋ฌ
+ headers: {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ //'Content-Type': 'application/json',
+ }, // ์์ฒญ ํค๋์ Content-Type ์ค์
+ );
+
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ ์ฒ๋ฆฌ
+ print('์๋ฒ๋ก๋ถํฐ ๋ฐ์ ๋ด์ฉ ๋ฐ์ดํฐ: ${response.body}');
+ var jsonResponse = utf8.decode(response.bodyBytes);
+
+ parsedResponseCM = json.decode(jsonResponse);
+
+ selectAge = true;
+ // isLastest = true;
+ setState(() {});
+ // print('์๋ฒ๋ก๋ถํฐ ๋ฐ์ ๋ฐ์ดํฐ: ${response.body}');
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ: ${response.statusCode}');
+ }
+ }
+
+ // ํ
์คํธ์๋ํ
์ปจํธ๋กค๋ฌ๋ฅผ ์์ฑํ์ฌ ํ๋์ ํ ๋น
+ final myController = TextEditingController();
+
+ @override
+ void initState() {
+ super.initState();
+ SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top]);
+ //fetchWithHeaders();
+
+ fetchUserInfo(sign_in.userAccessToken);
+ //_callAPI();
+ sendPostRequest(sign_in.userAccessToken);
+ }
+
+ double calculateGridViewHeight() {
+ // ๊ทธ๋ฆฌ๋๋ทฐ์ ์์ดํ
์
+ int itemCount = parsedResponseCM.length;
+
+ // ๊ทธ๋ฆฌ๋๋ทฐ์ ์ด ์ (3๊ฐ์ ์์ดํ
์ด ํ ํ์ ์์ ๋)
+ int columnCount = 2;
+
+ // ์์ดํ
์ ๋์ด (๊ฐ๋ก:์ธ๋ก ๋น์จ์ ์ค์ ํ ์ ์์)
+ double itemHeight = 204; // ์ด ๊ฐ์ ์ ์ ํ ์กฐ์
+
+ // ์์ดํ
๊ฐ์ ์์ง ๊ฐ๊ฒฉ
+ double crossAxisSpacing = 8.0;
+
+ // ๊ทธ๋ฆฌ๋๋ทฐ์ ๋์ด ๊ณ์ฐ
+ double gridHeight = ((itemCount / columnCount).ceil() * itemHeight) +
+ ((itemCount / columnCount - 1).ceil() * crossAxisSpacing);
+
+ return gridHeight;
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+ return Scaffold(
+ appBar: PreferredSize(
+ preferredSize: Size.fromHeight(72),
+ child: AppBar(
+ actions: [
+ Padding(padding: EdgeInsets.only(top:15),
+ child: new IconButton(
+ icon:Icon(Icons.search, size: 24,),
+ onPressed: (){
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => LateMemorialSearchPage())); // ๊ฒ์ํ์ด์ง๋ก ์ด๋
+ },
+ ),
+ ),
+
+ ],
+ automaticallyImplyLeading:false,
+ title:
+ Container(
+ height: 50,
+ width: screenSize.width,
+ child: Column(
+ children: [
+ SizedBox(height: 24,),
+ Center(
+ child: Padding(padding: EdgeInsets.only(left: 60),
+ child: Text('ํจ๊ปํ ๊ฐ', style: textStyle.bk20normal,),
+ )
+ ),
+ ],
+ ),
+ ),
+ backgroundColor: Color(0xffDDE7FD),
+ elevation: 0.0,
+ iconTheme: IconThemeData(color: Colors.black),
+ ),
+ ),
+ body: Container(
+ color: Color(0xffDDE7FD),
+ //width: Get.width,
+ //height: Get.height,
+ child: SingleChildScrollView(
+
+ scrollDirection: Axis.vertical,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ if(isLastest)...[
+ ClipRRect(
+ borderRadius: BorderRadius.only(topLeft: Radius.circular(16.0), topRight: Radius.circular(16.0)),
+ child: Container(
+ padding: EdgeInsets.all(16),
+ width: Get.width,
+ color: Color(0xffF1F5FE),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Padding(padding: EdgeInsets.only(bottom: 22, left: 0),
+ child: Row(
+ children: [
+ if(selectType)...[
+ Container(
+ height: 28,
+ width: 119,
+ child: ElevatedButton(onPressed: (){
+ dogType = "${parsedResponseUser['puppyType']}";
+ selectType = false;
+ if(selectAge){
+ sendPostRequestFilter2(sign_in.userAccessToken,parsedResponseUser['puppyAge'].toString());
+ }else{
+ sendPostRequest(sign_in.userAccessToken);
+ }
+ setState(() {});
+ //sendPostRequestFilter(sign_in.userAccessToken);
+ },
+ style: buttonChart().whitebtn4,
+ child: Text("${parsedResponseUser['puppyType']}", style: textStyle.wo16semibold,)
+ ),
+ ),
+ ]else...[
+ Container(
+ height: 28,
+ width: 119,
+ child: ElevatedButton(onPressed: (){
+ dogType = "${parsedResponseUser['puppyType']}";
+ selectType = true;
+ setState(() {});
+ if(selectAge){
+ sendPostRequestFilter3(sign_in.userAccessToken, parsedResponseUser['puppyAge'].toString() ,parsedResponseUser['puppyType']);
+ }else{
+ sendPostRequestFilter(sign_in.userAccessToken, parsedResponseUser['puppyType']);
+ }
+ },
+ style: buttonChart().whitebtn3,
+ child: Text("${parsedResponseUser['puppyType']}", style: textStyle.bk16light,)
+ ),
+ ),
+ ],
+
+ SizedBox(width: 16,),
+ if(selectAge)...[
+ Container(
+ height: 28,
+ width: 63,
+ child: ElevatedButton(onPressed: (){
+ dogAge = "${parsedResponseUser['puppyAge']}์ด";
+ selectAge = false;
+ setState(() {});
+ if(selectType){
+ sendPostRequestFilter(sign_in.userAccessToken, parsedResponseUser['puppyType']);
+ }else{
+ sendPostRequest(sign_in.userAccessToken);
+ }
+ },
+ style: buttonChart().whitebtn4,
+ child: Text("${parsedResponseUser['puppyAge']}์ด", style: textStyle.wo16semibold,)
+ ),
+ ),
+ ]
+ else...[
+ Container(
+ height: 28,
+ width: 63,
+ child: ElevatedButton(onPressed: (){
+ dogAge = "${parsedResponseUser['puppyAge']}์ด";
+ selectAge = true;
+ setState(() {});
+ if(selectType){
+ sendPostRequestFilter3(sign_in.userAccessToken, parsedResponseUser['puppyAge'].toString() ,parsedResponseUser['puppyType']);
+ }else{
+ sendPostRequestFilter2(sign_in.userAccessToken,parsedResponseUser['puppyAge'].toString());
+ }
+ },
+ style: buttonChart().whitebtn3,
+ child: Text("${parsedResponseUser['puppyAge']}์ด", style: textStyle.bk16light,)
+ ),
+ ),
+ ],
+ SizedBox(width: 16,),
+ Container(
+ height: 28,
+ width: 52,
+ child: ElevatedButton(onPressed: (){
+ setState(() {});
+ selectAge = false;
+ selectType = false;
+ sendPostRequest(sign_in.userAccessToken);
+ },
+ style: buttonChart().whitebtn3,
+ child: SvgPicture.asset(
+ 'assets/images/memorial/reset.svg',
+ ),
+ ),
+ )
+ ],
+ ),
+ ),
+ Container(
+ //padding: EdgeInsets.all(8.0),
+ width: Get.width,
+ height: (parsedResponseCM.length) == 0? Get.height - 234 : calculateGridViewHeight() + 188,
+ color: Color(0xffF1F5FE),
+ child:
+ Column(
+ children: [
+ Expanded(
+ child: Column(
+ children: [
+ (parsedResponseCM.length) != 0?
+ GridView.builder(
+ shrinkWrap: true, // ๊ทธ๋ฆฌ๋๋ทฐ๊ฐ ์์ ์ ๋ด์ฉ์ ๋ง๊ฒ ํฌ๊ธฐ๋ฅผ ์กฐ์ ํ๋๋ก ํจ
+ physics: NeverScrollableScrollPhysics(),
+ itemCount:parsedResponseCM.length,
+ gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+ crossAxisCount: 2, //1 ๊ฐ์ ํ์ ๋ณด์ฌ์ค item ๊ฐ์
+ childAspectRatio: 1.56 / 2.04, //item ์ ๊ฐ๋ก 1, ์ธ๋ก 2 ์ ๋น์จ
+ mainAxisSpacing: 16, //์ํ Padding
+ crossAxisSpacing: 16, //์์ง Padding
+ ),
+ itemBuilder: (BuildContext context, int index){
+ return
+ InkWell(
+ onTap: (){
+ selectedOthersImage = parsedResponseCM[index]['image'];
+ selectedOthersProfileImage = parsedResponseCM[index]['profileImage'].toString();
+ selectedOthersNickaname = parsedResponseCM[index]['nickname'];
+ selectedUser = parsedResponseCM[index]['userUid'];
+ selectedPostId = parsedResponseCM[index]['id'];
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => LateWatchOthersMemorialDetailPage()));
+ },
+ child: Container(
+ // width: 156,
+ // height: 204,
+ padding: EdgeInsets.all(1.0),
+ decoration: BoxDecoration(
+ boxShadow: [
+ BoxShadow(
+ color: Colors.black.withOpacity(0.05),
+ blurRadius: 10.0,
+ spreadRadius: 0.0,
+ offset: const Offset(0,7),
+ )
+ ],
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(16),
+ ),
+ child:Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Container(
+ height: 166,
+ width: 204,
+ child:
+ Stack(
+ children: [
+ Container(
+ height: 204,
+ width: 204,
+ child:
+ ClipRRect(
+ borderRadius: BorderRadius.only(topLeft: Radius.circular(16.0), topRight: Radius.circular(16.0)),
+ child:
+ Image(
+ image: NetworkImage(parsedResponseCM[index]['image'],),
+ fit: BoxFit.cover,
+ errorBuilder: (context, error, stackTrace) {
+ // ์ค๋ฅ ๋ฐ์ ์ ๋์ฒด ์ด๋ฏธ์ง๋ฅผ ํ์
+ return SvgPicture.asset(
+ 'assets/images/no_result.svg',);
+ },
+ )
+ //Image.network(parsedResponseCM[index]['image'], fit: BoxFit.cover,),
+ ),
+ //Image.network(parsedResponseCM[index]['image'], fit: BoxFit.cover,),
+ ),
+
+ Padding(padding: EdgeInsets.only(left: 8, top:8),
+ child: InkWell(
+ onTap: (){
+ // selectedUser = parsedResponseCM[index]['userUid'];
+ // Navigator.push(
+ // context,
+ // MaterialPageRoute(
+ // builder: (context) => OthersMemorialMainPage()));
+ },
+ child:
+ Container(
+ decoration: BoxDecoration(
+ color: Colors.black.withOpacity(0.2),
+ borderRadius: BorderRadius.circular(32),
+ ),
+ // color: Colors.white.withOpacity(0.7),
+ width: 86,
+ height: 32,
+ child: Row(
+ children: [
+ SizedBox(width: 5,),
+ if(parsedResponseCM[index]['profileImage'].toString() == "null")...[
+ CircleAvatar(
+ backgroundColor: Colors.white,
+ radius: 10,
+ child: CircleAvatar(
+ child: SvgPicture.asset('assets/images/user_null2.svg',),
+ radius: 9,
+ ),
+ ),
+ ]else...[
+ CircleAvatar(
+ backgroundColor: Colors.white,
+ radius: 10,
+ child: CircleAvatar(
+ radius: 9,
+ backgroundImage: NetworkImage(parsedResponseCM[index]['profileImage'].toString()),
+ ),
+ ),
+ ],
+
+ SizedBox(width: 5,),
+ Container(
+ width: 37,
+ child:Text(parsedResponseCM[index]['nickname'],
+ overflow: TextOverflow.ellipsis, // "..."์ผ๋ก ํ์
+ maxLines: 1, // ์ํ๋ ์ค ์๋ก ์ค์
+ style: TextStyle(color: Colors.white, fontSize: 14, fontFamily: 'Pretendard',fontWeight: FontWeight.w600,),),
+ ),
+ SizedBox(width: 1,),
+ Container(
+ width: 11,
+ child:
+ Icon(Icons.arrow_forward_ios_rounded, color: Colors.white,size: 12,)
+ // SvgPicture.asset(
+ // 'assets/images/memorial/blue_arrow.svg',
+ // //fit: BoxFit.cover,),
+ )
+ ],
+ ),
+ ),
+ ),
+ ),
+ ],),
+ ),
+ SizedBox(height: 8,),
+ Container(
+ height: 16,
+ width: 150,
+ child: Row(
+ children: [
+ SizedBox(width: 10,),
+ Container(
+ width: 140,
+ height: 65,
+ child: Text(parsedResponseCM[index]['title'],style: TextStyle(color: Color(0xff333333), fontSize: 13.5, fontFamily: 'Pretendard',fontWeight: FontWeight.w400,), ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ )
+ ),
+ );
+
+ }):
+ Padding(padding: EdgeInsets.only(top: 200),
+ child: Column(
+ children: [
+ SvgPicture.asset(
+ 'assets/images/no_result.svg',
+ height: 124,
+ ),
+ SizedBox(height: 16,),
+ Text("์ผ์นํ๋ ๋ด์ฉ์ด ์์ต๋๋ค.", style: textStyle.bk16normal,)
+ ],
+ )
+ )
+ ],
+ )
+ )
+ ],
+ )
+ ),
+ ],
+ ),
+ ),
+ ),
+ ],
+ ],
+ ),
+ ),
+ ),
+ bottomSheet: Padding(
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).viewInsets.bottom * 0.001),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ Container(
+ color: Color(0xffFFFFFF).withOpacity(0.0),
+ child: Padding(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 24),
+ child: Container(
+ width: screenSize.width,
+ height: 40,
+ child: ElevatedButton(
+ style: buttonChart().bluebtn3,
+ onPressed: () {
+ Navigator.pop(context);
+
+ late_.player2.setAsset(late_.voice[28]);
+ late_.player2.play();
+ // 2.5์ด ์ ์
+ late_.controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 3500), () {
+ late_.controller1.stop();
+ });
+ setState(() {});
+ },
+ child: Text("๋ํ๋ก ๋์๊ฐ๊ธฐ", style: TextStyle(
+ fontFamily: 'Pretendard',
+ fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xffFFFFFF))),
+ ),
+ ),),
+ ),
+ ],
+ ),
+ ),
+
+ );
+ }
+}
\ No newline at end of file
diff --git a/client/lib/conversation/late_period/late_watch_others_detail.dart b/client/lib/conversation/late_period/late_watch_others_detail.dart
new file mode 100644
index 0000000..601ed23
--- /dev/null
+++ b/client/lib/conversation/late_period/late_watch_others_detail.dart
@@ -0,0 +1,863 @@
+import 'dart:async';
+import 'dart:convert';
+import 'package:flutter_svg/svg.dart';
+import 'package:get/get.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:client/style.dart';
+import 'package:intl/intl.dart';
+import 'late_watch_others.dart'as lwatch;
+import 'package:http/http.dart' as http;
+import 'package:client/sign/sign_in.dart' as sign_in;
+import 'package:client/home.dart' as home;
+import 'package:client/memorial/slide/flutter_image_slideshow.dart';
+
+class LateWatchOthersMemorialDetailPage extends StatefulWidget {
+ @override
+ State createState() => _LateWatchOthersMemorialDetailPageState();
+}
+
+class _LateWatchOthersMemorialDetailPageState extends State {
+
+ //lwatch.selectedPostId.toString()
+
+ // ํ๋ฉด์ ๋ณด์ด๋ UI ์ค์ bool
+ bool askHelp = true;
+ bool sendHelp = false;
+
+ bool fetchSuccess = false;
+
+ // ํ
์คํธ์๋ํ
์ปจํธ๋กค๋ฌ๋ฅผ ์์ฑํ์ฌ ํ๋์ ํ ๋น
+ final myController = TextEditingController();
+
+ late Map parsedResponseCN; // ๊ธ ๋ด์ฉ
+ late List parsedResponseCM; // ๋๊ธ
+
+ List parsedResponseIMGS = []; // ์ด๋ฏธ์ง ๊ฐ์
+
+ bool isComment = false;
+
+ // ์ฝ๋ฉํธ ์์ ์ข์์ ์
+ int comments = 0;
+ int hearts = 0;
+
+ late bool myHeart;
+
+ bool setComment = false;
+
+ // ๊ธ๋ด์ฉ ๊ฐ์ ธ์ค๊ธฐ
+ void fetchWithHeaders(String aToken) async {
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/memorial?postId=${lwatch.selectedPostId.toString()}'; // ์ค์ API ์๋ํฌ์ธํธ๋ก ๋ณ๊ฒฝํ์ธ์
+
+ print("๋ช๋ฒ์ด์ผ? "+lwatch.selectedPostId.toString());
+ // ํค๋ ์ ๋ณด ์ค์
+ Map headers = {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ };
+
+ // HTTP GET ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.get(
+ Uri.parse(apiUrl),
+ headers: headers, // ํค๋ ์ถ๊ฐ
+ );
+
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ ์ฒ๋ฆฌ
+ fetchSuccess = true;
+ setState(() {});
+ print('์๋ฒ๋ก๋ถํฐ ๋ฐ์ ๋ด์ฉ ๋ฐ์ดํฐ(๊ธ ๋ด์ฉ): ${response.body}');
+ var jsonResponse = utf8.decode(response.bodyBytes);
+
+ parsedResponseCN = json.decode(jsonResponse);
+
+ // List ํ์
+ print("image test" + parsedResponseCN['imageList'][0].toString());
+
+ for(int i = 0; i headers = {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ };
+
+ var url = Uri.parse('http://3.38.1.125:8080/memorial/comment?postId=${lwatch.selectedPostId.toString()}'); // ์๋ํฌ์ธํธ URL ์ค์
+
+ try {
+ var response = await http.post(
+ url,
+ body: json.encode(data), // ์์ฒญ ๋ณธ๋ฌธ์ ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ์ธ์ฝ๋ฉํ์ฌ ์ ๋ฌ
+ headers: headers, // ํค๋ ์ถ๊ฐ
+ );
+
+ if (response.statusCode == 200) {
+ // ์๋ต ์ฑ๊ณต ์์ ์ฒ๋ฆฌ
+
+ var jsonResponse = utf8.decode(response.bodyBytes); // ์๋ต ๋ณธ๋ฌธ์ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ // JSON ๊ฐ์ ํ์ฉํ ์ํ๋ ๋์ ์ํ
+ //utf8.decode(jsonResponse);
+ print(jsonResponse);
+
+ List contentList = [];
+
+ List parsedResponse = json.decode(jsonResponse);
+
+ setState(() {
+ });
+
+
+ print('API ํธ์ถ ์ฑ๊ณต!!: ${response.statusCode}');
+ } else {
+ // ์์ฒญ ์คํจ ์์ ์ฒ๋ฆฌ
+ print('API ํธ์ถ ์คํจ!!: ${response.statusCode}');
+ }
+ } catch (e) {
+ // ์์ธ ๋ฐ์ ์์ ์ฒ๋ฆฌ
+ print('API ํธ์ถ ์ค ์์ธ ๋ฐ์: $e');
+ }
+ }
+
+ // ์ข์์ ๋๋ฅด๊ธฐ(POST)
+ void sendPostRequest(String aToken) async {
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/memorial/like?postId=${lwatch.selectedPostId.toString()}'; // ์ค์ API ์๋ํฌ์ธํธ๋ก ๋ณ๊ฒฝํ์ธ์
+
+ // POST ์์ฒญ ๋ณด๋ด๊ธฐe
+ var response = await http.post(
+ Uri.parse(apiUrl),
+ headers: {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ //'Content-Type': 'application/json',
+ }, // ์์ฒญ ํค๋์ Content-Type ์ค์
+ );
+
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ ์ฒ๋ฆฌ
+ print('์๋ฒ๋ก๋ถํฐ ๋ฐ์ ๋ด์ฉ ๋ฐ์ดํฐ: ${response.body}');
+ var jsonResponse = utf8.decode(response.bodyBytes);
+
+ setState(() {});
+ // print('์๋ฒ๋ก๋ถํฐ ๋ฐ์ ๋ฐ์ดํฐ: ${response.body}');
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ: ${response.statusCode}');
+ }
+ }
+
+ // ์ข์์ ๊ฐ์ ธ์ค๊ธฐ- ํด๋ฆญ์ฌ๋ถ ํ์ธ(GET)
+ void fetchDataLike(String aToken) async {
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/memorial/like?postId=${lwatch.selectedPostId.toString()}'; /// postId=1 ์ถํ์ ๋ฐ๊ฟ์ฃผ๊ธฐ
+
+ // ํค๋ ์ ๋ณด ์ค์
+ Map headers = {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ };
+
+ // HTTP GET ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.get(
+ Uri.parse(apiUrl),
+ headers: headers, // ํค๋ ์ถ๊ฐ
+ );
+
+ ///var jsonResponse = utf8.decode(response.bodyBytes);
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ var data = json.decode(response.body);
+ var jsonResponse = utf8.decode(response.bodyBytes);
+
+ myHeart = json.decode(jsonResponse);
+
+ // ๋ฐ์ดํฐ ์ฒ๋ฆฌ
+ print('์ข์์~: $myHeart');
+ if(myHeart == true){
+ hearts = 1;
+ } else{
+ hearts = 0;
+ }
+
+ setState(() {
+ });
+
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ: ${response.statusCode}');
+ }
+ }
+
+
+ @override
+ void initState() {
+ super.initState();
+ SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top]);
+ fetchWithHeaders(sign_in.userAccessToken);
+ fetchDataLike(sign_in.userAccessToken);
+
+ print("test" + lwatch.selectedPostId.toString());
+ fetchDataComment();
+ setState(() {
+
+ });
+ }
+
+ // ๋๊ธ ์ญ์ ํ๊ธฐ
+ void deleteComment(String aToken, int commentId) async {
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/memorial/comment?commentId=${commentId}';
+
+ // ํค๋ ์ ๋ณด ์ค์
+ Map headers = {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ };
+
+ // HTTP GET ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.delete(
+ Uri.parse(apiUrl),
+ headers: headers, // ํค๋ ์ถ๊ฐ
+ );
+
+ ///var jsonResponse = utf8.decode(response.bodyBytes);
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ print("์ญ์ ์ฑ๊ณต");
+ setState(() {
+ });
+
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ: ${response.statusCode}');
+ }
+ }
+
+ int comIndex = 0; // ์ญ์ ํ ๋๊ธ ์ธ๋ฑ์ค
+ // ๋๊ธ ์ญ์ ํ์
+ void FlutterDialog() {
+ showDialog(
+ context: context,
+ builder: (_) => new AlertDialog(
+ shape: RoundedRectangleBorder(
+ borderRadius:
+ BorderRadius.all(
+ Radius.circular(12.0))),
+ content: Builder(
+ builder: (context) {
+
+ return Container(
+ height: 298,
+ width: 412,
+ child:
+ Padding(padding: EdgeInsets.all(0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ SizedBox(height: 12,),
+ Container(
+ width: 125,
+ height: 117,
+ child: SvgPicture.asset(
+ 'assets/images/no_result.svg',
+ width: 132,
+ height: 123,
+ fit: BoxFit.contain,
+ ),
+ ),
+ SizedBox(height: 32,),
+ Text("๋๊ธ์ ์ญ์ ํ์๊ฒ ์ด์?",style: textStyle.bk16bold,),
+ SizedBox(height: 8,),
+ Text("์ญ์ ํ ํ, ๋ด์ฉ์ด ๋ณต๊ตฌ๋์ง ์์์!", style: textStyle.bk14normal,),
+ SizedBox(height: 32,),
+ Row(
+ children: [
+ Container(
+ height: 40,
+ width: 120,
+ child: ElevatedButton(
+ child: new Text("์ทจ์", style: textStyle.purple16midium),
+ style: buttonChart().purplebtn3,
+ onPressed: () {
+ Navigator.pop(context);
+ },
+ ),
+ ),
+ SizedBox(width: 16,),
+ Container(
+ height: 40,
+ width: 120,
+ child: ElevatedButton(
+ child: new Text("์ญ์ ํ๊ธฐ", style: textStyle.white16semibold),
+ style: buttonChart().purplebtn,
+ onPressed: () {
+
+ // ์๋ฒ์ ์ ์ก
+ deleteComment(sign_in.userAccessToken, comIndex);
+ setState(() {});
+ Timer(Duration(milliseconds: 500), () {
+ fetchDataComment();
+ });
+
+ Navigator.pop(context);
+ },
+ ),
+ ),
+ ],
+ )
+ ],
+ ),)
+ );
+ },
+ ),
+ )
+ );
+ }
+
+ // ๋๊ธ ์์ ฏ
+ Widget listview_builder(){
+ return ListView.builder(
+ shrinkWrap: true,
+ scrollDirection: Axis.vertical,
+ padding: EdgeInsets.all(0),
+ physics: NeverScrollableScrollPhysics(),
+ itemCount: parsedResponseCM.length,
+ itemBuilder: (BuildContext context, int index){
+ return Column(
+ children: [
+ Container(
+ padding: EdgeInsets.fromLTRB(16, 16, 0, 16),
+ height: 104,
+ width: Get.width,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ //borderRadius: BorderRadius.circular(16),
+ ),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ children: [
+ if(parsedResponseCM[index]['profileImage'].toString() == "null")...[
+ CircleAvatar(
+ radius: 10,
+ child: SvgPicture.asset('assets/images/user_null2.svg',),
+ ),
+ ]else...[
+ CircleAvatar(
+ radius: 10,
+ backgroundImage: NetworkImage(parsedResponseCM[index]['profileImage'].toString()),
+ ),
+ ],
+ SizedBox(width: 8,),
+ Container(width: 55,
+ child: Text(parsedResponseCM[index]['nickname'], style: textStyle.bk12normal,),),
+ SizedBox(width: 204,),
+ if(parsedResponseCM[index]['nickname'] == home.user)...[
+ Container(width: 78, height: 32,
+ child: TextButton(onPressed: (){
+ comIndex = parsedResponseCM[index]['id'];
+ setState(() {
+ });
+ FlutterDialog();
+ }, child: Row(
+ children: [
+ Text("์ญ์ ํ๊ธฐ", style: textStyle.grey12normal,),
+ SvgPicture.asset('assets/images/memorial/deletecom.svg',),
+ ],
+ )
+
+ ),
+ ),
+
+ ],
+
+
+ ],
+ ),
+ SizedBox(height: 6,),
+ Text(parsedResponseCM[index]['content'], style: textStyle.bk12normal,),
+ SizedBox(height: 6,),
+ Text(DateFormat('MM/dd HH:mm').format(DateTime.parse(parsedResponseCM[index]['createdAt'])).toString(), style: TextStyle(fontSize: 10, color: Color(0xffAAAAAA)),)
+
+ //DateFormat('yy/MM/dd - HH:mm:ss').format(parsedResponse[0]['createdAt'])
+ ],
+ ),
+ ),
+ SizedBox(height: 4,),
+ ],
+ );
+
+ }
+ );
+ }
+
+ double calculateListViewHeight() {
+ // ๋ฆฌ์คํธ๋ทฐ์ ์์ดํ
์
+ int itemCount = parsedResponseCM.length;
+
+ // ๋ฆฌ์คํธ๋ทฐ์ ์ด ์ (3๊ฐ์ ์์ดํ
์ด ํ ํ์ ์์ ๋)
+ int columnCount = 1;
+
+ // ์์ดํ
์ ๋์ด (๊ฐ๋ก:์ธ๋ก ๋น์จ์ ์ค์ ํ ์ ์์)
+ double itemHeight = 90; // ์ด ๊ฐ์ ์ ์ ํ ์กฐ์
+
+ // ์์ดํ
๊ฐ์ ์์ง ๊ฐ๊ฒฉ
+ double crossAxisSpacing = 8.0;
+
+ // ๋ฆฌ์คํธ๋ทฐ์ ๋์ด ๊ณ์ฐ
+ double listHeight = ((itemCount / columnCount).ceil() * itemHeight) +
+ ((itemCount / columnCount - 1).ceil() * crossAxisSpacing);
+
+ return listHeight;
+ }
+
+
+ @override
+ Widget build(BuildContext context) {
+ MediaQueryData deviceData = MediaQuery.of(context);
+ Size screenSize = deviceData.size;
+ return Scaffold(
+ appBar: PreferredSize(
+ preferredSize: Size.fromHeight(72),
+ child: AppBar(
+ leading:
+ Padding(
+ padding: EdgeInsets.only(top: 20),
+ child: IconButton(
+ icon: Icon(Icons.arrow_back_ios_rounded, color: Colors.black),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ ),
+ backgroundColor: Color(0xffDDE7FD),
+ elevation: 0.0,
+ title:
+ Container(
+ height: 50,
+ width: screenSize.width,
+ child: Column(
+ children: [
+ SizedBox(height: 24,),
+ Center(
+ child: Padding(
+ padding: EdgeInsets.only(right: 60),
+ child: Text(
+ 'ํจ๊ปํ ๊ฐ',
+ style: textStyle.bk20normal,
+ ),
+ )),
+ ],
+ )),
+ iconTheme: IconThemeData(color: Colors.black),
+ ),
+ ),
+ body: Container(
+ color: Color(0xffDDE7FD),
+ width: Get.width,
+ height: Get.height,
+ child: SingleChildScrollView(
+ padding: EdgeInsets.fromLTRB(0, 0, 0, 0),
+ scrollDirection: Axis.vertical,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ if(fetchSuccess)...[
+ ClipRRect(
+ borderRadius: BorderRadius.only(topLeft: Radius.circular(16.0), topRight: Radius.circular(16.0)),
+ child: Container(
+ width: Get.width,
+ //height: 578,
+ color: Colors.white,
+ child:
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Padding(padding: EdgeInsets.all(16),
+ child: Column(
+ children: [
+ Container(
+ width: Get.width,
+ height: Get.width - 32,
+ child: Stack(
+ children: [
+ Container(
+ width: Get.width,
+ height: Get.width - 32,
+ child:
+ ClipRRect(
+ borderRadius: BorderRadius.circular(16.0),
+ child:
+ ImageSlideshow(
+ indicatorColor: Color(0xffFEFBAC),
+ onPageChanged: (value) {
+ debugPrint('Page changed: $value');
+ },
+ //autoPlayInterval: 3000,
+ isLoop: false,
+ children: [
+ for(int i= 0; i OthersMemorialMainPage()));
+ },
+ child: Padding(
+ padding: EdgeInsets.only(left: 10, top: 10),
+ child: Container(
+ decoration: BoxDecoration(
+ color: Colors.black.withOpacity(0.2),
+ borderRadius: BorderRadius.circular(32),
+ ),
+ // color: Colors.white.withOpacity(0.7),
+ width: 90,
+ height: 32,
+ child: Row(
+ children: [
+ SizedBox(width: 6,),
+ if(lwatch.selectedOthersProfileImage.toString() == "null")...[
+ CircleAvatar(
+ backgroundColor: Colors.white,
+ radius: 10,
+ child: CircleAvatar(
+ child: SvgPicture.asset('assets/images/user_null2.svg',),
+ radius: 9,
+ ),
+ ),
+ ]else...[
+ CircleAvatar(
+ backgroundColor: Colors.white,
+ radius: 10,
+ child: CircleAvatar(
+ radius: 9,
+ backgroundImage: NetworkImage(lwatch.selectedOthersProfileImage.toString()),
+ ),
+ ),
+ ],
+ // CircleAvatar(
+ // backgroundColor: Colors.white,
+ // radius: 10,
+ // child: CircleAvatar(
+ // radius: 9,
+ // backgroundImage: NetworkImage(lwatch.selectedOthersProfileImage.toString(),),
+ // ),
+ // ),
+
+ SizedBox(width: 5,),
+ Container(
+ width: 37,
+ child:Text(lwatch.selectedOthersNickaname,
+ overflow: TextOverflow.ellipsis, // "..."์ผ๋ก ํ์
+ maxLines: 1, // ์ํ๋ ์ค ์๋ก ์ค์
+ style: TextStyle(color: Colors.white, fontSize: 14, fontFamily: 'Pretendard',fontWeight: FontWeight.w600,),),
+ ),
+ SizedBox(width: 5,),
+ Container(
+ width: 11,
+ child:
+ Icon(Icons.arrow_forward_ios_rounded, color: Colors.white,size: 12,),
+ // SvgPicture.asset(
+ // 'assets/images/memorial/blue_arrow.svg',
+ // //fit: BoxFit.cover,
+ // ),
+ )
+ ],
+ ),
+ ),
+ ),
+ )
+ ],
+ ),
+ ),
+ SizedBox(height: 15,),
+ Row(
+ children: [
+ Container(
+ width: 120,
+ height: 32,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text("${parsedResponseCN['date']}์ ๊ธฐ์ต", style: textStyle.grey12normal,),
+ SizedBox(height: 4,),
+ Text(parsedResponseCN['place'], style: textStyle.grey12normal)
+ ],
+ ),
+ ),
+ SizedBox(width: 150,),
+ Row(
+ children: [
+ Container(
+ width: 19,
+ height: 19,
+ child: InkWell(
+ onTap: (){},
+ child: SvgPicture.asset(
+ 'assets/images/memorial/comments.svg',
+ ),
+ ),),
+ SizedBox( width: 3,),
+ Text('${comments}'),
+ SizedBox( width: 10,),
+ if(hearts >= 1)...[
+ Container(
+ // width: 22,
+ // height: 22,
+ child: InkWell(
+ onTap: (){
+ // ์ข์์ ๋๋ฅด๊ธฐ
+ sendPostRequest(sign_in.userAccessToken);
+ // fetchDataLike(sign_in.userAccessToken);
+ hearts= 0;
+ setState(() {
+ });
+ },
+ child: SvgPicture.asset(
+ 'assets/images/memorial/heart-fill.svg',
+ ),
+ ),),
+ ] else...[
+ SizedBox(width: 2,),
+ Container(
+ // width: 22,
+ // height: 22,
+ child: InkWell(
+ onTap: (){
+ // ์ข์์ ๋๋ฅด๊ธฐ
+ sendPostRequest(sign_in.userAccessToken);
+ // fetchDataLike(sign_in.userAccessToken);
+ hearts= 1;
+ setState(() {
+ });
+ },
+ child: SvgPicture.asset(
+ 'assets/images/memorial/heart-empty.svg',
+ ),
+ ),
+ ),
+ ],
+ SizedBox( width: 3,),
+ Text('${hearts}'),
+ ],
+ )
+
+ ],
+ ),
+ SizedBox(height: 15,),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(parsedResponseCN['title'],style: textStyle.bk16semibold,),
+ SizedBox(height: 8,),
+ Container(width: Get.width,
+ //height: 50,
+ child: Text(parsedResponseCN['content'], style: textStyle.bk14normal,),
+ ),
+ SizedBox(height: 8,),
+ Container(width: Get.width,
+ height: 12,
+ child: Text('#${parsedResponseCN['hashtag']}', style: textStyle.grey12normal),
+ ),
+ SizedBox(height: 5,),
+ ],
+ ),
+ ],
+ ),),
+
+ ],
+ ),
+
+ ),
+ ),
+
+ SizedBox(height: 4,),
+ Container(
+ width: Get.width,
+ height: calculateListViewHeight() + 86,
+ child: Column(
+ children: [
+ Expanded(
+ child: Column(
+ children: [
+ listview_builder(),
+ ],
+ )
+ ),
+ ],
+ )
+ ),
+
+ ],
+
+ ],
+ ),
+ ),
+ ),
+ bottomSheet: Padding(
+ padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom * 0.001),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children:[
+ Container(
+ color:Color(0xffF2F4F6),
+ height: 48,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 8.0, top: 8.0, left: 16,right: 16),
+ child: Stack(
+ children: [
+ Container(
+ width: Get.width,
+ height: 48,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(color: setComment?Color(colorChart.blue):Color(0xffC0D2FC)),
+ borderRadius: BorderRadius.circular(30),
+ ),
+ ),
+ Positioned(
+ left: 15,
+ right: 30,
+ bottom: -4,
+ child: TextField(
+ textAlignVertical: TextAlignVertical.center,
+ maxLines: 1,
+ controller: myController,
+ style: textStyle.bk14normal,
+ decoration: InputDecoration(
+ hintStyle: textStyle.grey14normal,
+ border: InputBorder.none,
+ hintText: '๋๊ธ์ ์
๋ ฅํ๋ ค๋ฉด ์ฌ๊ธฐ๋ฅผ ํญํ์ธ์.'),
+ onChanged: (s) {
+ //text = s;
+ setComment = true;
+ setState(() {
+
+ });
+ },
+ onTap: (){
+
+ },
+ ),
+ ),
+ Positioned(
+ left: Get.width - 81,
+ //right: 30,
+ bottom: 3,
+ top: 3,
+ child: ElevatedButton(
+ onPressed: () {
+ saveComment(sign_in.userAccessToken, myController.text);
+ setState(() {
+ });
+
+ myController.clear();
+ Timer(Duration(milliseconds: 500), () {
+ fetchDataComment();
+ });
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: setComment? Color(colorChart.blue):Color(0xffDDE7FD),
+ fixedSize: const Size(23, 23),
+ shape: const CircleBorder(),
+ ),
+ child:Icon(Icons.arrow_upward, color: Colors.white,size: 16,)
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ )
+ );
+ }
+}
\ No newline at end of file
diff --git a/client/lib/conversation/middle_period/sadness.dart b/client/lib/conversation/middle_period/sadness.dart
new file mode 100644
index 0000000..4ea144f
--- /dev/null
+++ b/client/lib/conversation/middle_period/sadness.dart
@@ -0,0 +1,1730 @@
+import 'dart:async';
+import 'dart:convert';
+import 'package:flutter/material.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:client/home.dart' as home;
+import 'package:client/screen.dart';
+import 'package:http/http.dart' as http;
+import 'package:client/progressbar/animation_progressbar.dart';
+import 'package:client/sign/sign_in.dart';
+import 'package:client/style.dart';
+import 'package:intl/intl.dart';
+import 'package:just_audio/just_audio.dart';
+import 'package:flutter_gif/flutter_gif.dart';
+import 'package:client/sign/sign_in.dart' as sign_in;
+import 'package:client/main.dart'as main;
+import 'package:input_slider/input_slider.dart';
+
+/// ์ค๊ธฐ๋ํ-์ฌํ
+
+AudioPlayer player2 = AudioPlayer();
+
+late FlutterGifController controller1, controller2, controller3;
+
+// start
+List voice =[
+ "assets/voice/middle/sadness/start1.mp3", "assets/voice/middle/sadness/start2.mp3",
+ "assets/voice/middle/sadness/start3.mp3", "assets/voice/middle/sadness/start4.mp3",
+ "assets/voice/middle/sadness/start5.mp3", "assets/voice/middle/sadness/start6.mp3",
+ "assets/voice/middle/sadness/start7.mp3",
+];
+
+// good
+List goodVoice =[
+ "assets/voice/middle/sadness/good1.mp3", "assets/voice/middle/sadness/good2.mp3",
+ "assets/voice/middle/sadness/good3.mp3", "assets/voice/middle/sadness/good4.mp3",
+
+];
+
+// little
+List littleVoice =[
+ "assets/voice/middle/sadness/little_1.mp3", "assets/voice/middle/sadness/little_2.mp3",
+ "assets/voice/middle/sadness/little_3.mp3", "assets/voice/middle/sadness/little_4.mp3",
+];
+
+//hard
+List hardVoice =[
+ "assets/voice/middle/sadness/hard1.mp3", "assets/voice/middle/sadness/hard2.mp3",
+ "assets/voice/middle/sadness/hard3.mp3",
+];
+
+//next
+List nextVoice =[
+ "assets/voice/middle/sadness/next1.mp3", "assets/voice/middle/sadness/next2.mp3",
+ "assets/voice/middle/sadness/next3.mp3", "assets/voice/middle/sadness/next4.mp3",
+];
+
+//sad
+List sadVoice =[
+ "assets/voice/middle/sadness/sad1.mp3", "assets/voice/middle/sadness/sad2.mp3",
+ "assets/voice/middle/sadness/sad3.mp3",
+];
+
+//endure
+List endureVoice =[
+ "assets/voice/middle/sadness/endure1.mp3", "assets/voice/middle/sadness/endure2.mp3",
+ "assets/voice/middle/sadness/endure3.mp3", "assets/voice/middle/sadness/endure4.mp3",
+ "assets/voice/middle/sadness/endure5.mp3", "assets/voice/middle/sadness/endure6.mp3",
+];
+
+//last
+List lastVoice =[
+ "assets/voice/middle/sadness/last1.mp3", "assets/voice/middle/sadness/last2.mp3",
+ "assets/voice/middle/sadness/last3.mp3", "assets/voice/middle/sadness/last4.mp3",
+ "assets/voice/middle/sadness/last5.mp3", "assets/voice/middle/sadness/last6.mp3",
+ "assets/voice/middle/sadness/last7.mp3", "assets/voice/middle/sadness/last8.mp3",
+ "assets/voice/middle/sadness/last9.mp3", "assets/voice/middle/sadness/last10.mp3",
+ "assets/voice/middle/sadness/last11.mp3", "assets/voice/middle/sadness/last12.mp3",
+ "assets/voice/middle/sadness/last13.mp3",
+];
+
+//end
+List endVoice =[
+ "assets/voice/middle/sadness/end1.mp3", "assets/voice/middle/sadness/end2.mp3",
+ "assets/voice/middle/sadness/end3.mp3", "assets/voice/middle/sadness/end4.mp3",
+ "assets/voice/intro/intro2_8.mp3",
+ "",
+ "assets/voice/intro/intro2_9.mp3",
+];
+
+
+
+
+class SadnessPage extends StatefulWidget {
+
+ static Future navigatorPush(BuildContext context) async {
+ return Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (_) => SadnessPage(),
+ ),
+ );
+ }
+
+ @override
+ _SadnessPageState createState() => _SadnessPageState();
+}
+
+class _SadnessPageState extends State with TickerProviderStateMixin {
+
+ bool selectedNextTime = false;
+ bool chooseTime = false;
+ int whatTime = 0;
+
+ bool selectedLocate = false;
+ bool chooseLocate = false;
+ String whatLocate = "";
+
+ bool selectedHow = false;
+ bool chooseHow = false;
+ String whatHow = "";
+
+ // ํ
์คํธ ์๋ํ
์ปจํธ๋กค๋ฌ๋ฅผ ์์ฑํ์ฌ ํ๋์ ํ ๋น
+ final nextTimeController = TextEditingController(); // nextQuestion = 7์ผ๋
+ final whatController = TextEditingController(); // nextQuestion = 7์ผ๋
+
+ FocusNode _focusNode = FocusNode();
+
+ String sentDate = "";
+ // ๋ํ ๋จ๊ณ ์ ์ฅ
+ void saveCon(String aToken, String con, String nextcon) async {
+ // API ์๋ํฌ์ธํธ URL
+ String apiUrl = 'http://3.38.1.125:8080/user/conversation-status';
+
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "conversationStatus": con,
+ "nextConversationAt": nextcon,
+ };
+
+ // ํค๋ ์ ๋ณด ์ค์
+ Map headers = {
+ 'Authorization': 'Bearer $aToken', // ์: ์ธ์ฆ ํ ํฐ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ
+ 'Content-Type': 'application/json', // ์: JSON ์์ฒญ์ธ ๊ฒฝ์ฐ ํค๋ ์ค์
+ };
+
+ // HTTP GET ์์ฒญ ๋ณด๋ด๊ธฐ
+ var response = await http.put(
+ Uri.parse(apiUrl),
+ body: json.encode(data),
+ headers: headers, // ํค๋ ์ถ๊ฐ
+ );
+
+ ///var jsonResponse = utf8.decode(response.bodyBytes);
+ // HTTP ์๋ต ์ํ ํ์ธ
+ if (response.statusCode == 200) {
+ // ์๋ต ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ print("๋ํ ๋จ๊ณ ๋ฃ๊ธฐ ์ฑ๊ณต");
+ setState(() {
+ });
+
+ } else {
+ // ์์ฒญ์ด ์คํจํ ๊ฒฝ์ฐ ์ค๋ฅ ์ฒ๋ฆฌ
+ print('HTTP ์์ฒญ ์คํจ..?: ${response.statusCode}');
+ }
+ }
+
+ @override
+ void initState() {
+ super.initState();
+
+ main.play = true;
+ main.player.setAsset(main.musics[2]);
+ main.player.play();
+
+ // ์์ ์ ์ฉ
+ for(int i= 0 ; i < voice.length; i++){
+ player2.setAudioSource(AudioSource.uri(
+ Uri.parse(voice[i]))
+ );
+ }
+
+ controller1 = FlutterGifController(vsync: this);
+
+ player2.setAsset(voice[voiceCount]);
+ voiceCount++;
+ player2.play();
+
+ // 2.5์ด ์ ์
+ controller1.repeat(
+ min: 0,
+ max: 30,
+ period: const Duration(milliseconds: 1000)
+ );
+ Timer(Duration(milliseconds: 1500), () {
+ controller1.stop();
+ });
+
+ _callAPI();
+ _focusNode.addListener(_onFocusChange);
+ }
+
+ void _onFocusChange() {
+ if (_focusNode.hasFocus) {
+ // ํค๋ณด๋ ์ฌ๋ฆฌ๊ธฐ
+ FocusScope.of(context).requestFocus(_focusNode);
+ }
+ }
+
+ @override
+ void dispose() async {
+ super.dispose();
+ }
+ List introText =[];
+ int startQuestion = 0;
+ int voiceCount = 0;
+ int voiceGoodCount = 0;
+ int voiceLittleCount = 0;
+ int voiceHardCount = 0;
+ int voiceNextCount = 0;
+ int voiceSadCount = 0;
+ int voiceEndureCount = 0;
+ int voiceLastCount = 0;
+ int voiceEndCount = 0;
+
+ int goodQuestion = 0;
+ bool goodAns = false;
+ bool ui_good = false;
+
+ int littleQuestion = 0;
+ bool littleAns = false;
+ bool ui_little = false;
+
+ int hardQuestion = 0;
+ bool hardAns = false;
+ bool ui_hard = false;
+
+ int nextQuestion = 0;
+ bool nextQ = false;
+
+ bool ui_bad = false;
+ bool ui_sad = false;
+ bool ui_endure = false;
+
+ int sadQuestion = 0;
+ bool sadAns = false;
+
+ int endureQuestion = 0;
+ bool endureAns = false;
+
+ int lastQuestion = 0;
+ bool last = false;
+
+ int endQuestion = 0;
+ bool end = false;
+
+ int happyVoiceCount = 0;
+ int griefVoiceCount = 0;
+
+ // ์์
+ List startQuestions =[
+ "์ข์์, ${home.user}๋",
+ "${home.puppy}์์\n์ด๋ณ๋ก ๊ฒช์ ์ฌํ ๊ฐ์ ๋ค์",
+ "${home.user}๋์ ์ถ์\n๋ณํ๋ฅผ ๊ฐ์ ธ์์ ๊ฑฐ์์.",
+ "์์ฆ ${home.user}๋์",
+ "์ด๋ป๊ฒ ์ง๋ด๊ณ ์๋์ง ๊ถ๊ธํด์.",
+ "ํ์ฌ ${home.user}๋์\n๊ฑด๊ฐ ์ํ๋ ์ด๋ค๊ฐ์?",
+ "๊ฑด๊ฐ ์ํ์ ์ ๋๋ฅผ ์๋ ค์ฃผ์ธ์.",
+
+ ];
+
+// ์ข์์
+ List good= [
+ "${home.user}๋์ ์ฌํ์",
+ "๊ฑด๊ฐํ๊ฒ ๊ทน๋ณตํ๊ณ ๊ณ์๋ค์.",
+ "์์ผ๋ก๋ ${home.user}๋์\n์ผ์์ ์ ์งํ๋ฉด์.",
+ "์ฐจ์ฐจ ์ด๋ณ์ ๊ทน๋ณตํด๊ฐ๋ฉด ๋๋ต๋๋ค!",
+ ];
+
+// ์กฐ๊ธ ์ํ์
+ List little =[
+ "์ด๋ณ์ ๋๊ตฌ์๊ฒ๋\nํฐ ํ์ ์ฆ์ ๋จ๊ธฐ์ฃ .",
+ "ํ์ง๋ง,\n์ด๋ณ์ ์ ๋ณด๋ด๊ธฐ ์ํด์๋",
+ "๊ฑด๊ฐํ ๋ชธ๋ ์ ๋ง ์ค์ํ๋ต๋๋ค.",
+ "์ฌ์ํ ์ผ์์ ์งํค๋ฉฐ\n์ด๋ณ์ ๊ฐ์ด ๊ทน๋ณตํด๋ด์!",
+ ];
+
+// ์ํ์
+ List hard =[
+ "์ด๋ณ์ ๊ฒช์ผ๋ฉด ๋ง์์ ๋ฐ๋ผ\n๋ชธ๋ ๋๋ฌด๋ ์ํ์ค์ฃ .",
+ "๋ ๋ ํ ๋ฐฅ์ ๋จน๊ณ \n๊ฐ๋จํ ์ผ์ธํ๋์ ํ๋ฉด์",
+ "์ฐ๋ฆฌ ์ฌ์ํ ๊ฒ๋ถํฐ ์์ํด๋ณด์์!",
+ ];
+
+// ๋ค์ ์ง๋ฌธ
+ List nextQuestions =[
+ "๋ค์ ์ง๋ฌธ์ด์์.",
+ "${home.user}๋,\nํ์ฌ ๋ง์์ ์ฌํ์",
+ "์ด๋ ์ ๋์ธ๊ฐ์?",
+ "์ฌํ์ ์ ๋๋ฅผ ์๋ ค์ฃผ์ธ์.",
+ ];
+
+// ๊ณ ํต, ์ฌํผ์
+ List sad =[
+ "${home.user}๋์\n์ํ ๋ง์์ด ์ ๊ฒ๋ ๋๊ปด์ ธ์.",
+ "์ฌํ๊ณ ๊ณ ํต์ค๋ฌ์ด ๋ง์์\n์ ์๊ฒ ํธ์ด๋์ผ๋ฉด์",
+ "์กฐ๊ธ์ด๋๋ง ๋์ด์ง๊ธธ\n๋ฐ๋ผ๋ ๋ง์์ด๋๋๋ค.",
+ ];
+
+// ๊ฒฌ๋ ์ ์์ด์
+ List endure =[
+ "${home.user}๋,",
+ "์ฌํ์ ์๋ ๊ทธ๋๋ก ํํํ๋ ๊ณผ์ ์\n๋งค์ฐ ์ค์ํ๋ต๋๋ค.",
+ "๊ทธ๋๋ ${home.user}๋์\n์ฌํ์ผ๋ก ์ธํ ๊ฐ์ ์",
+ "์ ํ์ด๋๊ฐ๊ณ ์๋ ๊ฒ ๊ฐ์์.",
+ "์์ผ๋ก๋ ์ง๊ธ์ฒ๋ผ๋ง\n${home.user}๋์ ์ฌํ์",
+ "์๋ ๊ทธ๋๋ก ํํํด ๋ณด์์.",
+ ];
+
+ List lastQuestions =[
+ "${home.user}๋",
+ "${home.puppy}์์\n์ด๋ณ๋ก ๊ฒช๊ฒ๋ ์ฌํ ๊ฐ์ ๋ค์ด",
+ "๋ชธ๊ณผ ๋ง์์\n์ฌ๋ฌ๊ฐ์ง ๋ณํ๋ฅผ ๊ฐ์ ธ์จ ๊ฒ ๊ฐ์์.",
+ "๋ง์ง๋ง์ผ๋ก\n${home.puppy}์์ ์ด๋ณ์ด",
+ "์ด๋ค ๋ณํ๋ค์ ๊ฐ์ ธ์๋์ง\n๊ตฌ์ฒด์ ์ผ๋ก ์๊ธฐํด๋ณด๋ ค๊ณ ํด์.",
+ "๊ตฌ์ฒด์ ์ผ๋ก ${home.user}๋์\n์ด๋ค ์ํฉ์ธ๊ฐ์?",
+ "์ด๋ณ์ ๋ฌด๊ธฐ๋ ฅํ๊ฒ\n๋๋ก๋ ํ์ผ์์ด ์ฌํ๊ฒ ๋ง๋ค๊ธฐ๋ ํด์.",
+ "์์ฃผ ๊ณ ํต์ค๋ฝ๊ฒ ๋ง๋ค๊ธฐ๋ ํ์ฃ .",
+ "${home.user}๋ ํผ์\n์ด ๊ฐ์ ๋ค์ ๊ฐ๋นํ๊ธฐ์",
+ "์ด๋ ค์์ด ์์ด ๋ณด์ฌ์.",
+ "๊ฐ์ ์ํฉ์ ๊ฒฝํํ\nํน์ ๊ฒฝํ์ค์ธ",
+ "๋ง์ ๋ฐ๋ ค์ธ๋ค์ ์๊ธฐ๋ฅผ\n๋ค์ด๋ณด๋ ๊ฑด ์ด๋จ๊น์?",
+ "${home.user}๋์๊ฒ\nโ๋์ ์์ฒญํ๊ธฐโ๋ฅผ ์ถ์ฒํด๋๋ฆด๊ฒ์!",
+ ];
+
+ List questionsEnd =[
+ "${home.user}๋,",
+ "์ค๋ ์ ๊ฐ ์ค๋นํ ๋ํ๋\n์ฌ๊ธฐ๊น์ง์์.",
+ "${home.user}๋์\n์ฌํ ๊ฐ์ ๋ค์ ์๊ธฐํ๊ณ ",
+ "์ค์ค๋ก๋ฅผ ๋ค๋
์ผ ์ ์๊ธฐ๋ฅผ ๋ฐ๋ผ์!",
+ "์, ์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+ "์, ์ด์ ์ฐ๋ฆฌ๊ฐ ๋ค์\n๋ง๋๊ฒ ๋ ์๊ฐ์ ์๋ ค์ฃผ์ธ์.",
+ ];
+
+ void _callAPI() async {
+ // ์์ฒญ ๋ณธ๋ฌธ ๋ฐ์ดํฐ
+ var data = {
+ "stage" : "0",
+ "set" : "0",
+ "lineId" : "0"
+ };
+
+ var url = Uri.parse('http://3.38.1.125:8080/conversation/line'); // ์๋ํฌ์ธํธ URL ์ค์
+
+ try {
+ var response = await http.post(
+ url,
+ body: json.encode(data), // ์์ฒญ ๋ณธ๋ฌธ์ ๋ฐ์ดํฐ๋ฅผ JSON ํ์์ผ๋ก ์ธ์ฝ๋ฉํ์ฌ ์ ๋ฌ
+ headers: {'Content-Type': 'application/json',}, // ์์ฒญ ํค๋์ Content-Type ์ค์
+ );
+
+ if (response.statusCode == 200) {
+ // ์๋ต ์ฑ๊ณต ์์ ์ฒ๋ฆฌ
+
+ var jsonResponse = utf8.decode(response.bodyBytes); // ์๋ต ๋ณธ๋ฌธ์ JSON ํ์์ผ๋ก ๋์ฝ๋ฉ
+ // JSON ๊ฐ์ ํ์ฉํ ์ํ๋ ๋์ ์ํ
+ //utf8.decode(jsonResponse);
+ print(jsonResponse);
+
+ List