|
|
|
@ -50,6 +50,15 @@ class _BodyFatState extends State<BodyFat> {
|
|
|
|
|
TextEditingController waistController = TextEditingController();
|
|
|
|
|
TextEditingController hipController = TextEditingController();
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
neckController.text = neck.toString();
|
|
|
|
|
hipController.text = hip.toString();
|
|
|
|
|
waistController.text = waist.toString();
|
|
|
|
|
heightController.text = heightCm.toString();
|
|
|
|
|
super.initState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void updateColorHeight(int type) {
|
|
|
|
|
//MG/DLT card
|
|
|
|
|
if (type == 1) {
|
|
|
|
@ -319,11 +328,6 @@ class _BodyFatState extends State<BodyFat> {
|
|
|
|
|
child: TextFormField(
|
|
|
|
|
keyboardType: TextInputType.number,
|
|
|
|
|
controller: heightController,
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
|
labelText: heightCm.toString(),
|
|
|
|
|
labelStyle: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -350,6 +354,7 @@ class _BodyFatState extends State<BodyFat> {
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
if (heightCm < 250) heightCm++;
|
|
|
|
|
heightController.text = heightCm.toString();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
@ -362,6 +367,7 @@ class _BodyFatState extends State<BodyFat> {
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
if (heightCm > 0) heightCm--;
|
|
|
|
|
heightController.text = heightCm.toString();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
@ -381,6 +387,7 @@ class _BodyFatState extends State<BodyFat> {
|
|
|
|
|
onChanged: (double newValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
heightCm = newValue.round();
|
|
|
|
|
heightController.text = heightCm.toString();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
activeColor: Color(0xffC5272D),
|
|
|
|
@ -492,15 +499,10 @@ class _BodyFatState extends State<BodyFat> {
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.only(left: 10.0),
|
|
|
|
|
padding: const EdgeInsets.only(left: 15.0, bottom: 0),
|
|
|
|
|
child: TextFormField(
|
|
|
|
|
keyboardType: TextInputType.number,
|
|
|
|
|
controller: neckController,
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
|
labelText: neck.toString(),
|
|
|
|
|
labelStyle: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -527,6 +529,7 @@ class _BodyFatState extends State<BodyFat> {
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
if (neck < 60) neck++;
|
|
|
|
|
neckController.text = neck.toString();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
@ -539,6 +542,7 @@ class _BodyFatState extends State<BodyFat> {
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
if (neck > 5) neck--;
|
|
|
|
|
neckController.text = neck.toString();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
@ -558,6 +562,7 @@ class _BodyFatState extends State<BodyFat> {
|
|
|
|
|
onChanged: (double newValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
neck = newValue.round();
|
|
|
|
|
neckController.text = neck.toString();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
activeColor: Color(0xffC5272D),
|
|
|
|
@ -673,11 +678,6 @@ class _BodyFatState extends State<BodyFat> {
|
|
|
|
|
child: TextFormField(
|
|
|
|
|
keyboardType: TextInputType.number,
|
|
|
|
|
controller: waistController,
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
|
labelText: waist.toString(),
|
|
|
|
|
labelStyle: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -704,6 +704,7 @@ class _BodyFatState extends State<BodyFat> {
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
if (waist < 200) waist++;
|
|
|
|
|
waistController.text = waist.toString();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
@ -716,6 +717,7 @@ class _BodyFatState extends State<BodyFat> {
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
if (waist > 5) waist--;
|
|
|
|
|
waistController.text = waist.toString();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
@ -735,6 +737,7 @@ class _BodyFatState extends State<BodyFat> {
|
|
|
|
|
onChanged: (double newValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
waist = newValue.round();
|
|
|
|
|
waistController.text = waist.toString();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
activeColor: Color(0xffC5272D),
|
|
|
|
@ -850,11 +853,6 @@ class _BodyFatState extends State<BodyFat> {
|
|
|
|
|
child: TextFormField(
|
|
|
|
|
keyboardType: TextInputType.number,
|
|
|
|
|
controller: hipController,
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
|
labelText: hip.toString(),
|
|
|
|
|
labelStyle: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -881,6 +879,7 @@ class _BodyFatState extends State<BodyFat> {
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
if (hip < 140) hip++;
|
|
|
|
|
hipController.text = hip.toString();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
@ -893,6 +892,7 @@ class _BodyFatState extends State<BodyFat> {
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
if (hip > 5) hip--;
|
|
|
|
|
hipController.text = hip.toString();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
@ -912,6 +912,7 @@ class _BodyFatState extends State<BodyFat> {
|
|
|
|
|
onChanged: (double newValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
hip = newValue.round();
|
|
|
|
|
hipController.text = hip.toString();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
activeColor: Color(0xffC5272D),
|
|
|
|
|