Skip to content

Commit 16f89da

Browse files
committed
new manually percentage(water level) add in the fitness app screen
1 parent f77ea2f commit 16f89da

File tree

4 files changed

+135
-144
lines changed

4 files changed

+135
-144
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
org.gradle.jvmargs=-Xmx1536M
22

3+
android.enableR8=true

best_flutter_ui_templates/lib/fitness_app/my_diary/water_view.dart

Lines changed: 28 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import 'package:best_flutter_ui_templates/main.dart';
44
import 'package:flutter/material.dart';
55

66
class WaterView extends StatefulWidget {
7-
const WaterView(
8-
{Key key, this.mainScreenAnimationController, this.mainScreenAnimation})
9-
: super(key: key);
7+
const WaterView({Key key, this.mainScreenAnimationController, this.mainScreenAnimation}) : super(key: key);
108

119
final AnimationController mainScreenAnimationController;
1210
final Animation<dynamic> mainScreenAnimation;
@@ -29,11 +27,9 @@ class _WaterViewState extends State<WaterView> with TickerProviderStateMixin {
2927
return FadeTransition(
3028
opacity: widget.mainScreenAnimation,
3129
child: Transform(
32-
transform: Matrix4.translationValues(
33-
0.0, 30 * (1.0 - widget.mainScreenAnimation.value), 0.0),
30+
transform: Matrix4.translationValues(0.0, 30 * (1.0 - widget.mainScreenAnimation.value), 0.0),
3431
child: Padding(
35-
padding: const EdgeInsets.only(
36-
left: 24, right: 24, top: 16, bottom: 18),
32+
padding: const EdgeInsets.only(left: 24, right: 24, top: 16, bottom: 18),
3733
child: Container(
3834
decoration: BoxDecoration(
3935
color: FintnessAppTheme.white,
@@ -43,15 +39,11 @@ class _WaterViewState extends State<WaterView> with TickerProviderStateMixin {
4339
bottomRight: Radius.circular(8.0),
4440
topRight: Radius.circular(68.0)),
4541
boxShadow: <BoxShadow>[
46-
BoxShadow(
47-
color: FintnessAppTheme.grey.withOpacity(0.2),
48-
offset: const Offset(1.1, 1.1),
49-
blurRadius: 10.0),
42+
BoxShadow(color: FintnessAppTheme.grey.withOpacity(0.2), offset: const Offset(1.1, 1.1), blurRadius: 10.0),
5043
],
5144
),
5245
child: Padding(
53-
padding: const EdgeInsets.only(
54-
top: 16, left: 16, right: 16, bottom: 16),
46+
padding: const EdgeInsets.only(top: 16, left: 16, right: 16, bottom: 16),
5547
child: Row(
5648
children: <Widget>[
5749
Expanded(
@@ -66,23 +58,20 @@ class _WaterViewState extends State<WaterView> with TickerProviderStateMixin {
6658
crossAxisAlignment: CrossAxisAlignment.end,
6759
children: <Widget>[
6860
Padding(
69-
padding: const EdgeInsets.only(
70-
left: 4, bottom: 3),
61+
padding: const EdgeInsets.only(left: 4, bottom: 3),
7162
child: Text(
7263
'2100',
7364
textAlign: TextAlign.center,
7465
style: TextStyle(
7566
fontFamily: FintnessAppTheme.fontName,
7667
fontWeight: FontWeight.w600,
7768
fontSize: 32,
78-
color:
79-
FintnessAppTheme.nearlyDarkBlue,
69+
color: FintnessAppTheme.nearlyDarkBlue,
8070
),
8171
),
8272
),
8373
Padding(
84-
padding: const EdgeInsets.only(
85-
left: 8, bottom: 8),
74+
padding: const EdgeInsets.only(left: 8, bottom: 8),
8675
child: Text(
8776
'ml',
8877
textAlign: TextAlign.center,
@@ -91,16 +80,14 @@ class _WaterViewState extends State<WaterView> with TickerProviderStateMixin {
9180
fontWeight: FontWeight.w500,
9281
fontSize: 18,
9382
letterSpacing: -0.2,
94-
color:
95-
FintnessAppTheme.nearlyDarkBlue,
83+
color: FintnessAppTheme.nearlyDarkBlue,
9684
),
9785
),
9886
),
9987
],
10088
),
10189
Padding(
102-
padding: const EdgeInsets.only(
103-
left: 4, top: 2, bottom: 14),
90+
padding: const EdgeInsets.only(left: 4, top: 2, bottom: 14),
10491
child: Text(
10592
'of daily goal 3.5L',
10693
textAlign: TextAlign.center,
@@ -116,14 +103,12 @@ class _WaterViewState extends State<WaterView> with TickerProviderStateMixin {
116103
],
117104
),
118105
Padding(
119-
padding: const EdgeInsets.only(
120-
left: 4, right: 4, top: 8, bottom: 16),
106+
padding: const EdgeInsets.only(left: 4, right: 4, top: 8, bottom: 16),
121107
child: Container(
122108
height: 2,
123109
decoration: BoxDecoration(
124110
color: FintnessAppTheme.background,
125-
borderRadius: const BorderRadius.all(
126-
Radius.circular(4.0)),
111+
borderRadius: const BorderRadius.all(Radius.circular(4.0)),
127112
),
128113
),
129114
),
@@ -135,32 +120,27 @@ class _WaterViewState extends State<WaterView> with TickerProviderStateMixin {
135120
children: <Widget>[
136121
Row(
137122
mainAxisAlignment: MainAxisAlignment.start,
138-
crossAxisAlignment:
139-
CrossAxisAlignment.center,
123+
crossAxisAlignment: CrossAxisAlignment.center,
140124
children: <Widget>[
141125
Padding(
142126
padding: const EdgeInsets.only(left: 4),
143127
child: Icon(
144128
Icons.access_time,
145-
color: FintnessAppTheme.grey
146-
.withOpacity(0.5),
129+
color: FintnessAppTheme.grey.withOpacity(0.5),
147130
size: 16,
148131
),
149132
),
150133
Padding(
151-
padding:
152-
const EdgeInsets.only(left: 4.0),
134+
padding: const EdgeInsets.only(left: 4.0),
153135
child: Text(
154136
'Last drink 8:26 AM',
155137
textAlign: TextAlign.center,
156138
style: TextStyle(
157-
fontFamily:
158-
FintnessAppTheme.fontName,
139+
fontFamily: FintnessAppTheme.fontName,
159140
fontWeight: FontWeight.w500,
160141
fontSize: 14,
161142
letterSpacing: 0.0,
162-
color: FintnessAppTheme.grey
163-
.withOpacity(0.5),
143+
color: FintnessAppTheme.grey.withOpacity(0.5),
164144
),
165145
),
166146
),
@@ -169,24 +149,20 @@ class _WaterViewState extends State<WaterView> with TickerProviderStateMixin {
169149
Padding(
170150
padding: const EdgeInsets.only(top: 4),
171151
child: Row(
172-
mainAxisAlignment:
173-
MainAxisAlignment.start,
174-
crossAxisAlignment:
175-
CrossAxisAlignment.center,
152+
mainAxisAlignment: MainAxisAlignment.start,
153+
crossAxisAlignment: CrossAxisAlignment.center,
176154
children: <Widget>[
177155
SizedBox(
178156
width: 24,
179157
height: 24,
180-
child: Image.asset(
181-
'assets/fitness_app/bell.png'),
158+
child: Image.asset('assets/fitness_app/bell.png'),
182159
),
183160
Flexible(
184161
child: Text(
185162
'Your bottle is empty, refill it!.',
186163
textAlign: TextAlign.start,
187164
style: TextStyle(
188-
fontFamily:
189-
FintnessAppTheme.fontName,
165+
fontFamily: FintnessAppTheme.fontName,
190166
fontWeight: FontWeight.w500,
191167
fontSize: 12,
192168
letterSpacing: 0.0,
@@ -214,11 +190,7 @@ class _WaterViewState extends State<WaterView> with TickerProviderStateMixin {
214190
color: FintnessAppTheme.nearlyWhite,
215191
shape: BoxShape.circle,
216192
boxShadow: <BoxShadow>[
217-
BoxShadow(
218-
color: FintnessAppTheme.nearlyDarkBlue
219-
.withOpacity(0.4),
220-
offset: const Offset(4.0, 4.0),
221-
blurRadius: 8.0),
193+
BoxShadow(color: FintnessAppTheme.nearlyDarkBlue.withOpacity(0.4), offset: const Offset(4.0, 4.0), blurRadius: 8.0),
222194
],
223195
),
224196
child: Padding(
@@ -238,11 +210,7 @@ class _WaterViewState extends State<WaterView> with TickerProviderStateMixin {
238210
color: FintnessAppTheme.nearlyWhite,
239211
shape: BoxShape.circle,
240212
boxShadow: <BoxShadow>[
241-
BoxShadow(
242-
color: FintnessAppTheme.nearlyDarkBlue
243-
.withOpacity(0.4),
244-
offset: const Offset(4.0, 4.0),
245-
blurRadius: 8.0),
213+
BoxShadow(color: FintnessAppTheme.nearlyDarkBlue.withOpacity(0.4), offset: const Offset(4.0, 4.0), blurRadius: 8.0),
246214
],
247215
),
248216
child: Padding(
@@ -258,8 +226,7 @@ class _WaterViewState extends State<WaterView> with TickerProviderStateMixin {
258226
),
259227
),
260228
Padding(
261-
padding:
262-
const EdgeInsets.only(left: 16, right: 8, top: 16),
229+
padding: const EdgeInsets.only(left: 16, right: 8, top: 16),
263230
child: Container(
264231
width: 60,
265232
height: 160,
@@ -271,13 +238,12 @@ class _WaterViewState extends State<WaterView> with TickerProviderStateMixin {
271238
bottomRight: Radius.circular(80.0),
272239
topRight: Radius.circular(80.0)),
273240
boxShadow: <BoxShadow>[
274-
BoxShadow(
275-
color: FintnessAppTheme.grey.withOpacity(0.4),
276-
offset: const Offset(2, 2),
277-
blurRadius: 4),
241+
BoxShadow(color: FintnessAppTheme.grey.withOpacity(0.4), offset: const Offset(2, 2), blurRadius: 4),
278242
],
279243
),
280-
child: WaveView(),
244+
child: WaveView(
245+
percentageValue: 60.0,
246+
),
281247
),
282248
)
283249
],

0 commit comments

Comments
 (0)