@@ -71,51 +71,29 @@ class MyHomePage extends StatelessWidget {
71
71
Align (
72
72
alignment: Alignment .bottomCenter,
73
73
child: Padding (
74
- padding: EdgeInsets .only (bottom: 100. w),
74
+ padding: EdgeInsets .only (bottom: 100. w + ScreenUtil .bottomBarHeight ),
75
75
child: Row (
76
76
mainAxisAlignment: MainAxisAlignment .spaceAround,
77
77
children: < Widget > [
78
- Container (
79
- decoration: BoxDecoration (
80
- color: Colors .white.withOpacity (0.1 ),
81
- shape: BoxShape .circle,
82
- ),
83
- width: 150. w,
84
- height: 150. w,
85
- child: Icon (
86
- Icons .bubble_chart,
87
- color: Colors .white.withOpacity (0.5 ),
88
- size: ScreenUtil ().setWidth (96 ),
89
- ),
90
- ),
91
- Container (
92
- decoration: BoxDecoration (
93
- color: Colors .white,
94
- shape: BoxShape .circle,
95
- border: Border .all (
96
- color: Colors .grey[800 ],
97
- width: 2 ,
98
- ),
99
- ),
100
- width: 150. w,
101
- height: 150. w,
102
- child: Icon (
103
- Icons .image,
104
- color: Colors .grey[900 ],
105
- ),
106
- ),
107
- Container (
108
- decoration: BoxDecoration (
109
- color: Colors .white.withOpacity (0.1 ),
110
- shape: BoxShape .circle,
111
- ),
112
- width: 150. w,
113
- height: 150. w,
114
- child: Icon (
115
- Icons .brightness_3,
116
- color: Colors .white.withOpacity (0.5 ),
117
- ),
118
- ),
78
+ _buildWidgetCircleMenu (Icons .bubble_chart, false ),
79
+ _buildWidgetCircleMenu (Icons .accessibility_new, true ),
80
+ _buildWidgetCircleMenu (Icons .brightness_3, false ),
81
+ ],
82
+ ),
83
+ ),
84
+ ),
85
+ Align (
86
+ alignment: Alignment .bottomCenter,
87
+ child: Padding (
88
+ padding: EdgeInsets .only (
89
+ bottom: ScreenUtil .bottomBarHeight > 0 ? ScreenUtil .bottomBarHeight : 24. w,
90
+ ),
91
+ child: Row (
92
+ mainAxisAlignment: MainAxisAlignment .spaceAround,
93
+ children: < Widget > [
94
+ _buildWidgetTextMenuCircle ('Focus' , false ),
95
+ _buildWidgetTextMenuCircle ('Relax' , true ),
96
+ _buildWidgetTextMenuCircle ('Sleep' , false ),
119
97
],
120
98
),
121
99
),
@@ -126,6 +104,36 @@ class MyHomePage extends StatelessWidget {
126
104
);
127
105
}
128
106
107
+ Widget _buildWidgetTextMenuCircle (String text, bool isActive) {
108
+ return Text (
109
+ text,
110
+ style: TextStyle (
111
+ color: isActive ? Colors .white : Colors .grey[800 ],
112
+ ),
113
+ );
114
+ }
115
+
116
+ Widget _buildWidgetCircleMenu (IconData iconData, bool isActive) {
117
+ return Container (
118
+ decoration: BoxDecoration (
119
+ color: isActive ? Colors .white : Colors .white.withOpacity (0.1 ),
120
+ shape: BoxShape .circle,
121
+ border: isActive
122
+ ? Border .all (
123
+ color: Colors .grey[800 ],
124
+ width: 2 ,
125
+ )
126
+ : null ,
127
+ ),
128
+ width: 150. w,
129
+ height: 150. w,
130
+ child: Icon (
131
+ iconData,
132
+ color: isActive ? Colors .grey[900 ] : Colors .white.withOpacity (0.5 ),
133
+ ),
134
+ );
135
+ }
136
+
129
137
Widget _buildWidgetColumnText () {
130
138
return Center (
131
139
child: Column (
0 commit comments