-
Notifications
You must be signed in to change notification settings - Fork 0
/
Meditation_Recommendation.dart
178 lines (171 loc) · 6.4 KB
/
Meditation_Recommendation.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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
import 'package:flutter/material.dart';
import 'package:flutter_youtube/flutter_youtube.dart';
class Mymeditation extends StatelessWidget {
void playYoutubeVideo1(){
FlutterYoutube.playYoutubeVideoByUrl(
apiKey: "<API_KEY>", videoUrl: "https://www.youtube.com/watch?v=RtPwBk0pqKE"
);
}
void playYoutubeVideo2(){
FlutterYoutube.playYoutubeVideoByUrl(
apiKey: "<API_KEY>", videoUrl: "https://www.youtube.com/watch?v=2N4eTTipm9I"
);
}
void playYoutubeVideo3(){
FlutterYoutube.playYoutubeVideoByUrl(
apiKey: "<API_KEY>", videoUrl: "https://www.youtube.com/watch?v=yiysD0Jl2Wo"
);
}
@override
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>[
Padding(padding: const EdgeInsets.fromLTRB(0, 20, 0, 0),),
Text.rich(
TextSpan(
children: <TextSpan> [
TextSpan(
text: '첫번째 명상 영상',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20)
),
TextSpan(
text: '\n[명상음악]하루10분 만병을 치료해주는 ...',
style: TextStyle(
fontSize: 17)
),
TextSpan(
text: '\n조회수 : 1192만회',
style: TextStyle(
fontSize: 17)
),
],
),
textAlign: TextAlign.center
),
Container(
padding: const EdgeInsets.fromLTRB(10, 0, 10, 20),
child: Row(children: <Widget>[
Padding(padding: const EdgeInsets.fromLTRB(0, 0, 30, 0),),
SizedBox(
height: 200,
width: 200,
child: Image.asset('lib/assets/video1.png')
),
Padding(padding: const EdgeInsets.fromLTRB(0, 0, 10, 0),),
new Padding(
padding: const EdgeInsets.all(20.0),
child: new RaisedButton(
child: new Text("영상 연결"),
onPressed: playYoutubeVideo1
),
),
],
),
),
Text.rich(
TextSpan(
children: <TextSpan> [
TextSpan(
text: '두번째 명상 영상',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20)
),
TextSpan(
text: '\n티벳 대형 싱잉볼 연주(극저음) 명상음악/...',
style: TextStyle(
fontSize: 17)
),
TextSpan(
text: '\n조회수 : 708만회',
style: TextStyle(
fontSize: 17)
),
],
),
textAlign: TextAlign.center
),
Container(
padding: const EdgeInsets.fromLTRB(10, 0, 10, 20),
child: Row(children: <Widget>[
Padding(padding: const EdgeInsets.fromLTRB(0, 0, 30, 0),),
SizedBox(
height: 200,
width: 200,
child: Image.asset('lib/assets/video2.png')
),
Padding(padding: const EdgeInsets.fromLTRB(0, 0, 10, 0),),
new Padding(
padding: const EdgeInsets.all(20.0),
child: new RaisedButton(
child: new Text("영상 연결"),
onPressed: playYoutubeVideo2
),
),
],
),
),
Text.rich(
TextSpan(
children: <TextSpan> [
TextSpan(
text: '세번째 명상 영상',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20)
),
TextSpan(
text: '\n10분명상-당신의 삶에 명상이 필요할 때',
style: TextStyle(
fontSize: 17)
),
TextSpan(
text: '\n조회수 : 50만회',
style: TextStyle(
fontSize: 17)
),
],
),
textAlign: TextAlign.center
),
Container(
padding: const EdgeInsets.fromLTRB(10, 0, 10, 20),
child: Row(children: <Widget>[
Padding(padding: const EdgeInsets.fromLTRB(0, 0, 30, 0),),
SizedBox(
height: 200,
width: 200,
child: Image.asset('lib/assets/video3.png')
),
Padding(padding: const EdgeInsets.fromLTRB(0, 0, 10, 0),),
new Padding(
padding: const EdgeInsets.all(20.0),
child: new RaisedButton(
child: new Text("영상 연결"),
onPressed: playYoutubeVideo3
),
),
],
),
),
],
),
),
),
);
}
}