Skip to content

Commit efa9bf0

Browse files
committed
Reformat code
1 parent 301a64d commit efa9bf0

File tree

4 files changed

+63
-49
lines changed

4 files changed

+63
-49
lines changed

assets/images/img_peaceful_piano.jpg

28.3 KB
Loading

assets/images/img_scenic_mountain.jpg

36.7 KB
Loading

assets/images/img_water_drop.jpg

33.6 KB
Loading

lib/main.dart

Lines changed: 63 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class MyHomePage extends StatelessWidget {
3434
child: Stack(
3535
children: <Widget>[
3636
Image.asset(
37-
'assets/images/img_dessert.jpg',
37+
'assets/images/img_scenic_mountain.jpg',
3838
fit: BoxFit.cover,
3939
height: heightScreen / 2,
4040
),
@@ -46,7 +46,7 @@ class MyHomePage extends StatelessWidget {
4646
child: Stack(
4747
children: <Widget>[
4848
Image.asset(
49-
'assets/images/img_polar_light.jpg',
49+
'assets/images/img_water_drop.jpg',
5050
fit: BoxFit.cover,
5151
height: heightScreen / 2,
5252
),
@@ -59,60 +59,74 @@ class MyHomePage extends StatelessWidget {
5959
Align(
6060
alignment: Alignment.center,
6161
child: WavyImage(
62-
'assets/images/img_tree_beach.jpg',
63-
),
64-
),
65-
Padding(
66-
padding: EdgeInsets.only(
67-
top: paddingTop,
68-
bottom: paddingBottom,
69-
),
70-
child: Column(
71-
children: <Widget>[
72-
Expanded(
73-
child: Center(
74-
child: Text(
75-
'Meditation',
76-
style: TextStyle(
77-
color: Colors.white,
78-
fontFamily: 'MazzardSemiBold',
79-
fontSize: 36,
80-
),
81-
),
82-
),
83-
),
84-
Expanded(
85-
child: Center(
86-
child: Text(
87-
'Daydream',
88-
style: TextStyle(
89-
color: Colors.white,
90-
fontFamily: 'MazzardSemiBold',
91-
fontSize: 36,
92-
),
93-
),
94-
),
95-
),
96-
Expanded(
97-
child: Center(
98-
child: Text(
99-
'Sensations',
100-
style: TextStyle(
101-
color: Colors.white,
102-
fontFamily: 'MazzardSemiBold',
103-
fontSize: 36,
104-
),
105-
),
106-
),
107-
),
108-
],
62+
'assets/images/img_peaceful_piano.jpg',
10963
),
11064
),
65+
_buildWidgetColumnText(),
11166
],
11267
),
11368
),
11469
);
11570
}
71+
72+
Widget _buildWidgetColumnText() {
73+
return Center(
74+
child: Column(
75+
children: <Widget>[
76+
Expanded(
77+
child: Column(
78+
mainAxisAlignment: MainAxisAlignment.center,
79+
children: <Widget>[
80+
_buildWidgetTitle('Meditation'),
81+
_buildWidgetSubtitle('Breathe, Sense, Feel'),
82+
],
83+
),
84+
),
85+
Expanded(
86+
child: Column(
87+
mainAxisAlignment: MainAxisAlignment.center,
88+
children: <Widget>[
89+
_buildWidgetTitle('Piano'),
90+
_buildWidgetSubtitle('Relax and indulge'),
91+
],
92+
),
93+
),
94+
Expanded(
95+
child: Column(
96+
mainAxisAlignment: MainAxisAlignment.center,
97+
children: <Widget>[
98+
_buildWidgetTitle('Calm'),
99+
_buildWidgetSubtitle('Slow down and relax'),
100+
],
101+
),
102+
),
103+
],
104+
),
105+
);
106+
}
107+
108+
Widget _buildWidgetTitle(String text) {
109+
return Text(
110+
text,
111+
style: TextStyle(
112+
color: Colors.white,
113+
fontFamily: 'MazzardSemiBold',
114+
fontSize: ScreenUtil().setSp(128),
115+
),
116+
);
117+
}
118+
119+
Widget _buildWidgetSubtitle(String text) {
120+
return Text(
121+
text,
122+
style: TextStyle(
123+
color: Colors.white70,
124+
fontFamily: 'MazzardSemiBold',
125+
fontSize: ScreenUtil().setSp(42),
126+
height: ScreenUtil().setHeight(1),
127+
),
128+
);
129+
}
116130
}
117131

118132
class WavyImage extends StatelessWidget {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy