-
Notifications
You must be signed in to change notification settings - Fork 0
/
Diagnosis_Result.dart
154 lines (147 loc) · 4.71 KB
/
Diagnosis_Result.dart
1
2
3
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
import 'package:flutter/material.dart';
import 'Meditation_Recommendation.dart';
void main() {
runApp(const MyDiagnosisResult());
}
class MyDiagnosisResult extends StatelessWidget {
const MyDiagnosisResult({Key? key}) : super(key: key);
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
appBarTheme: AppBarTheme(
color: Colors.lightBlue.shade900,
),
),
home: diagnosisresult(title: 'Dear My Diary'),
);
}
}
class diagnosisresult extends StatefulWidget {
const diagnosisresult({Key? key, required this.title}) : super(key: key);
final String title;
@override
State<diagnosisresult> createState() => _diagnosisresult();
}
class _diagnosisresult extends State<diagnosisresult> {
@override
initState(){
super.initState();
}
Widget build(BuildContext context) {
return new MaterialApp(
theme: ThemeData(
appBarTheme: AppBarTheme(
color: Colors.lightBlue.shade900,
),
),
home: new Scaffold(
appBar: new AppBar(
centerTitle: true,
title: new Text('진단 결과'),
),
body: new SingleChildScrollView(
child: new Column(
children: <Widget>[
Text.rich(
TextSpan(
children: <TextSpan> [
Padding(padding: const EdgeInsets.fromLTRB(0, 0, 0, 10),),
TextSpan(
text: '우울 진단 결과',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20)
),
TextSpan(
text: '\nPHQ-9 설문을 통해 구체적으로 진단된 내용이에요.',
style: TextStyle(
fontSize: 17)
),
],
),
textAlign: TextAlign.center
),
DataTable(
columns: [
DataColumn(label: Text('점수')),
DataColumn(label: Text('분류')),
],
rows: [
DataRow(
cells: [
DataCell(Text('0 ~ 4점', style: TextStyle(fontSize: 13))),
DataCell(Text('우울아님', style: TextStyle(fontSize: 13))),
]
),
DataRow(
cells: [
DataCell(Text('5 ~ 9점', style: TextStyle(fontSize: 13))),
DataCell(Text('가벼운 우울', style: TextStyle(fontSize: 13))),
]
),
DataRow(
cells: [
DataCell(Text('10 ~ 19점', style: TextStyle(fontSize: 12))),
DataCell(Text('중간정도의 우울 \n(가까운 지역센터나 전문기관 방문을 요망합니다.)', style: TextStyle(fontSize: 12))),
]
),
DataRow(
cells: [
DataCell(Text('20 ~ 27점', style: TextStyle(fontSize: 12))),
DataCell(Text('심한 우울 \n(전문기관의 치료적 개입과 평가가 필요합니다.)', style: TextStyle(fontSize: 12))),
]
),
],
),
Padding(padding: const EdgeInsets.fromLTRB(0, 0, 0, 20),),
Text.rich(
TextSpan(
children: <TextSpan> [
TextSpan(
text: '귀하의 우울증 척도 테스트결과 점수는',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20)
),
TextSpan(
text: '6점',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20,
color: Colors.red,
decoration: TextDecoration.underline)
),
TextSpan(
text: '입니다.',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20)
),
TextSpan(
text: '\n우울감을 완화할 수 있도록 명상을 통한 인지치료를 추천드릴게요.',
style: TextStyle(
fontSize: 17)
),
],
),
textAlign: TextAlign.center
),
RaisedButton(
child: Text('명상 하러 가기'),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => Mymeditation())
);
},
),
],
),
),
),
);
}
}